diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de64e8fb79..c37a543d48 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: paths: - 'src/**' - 'test/**' + - 'test-error/**' - 'test-esm/**' - 'package.json' - '.github/workflows/build.yml' @@ -11,6 +12,7 @@ on: paths: - 'src/**' - 'test/**' + - 'test-error/**' - 'test-esm/**' - 'package.json' - '.github/workflows/build.yml' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2386c980d..b1444d6b20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,37 @@ I always welcome your suggestion. When you publishing a suggestion, then please ## Contributing Code + +### Project Structure +``` +typia/ +├── src/ # Source code +│ ├── executable/ # CLI commands +│ ├── factories/ # Factory classes +│ ├── functional/ # Functional utilities +│ ├── programmers/ # Code generators +│ ├── schemas/ # Schema definitions +│ ├── tags/ # Tag implementations +│ ├── transformers/ # Code transformers +│ ├── typings/ # Type definitions +│ └── utils/ # Utility functions +├── test/ # Test files +├── benchmark/ # Benchmarking code +├── website/ # Documentation website +└── packages/ # Sub-packages +``` + +### Naming Conventions +- **Files**: Use camelCase for regular files (e.g., `jsonMetadata.ts`) +- **Classes**: Use PascalCase (e.g., `TypeGuardError`, `MetadataFactory`) +- **Interfaces**: Prefix with 'I' (e.g., `IValidation`, `IRandomGenerator`) +- **Type aliases**: Use PascalCase (e.g., `Primitive`, `Resolved`) +- **Functions**: Use camelCase (e.g., `stringify`, `validate`) +- **Constants**: Use UPPER_SNAKE_CASE for global constants +- **Variables**: Use camelCase +- **Test files**: Prefix with `test_` (e.g., `test_stringify_object_recursive`) + + ### Test your code Before sending a pull request, please test your new code. Please run the following commands: diff --git a/README.md b/README.md index ceef9b4d0b..e01b586fe8 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,13 @@ export namespace json { export function assertStringify(input: T): string; // safe and faster } -// LLM FUNCTION CALLING APPLICATION +// LLM FUNCTION CALLING SCHEMA export namespace llm { - // LLM function calling application from a class or interface type - export function application(): ILlmApplication; - export function schema(): ILlmSchema; // LLM type schema + // application schema from a class or interface type + export function application(): ILlmApplication; + // structured output + export function parameters(): ILlmSchema.IParameters; + export function schema(): ILlmSchema; // type schema } // PROTOCOL BUFFER @@ -43,8 +45,8 @@ export function random(g?: Partial): T; Typia is a transformer library supporting below features: - Super-fast Runtime Validators - - Enhanced JSON functions - - LLM function calling application composer + - Enhanced JSON schema and serde functions + - LLM function calling schema and structured output - Protocol Buffer encoder and decoder - Random data generator @@ -101,6 +103,7 @@ Check out the document in the [website](https://typia.io/docs/): - [`parse()` functions](https://typia.io/docs/json/parse/) - LLM Function Calling - [`application()` function](https://typia.io/docs/llm/application/) + - [`parameters()` function](https://typia.io/docs/llm/parameters/) - [`schema()` function](https://typia.io/docs/llm/schema/) - Protocol Buffer - [Message Schema](https://typia.io/docs/protobuf/message) diff --git a/benchmark/package.json b/benchmark/package.json index d28d88b193..88bd42d4e8 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -62,7 +62,7 @@ "ts-node": "^10.9.1", "ts-patch": "^3.2.0", "tstl": "^3.0.0", - "typescript": "^5.3.2", + "typescript": "~5.6.3", "uuid": "^8.3.2", "zod": "^3.19.1" }, @@ -72,6 +72,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.12.1.tgz" + "typia": "../" } } \ No newline at end of file diff --git a/benchmark/src/internal/AjvFactory.ts b/benchmark/src/internal/AjvFactory.ts index 8917eb6679..7a4a1c1bca 100644 --- a/benchmark/src/internal/AjvFactory.ts +++ b/benchmark/src/internal/AjvFactory.ts @@ -1,18 +1,19 @@ import { OpenApiV3 } from "@samchon/openapi"; import Ajv, { Options } from "ajv"; -import { IJsonApplication } from "typia"; +import { IJsonSchemaCollection } from "typia"; export namespace AjvFactory { - export const create = (options: Options) => (app: IJsonApplication<"3.0">) => - new Ajv({ - schemas: Object.entries(app.components.schemas ?? {}).map( - ([key, value]) => ({ - ...emendSchema(value), - $id: `#/components/schemas/${key}`, - }), - ), - ...options, - }).compile(emendSchema(app.schemas[0])); + export const create = + (options: Options) => (app: IJsonSchemaCollection<"3.0">) => + new Ajv({ + schemas: Object.entries(app.components.schemas ?? {}).map( + ([key, value]) => ({ + ...emendSchema(value), + $id: `#/components/schemas/${key}`, + }), + ), + ...options, + }).compile(emendSchema(app.schemas[0])); const emendSchema = ( schema: OpenApiV3.IJsonSchema, diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursive.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursive.ts index eb493210fb..828893bbe4 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursive.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursive.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ArrayRecursive } from "../../../structures/pure/ArrayRecursive"; import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; -createAssertAjvBenchmarkProgram( - typia.json.application<[ArrayRecursive], "3.0">(), -); +createAssertAjvBenchmarkProgram(typia.json.schemas<[ArrayRecursive], "3.0">()); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionExplicit.ts index d42c454a1d..55d3c48aba 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionExplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../structures/pure/ArrayRecur import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; createAssertAjvBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionExplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionImplicit.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionImplicit.ts index 1f7058c026..8171791f63 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionImplicit.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ArrayRecursiveUnionImplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionImplicit } from "../../../structures/pure/ArrayRecur import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; createAssertAjvBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionImplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionImplicit], "3.0">(), ); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectHierarchical.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectHierarchical.ts index a1008ed557..231216fc14 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectHierarchical.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectHierarchical.ts @@ -4,5 +4,5 @@ import { ObjectHierarchical } from "../../../structures/pure/ObjectHierarchical" import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; createAssertAjvBenchmarkProgram( - typia.json.application<[ObjectHierarchical], "3.0">(), + typia.json.schemas<[ObjectHierarchical], "3.0">(), ); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectRecursive.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectRecursive.ts index 8570b33bcb..b430943bab 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectRecursive.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectRecursive.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ObjectRecursive } from "../../../structures/pure/ObjectRecursive"; import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; -createAssertAjvBenchmarkProgram( - typia.json.application<[ObjectRecursive], "3.0">(), -); +createAssertAjvBenchmarkProgram(typia.json.schemas<[ObjectRecursive], "3.0">()); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectSimple.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectSimple.ts index 37908a3743..fb5cba0315 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectSimple.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectSimple.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ObjectSimple } from "../../../structures/pure/ObjectSimple"; import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; -createAssertAjvBenchmarkProgram( - typia.json.application<[ObjectSimple], "3.0">(), -); +createAssertAjvBenchmarkProgram(typia.json.schemas<[ObjectSimple], "3.0">()); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionExplicit.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionExplicit.ts index 6ee62b952d..42e463a8d3 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionExplicit.ts @@ -4,5 +4,5 @@ import { ObjectUnionExplicit } from "../../../structures/pure/ObjectUnionExplici import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; createAssertAjvBenchmarkProgram( - typia.json.application<[ObjectUnionExplicit], "3.0">(), + typia.json.schemas<[ObjectUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionImplicit.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionImplicit.ts index b812dba7b9..c8bab891b8 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionImplicit.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-ObjectUnionImplicit.ts @@ -4,5 +4,5 @@ import { ObjectUnionImplicit } from "../../../structures/pure/ObjectUnionImplici import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; createAssertAjvBenchmarkProgram( - typia.json.application<[ObjectUnionImplicit], "3.0">(), + typia.json.schemas<[ObjectUnionImplicit], "3.0">(), ); diff --git a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-UltimateUnion.ts b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-UltimateUnion.ts index 140e4c5baf..ce49be486f 100644 --- a/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-UltimateUnion.ts +++ b/benchmark/src/programs/assert/ajv/benchmark-assert-ajv-UltimateUnion.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { UltimateUnion } from "../../../structures/pure/UltimateUnion"; import { createAssertAjvBenchmarkProgram } from "./createAssertAjvBenchmarkProgram"; -createAssertAjvBenchmarkProgram( - typia.json.application<[UltimateUnion], "3.0">(), -); +createAssertAjvBenchmarkProgram(typia.json.schemas<[UltimateUnion], "3.0">()); diff --git a/benchmark/src/programs/assert/ajv/createAssertAjvBenchmarkProgram.ts b/benchmark/src/programs/assert/ajv/createAssertAjvBenchmarkProgram.ts index 756633502e..ce8f5aa2ca 100644 --- a/benchmark/src/programs/assert/ajv/createAssertAjvBenchmarkProgram.ts +++ b/benchmark/src/programs/assert/ajv/createAssertAjvBenchmarkProgram.ts @@ -1,10 +1,10 @@ -import { IJsonApplication } from "typia"; +import { IJsonSchemaCollection } from "typia"; import { AjvFactory } from "../../../internal/AjvFactory"; import { createAssertBenchmarkProgram } from "../createAssertBenchmarkProgram"; export const createAssertAjvBenchmarkProgram = ( - app: IJsonApplication<"3.0">, + app: IJsonSchemaCollection<"3.0">, ) => { try { const validate = AjvFactory.create({ diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursive.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursive.ts index e7fca66b1b..6a788fdbf2 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursive.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursive.ts @@ -3,4 +3,4 @@ import typia from "typia"; import { ArrayRecursive } from "../../../structures/pure/ArrayRecursive"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram(typia.json.application<[ArrayRecursive], "3.0">()); +createIsAjvBenchmarkProgram(typia.json.schemas<[ArrayRecursive], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionExplicit.ts index bbb4dbe438..f3fe88575a 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionExplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../structures/pure/ArrayRecur import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; createIsAjvBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionExplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionImplicit.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionImplicit.ts index f87e35226b..b2fd6d81ce 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionImplicit.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ArrayRecursiveUnionImplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionImplicit } from "../../../structures/pure/ArrayRecur import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; createIsAjvBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionImplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionImplicit], "3.0">(), ); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectHierarchical.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectHierarchical.ts index ca6b6f0ba2..4a7a23e247 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectHierarchical.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectHierarchical.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ObjectHierarchical } from "../../../structures/pure/ObjectHierarchical"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram( - typia.json.application<[ObjectHierarchical], "3.0">(), -); +createIsAjvBenchmarkProgram(typia.json.schemas<[ObjectHierarchical], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectRecursive.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectRecursive.ts index 708c637950..8e096e086b 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectRecursive.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectRecursive.ts @@ -3,4 +3,4 @@ import typia from "typia"; import { ObjectRecursive } from "../../../structures/pure/ObjectRecursive"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram(typia.json.application<[ObjectRecursive], "3.0">()); +createIsAjvBenchmarkProgram(typia.json.schemas<[ObjectRecursive], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectSimple.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectSimple.ts index 17cd07ec38..54b40616ec 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectSimple.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectSimple.ts @@ -3,4 +3,4 @@ import typia from "typia"; import { ObjectSimple } from "../../../structures/pure/ObjectSimple"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram(typia.json.application<[ObjectSimple], "3.0">()); +createIsAjvBenchmarkProgram(typia.json.schemas<[ObjectSimple], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionExplicit.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionExplicit.ts index fd29aa2db4..676e3b4e0e 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionExplicit.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ObjectUnionExplicit } from "../../../structures/pure/ObjectUnionExplicit"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram( - typia.json.application<[ObjectUnionExplicit], "3.0">(), -); +createIsAjvBenchmarkProgram(typia.json.schemas<[ObjectUnionExplicit], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionImplicit.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionImplicit.ts index 0e8e363c3b..9fb4f085c0 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionImplicit.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-ObjectUnionImplicit.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ObjectUnionImplicit } from "../../../structures/pure/ObjectUnionImplicit"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram( - typia.json.application<[ObjectUnionImplicit], "3.0">(), -); +createIsAjvBenchmarkProgram(typia.json.schemas<[ObjectUnionImplicit], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/benchmark-is-ajv-UltimateUnion.ts b/benchmark/src/programs/is/ajv/benchmark-is-ajv-UltimateUnion.ts index 46cd49c422..353fa39001 100644 --- a/benchmark/src/programs/is/ajv/benchmark-is-ajv-UltimateUnion.ts +++ b/benchmark/src/programs/is/ajv/benchmark-is-ajv-UltimateUnion.ts @@ -3,4 +3,4 @@ import typia from "typia"; import { UltimateUnion } from "../../../structures/pure/UltimateUnion"; import { createIsAjvBenchmarkProgram } from "./createIsAjvBenchmarkProgram"; -createIsAjvBenchmarkProgram(typia.json.application<[UltimateUnion], "3.0">()); +createIsAjvBenchmarkProgram(typia.json.schemas<[UltimateUnion], "3.0">()); diff --git a/benchmark/src/programs/is/ajv/createIsAjvBenchmarkProgram.ts b/benchmark/src/programs/is/ajv/createIsAjvBenchmarkProgram.ts index 97896e2f6c..eeaf863872 100644 --- a/benchmark/src/programs/is/ajv/createIsAjvBenchmarkProgram.ts +++ b/benchmark/src/programs/is/ajv/createIsAjvBenchmarkProgram.ts @@ -1,9 +1,11 @@ -import { IJsonApplication } from "typia"; +import { IJsonSchemaCollection } from "typia"; import { AjvFactory } from "../../../internal/AjvFactory"; import { createIsBenchmarkProgram } from "../createIsBenchmarkProgram"; -export const createIsAjvBenchmarkProgram = (app: IJsonApplication<"3.0">) => { +export const createIsAjvBenchmarkProgram = ( + app: IJsonSchemaCollection<"3.0">, +) => { try { const validate = AjvFactory.create({ strict: true, diff --git a/benchmark/src/programs/server-assert/internal/createFastifyPureServerAssertBenchmarkProgram.ts b/benchmark/src/programs/server-assert/internal/createFastifyPureServerAssertBenchmarkProgram.ts index ed88bbc2ca..0e71c0f878 100644 --- a/benchmark/src/programs/server-assert/internal/createFastifyPureServerAssertBenchmarkProgram.ts +++ b/benchmark/src/programs/server-assert/internal/createFastifyPureServerAssertBenchmarkProgram.ts @@ -5,7 +5,7 @@ import typia from "typia"; import { IServerAssertProgram } from "./IServerAssertProgram"; export const createFastifyPureServerAssertBenchmarkProgram = async ( - app: typia.IJsonApplication<"3.0">, + app: typia.IJsonSchemaCollection<"3.0">, ) => { // OPEN SERVER const server = fastify({ diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayHierarchical.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayHierarchical.ts index e4a7a0a772..386eb903b8 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayHierarchical.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayHierarchical.ts @@ -5,5 +5,5 @@ import { ArrayHierarchical } from "../../../../structures/pure/ArrayHierarchical import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursive.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursive.ts index 2d3f53d4bc..3afabb6520 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursive.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursive.ts @@ -5,5 +5,5 @@ import { ArrayRecursive } from "../../../../structures/pure/ArrayRecursive"; import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursiveUnionExplicit.ts index 396dad929a..399267b2d6 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArrayRecursiveUnionExplicit.ts @@ -5,5 +5,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../../structures/pure/ArrayRe import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArraySimple.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArraySimple.ts index 86ef8ae89e..6c54947124 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArraySimple.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ArraySimple.ts @@ -5,5 +5,5 @@ import { ArraySimple } from "../../../../structures/pure/ArraySimple"; import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectHierarchical.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectHierarchical.ts index d247a6fc0d..fd6e75b0e5 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectHierarchical.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectHierarchical.ts @@ -5,5 +5,5 @@ import { ObjectHierarchical } from "../../../../structures/pure/ObjectHierarchic import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectRecursive.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectRecursive.ts index 3e6c7ae967..9f9590647b 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectRecursive.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectRecursive.ts @@ -5,5 +5,5 @@ import { ObjectRecursive } from "../../../../structures/pure/ObjectRecursive"; import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectSimple.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectSimple.ts index 85d9fec734..0d369c8551 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectSimple.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectSimple.ts @@ -5,5 +5,5 @@ import { ObjectSimple } from "../../../../structures/pure/ObjectSimple"; import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectUnionExplicit.ts b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectUnionExplicit.ts index db8f53ecd5..7e2434cdce 100644 --- a/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/server-assert/internal/fastify-pure/benchmark-server-assert-fastify-pure-ObjectUnionExplicit.ts @@ -5,5 +5,5 @@ import { ObjectUnionExplicit } from "../../../../structures/pure/ObjectUnionExpl import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram"; createFastifyPureServerAssertBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/createFastifyPureServerPerformanceBenchmarkProgram.ts b/benchmark/src/programs/server-performance/internal/createFastifyPureServerPerformanceBenchmarkProgram.ts index 83b1c21a87..265127dbbe 100644 --- a/benchmark/src/programs/server-performance/internal/createFastifyPureServerPerformanceBenchmarkProgram.ts +++ b/benchmark/src/programs/server-performance/internal/createFastifyPureServerPerformanceBenchmarkProgram.ts @@ -5,7 +5,7 @@ import typia from "typia"; import { IServerPerformanceProgram } from "./IServerPerformanceProgram"; export const createFastifyPureServerPerformanceBenchmarkProgram = async ( - app: typia.IJsonApplication<"3.0">, + app: typia.IJsonSchemaCollection<"3.0">, ) => { // OPEN SERVER const server = fastify({ diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayHierarchical.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayHierarchical.ts index 47cc89ba9e..1f34fcde1c 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayHierarchical.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayHierarchical.ts @@ -5,5 +5,5 @@ import { ArrayHierarchical } from "../../../../structures/pure/ArrayHierarchical import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursive.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursive.ts index 73f28e6e5c..1b19840e77 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursive.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursive.ts @@ -5,5 +5,5 @@ import { ArrayRecursive } from "../../../../structures/pure/ArrayRecursive"; import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursiveUnionExplicit.ts index 57341919e8..529dc7c90d 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArrayRecursiveUnionExplicit.ts @@ -5,5 +5,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../../structures/pure/ArrayRe import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArraySimple.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArraySimple.ts index d2a09a9197..f6f10d0831 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArraySimple.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ArraySimple.ts @@ -5,5 +5,5 @@ import { ArraySimple } from "../../../../structures/pure/ArraySimple"; import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectHierarchical.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectHierarchical.ts index 935cd1f983..e958864062 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectHierarchical.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectHierarchical.ts @@ -5,5 +5,5 @@ import { ObjectHierarchical } from "../../../../structures/pure/ObjectHierarchic import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectRecursive.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectRecursive.ts index 4466df44d0..67f9ed570b 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectRecursive.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectRecursive.ts @@ -5,5 +5,5 @@ import { ObjectRecursive } from "../../../../structures/pure/ObjectRecursive"; import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectSimple.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectSimple.ts index a8782c5ae0..d747298872 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectSimple.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectSimple.ts @@ -5,5 +5,5 @@ import { ObjectSimple } from "../../../../structures/pure/ObjectSimple"; import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectUnionExplicit.ts b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectUnionExplicit.ts index 96d9b0b328..2d8a9c13b8 100644 --- a/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/server-performance/internal/fastify-pure/benchmark-server-performance-fastify-pure-ObjectUnionExplicit.ts @@ -5,5 +5,5 @@ import { ObjectUnionExplicit } from "../../../../structures/pure/ObjectUnionExpl import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram"; createFastifyPureServerPerformanceBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/createFastifyPureServerStringifyBenchmarkProgram.ts b/benchmark/src/programs/server-stringify/internal/createFastifyPureServerStringifyBenchmarkProgram.ts index d291a3e439..b09eb17fef 100644 --- a/benchmark/src/programs/server-stringify/internal/createFastifyPureServerStringifyBenchmarkProgram.ts +++ b/benchmark/src/programs/server-stringify/internal/createFastifyPureServerStringifyBenchmarkProgram.ts @@ -5,7 +5,7 @@ import typia from "typia"; import { IServerStringifyProgram } from "./IServerStringifyProgram"; export const createFastifyPureServerStringifyBenchmarkProgram = async ( - app: typia.IJsonApplication<"3.0">, + app: typia.IJsonSchemaCollection<"3.0">, ) => { // DEFINE JSON-SCHEMA const schema = { diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayHierarchical.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayHierarchical.ts index b5d5d3decd..b465548dc3 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayHierarchical.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayHierarchical.ts @@ -5,5 +5,5 @@ import { ArrayHierarchical } from "../../../../structures/pure/ArrayHierarchical import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursive.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursive.ts index ceaadb34f3..85520770a3 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursive.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursive.ts @@ -5,5 +5,5 @@ import { ArrayRecursive } from "../../../../structures/pure/ArrayRecursive"; import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursiveUnionExplicit.ts index fc605652c0..4bade17c32 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArrayRecursiveUnionExplicit.ts @@ -5,5 +5,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../../structures/pure/ArrayRe import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArraySimple.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArraySimple.ts index 0572bd02b0..165f0d62d8 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArraySimple.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ArraySimple.ts @@ -5,5 +5,5 @@ import { ArraySimple } from "../../../../structures/pure/ArraySimple"; import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectHierarchical.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectHierarchical.ts index a05a889f71..b4cea551f9 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectHierarchical.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectHierarchical.ts @@ -5,5 +5,5 @@ import { ObjectHierarchical } from "../../../../structures/pure/ObjectHierarchic import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectRecursive.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectRecursive.ts index 13c49d1047..5666d33e60 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectRecursive.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectRecursive.ts @@ -5,5 +5,5 @@ import { ObjectRecursive } from "../../../../structures/pure/ObjectRecursive"; import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectSimple.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectSimple.ts index aa06c62b3c..34ef6ddf2c 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectSimple.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectSimple.ts @@ -5,5 +5,5 @@ import { ObjectSimple } from "../../../../structures/pure/ObjectSimple"; import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectUnionExplicit.ts b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectUnionExplicit.ts index c4e98adb06..8a367a6059 100644 --- a/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/server-stringify/internal/fastify-pure/benchmark-server-stringify-fastify-pure-ObjectUnionExplicit.ts @@ -5,5 +5,5 @@ import { ObjectUnionExplicit } from "../../../../structures/pure/ObjectUnionExpl import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram"; createFastifyPureServerStringifyBenchmarkProgram( - typia.json.application<[ICollection], "3.0">(), + typia.json.schemas<[ICollection], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArrayHierarchical.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArrayHierarchical.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArrayHierarchical.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArrayHierarchical.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArrayRecursive.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArrayRecursive.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArrayRecursive.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArrayRecursive.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArrayRecursiveUnionExplicit.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArrayRecursiveUnionExplicit.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArrayRecursiveUnionExplicit.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArraySimple.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArraySimple.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ArraySimple.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ArraySimple.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectHierarchical.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectHierarchical.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectHierarchical.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectHierarchical.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectRecursive.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectRecursive.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectRecursive.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectRecursive.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectSimple.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectSimple.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectSimple.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectSimple.ts diff --git a/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectUnionExplicit.ts b/benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectUnionExplicit.ts similarity index 100% rename from benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-JSON.stringify-ObjectUnionExplicit.ts rename to benchmark/src/programs/stringify/JSON.stringify/benchmark-stringify-json.stringify-ObjectUnionExplicit.ts diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayHierarchical.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayHierarchical.ts index 678d559335..6bc15fa77b 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayHierarchical.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayHierarchical.ts @@ -4,5 +4,5 @@ import { ArrayHierarchical } from "../../../structures/pure/ArrayHierarchical"; import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ArrayHierarchical], "3.0">(), + typia.json.schemas<[ArrayHierarchical], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursive.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursive.ts index 767abe96e3..ee8bd54e2f 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursive.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursive.ts @@ -4,5 +4,5 @@ import { ArrayRecursive } from "../../../structures/pure/ArrayRecursive"; import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ArrayRecursive], "3.0">(), + typia.json.schemas<[ArrayRecursive], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursiveUnionExplicit.ts index 493c1597c7..199acb134e 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArrayRecursiveUnionExplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../structures/pure/ArrayRecur import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionExplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArraySimple.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArraySimple.ts index 04545f97f5..9658426d5f 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArraySimple.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ArraySimple.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ArraySimple } from "../../../structures/pure/ArraySimple"; import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; -createStringifyFastBenchmarkProgram( - typia.json.application<[ArraySimple], "3.0">(), -); +createStringifyFastBenchmarkProgram(typia.json.schemas<[ArraySimple], "3.0">()); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectHierarchical.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectHierarchical.ts index 2245ddfaeb..809acb90f3 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectHierarchical.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectHierarchical.ts @@ -4,5 +4,5 @@ import { ObjectHierarchical } from "../../../structures/pure/ObjectHierarchical" import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ObjectHierarchical], "3.0">(), + typia.json.schemas<[ObjectHierarchical], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectRecursive.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectRecursive.ts index 454947dd75..ac836e8f97 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectRecursive.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectRecursive.ts @@ -4,5 +4,5 @@ import { ObjectRecursive } from "../../../structures/pure/ObjectRecursive"; import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ObjectRecursive], "3.0">(), + typia.json.schemas<[ObjectRecursive], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectSimple.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectSimple.ts index ba9beb36ca..a119fc8ee8 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectSimple.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectSimple.ts @@ -4,5 +4,5 @@ import { ObjectSimple } from "../../../structures/pure/ObjectSimple"; import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ObjectSimple], "3.0">(), + typia.json.schemas<[ObjectSimple], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectUnionExplicit.ts b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectUnionExplicit.ts index 18f1a26c06..b35e233487 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/benchmark-stringify-fast-json-stringify-ObjectUnionExplicit.ts @@ -4,5 +4,5 @@ import { ObjectUnionExplicit } from "../../../structures/pure/ObjectUnionExplici import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram"; createStringifyFastBenchmarkProgram( - typia.json.application<[ObjectUnionExplicit], "3.0">(), + typia.json.schemas<[ObjectUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/stringify/fast-json-stringify/createStringifyFastBenchmarkProgram.ts b/benchmark/src/programs/stringify/fast-json-stringify/createStringifyFastBenchmarkProgram.ts index 7c411e7ce4..df5ec1912b 100644 --- a/benchmark/src/programs/stringify/fast-json-stringify/createStringifyFastBenchmarkProgram.ts +++ b/benchmark/src/programs/stringify/fast-json-stringify/createStringifyFastBenchmarkProgram.ts @@ -4,7 +4,7 @@ import typia from "typia"; import { createStringifyBenchmarkProgram } from "../createStringifyBenchmarkProgram"; export const createStringifyFastBenchmarkProgram = ( - app: typia.IJsonApplication<"3.0">, + app: typia.IJsonSchemaCollection<"3.0">, ) => { const stringify = (() => { try { diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArrayHierarchical.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArrayHierarchical.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArrayHierarchical.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArrayHierarchical.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArrayRecursive.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArrayRecursive.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArrayRecursive.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArrayRecursive.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArrayRecursiveUnionExplicit.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArrayRecursiveUnionExplicit.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArrayRecursiveUnionExplicit.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArraySimple.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArraySimple.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ArraySimple.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ArraySimple.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectHierarchical.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectHierarchical.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectHierarchical.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectHierarchical.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectRecursive.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectRecursive.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectRecursive.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectRecursive.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectSimple.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectSimple.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectSimple.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectSimple.ts diff --git a/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectUnionExplicit.ts b/benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectUnionExplicit.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertStringify-ObjectUnionExplicit.ts rename to benchmark/src/programs/stringify/typia.assertStringify/benchmark-stringify-typia.assertstringify-ObjectUnionExplicit.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArrayHierarchical.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArrayHierarchical.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArrayHierarchical.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArrayHierarchical.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArrayRecursive.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArrayRecursive.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArrayRecursive.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArrayRecursive.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArrayRecursiveUnionExplicit.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArrayRecursiveUnionExplicit.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArrayRecursiveUnionExplicit.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArraySimple.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArraySimple.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ArraySimple.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ArraySimple.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectHierarchical.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectHierarchical.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectHierarchical.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectHierarchical.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectRecursive.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectRecursive.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectRecursive.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectRecursive.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectSimple.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectSimple.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectSimple.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectSimple.ts diff --git a/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectUnionExplicit.ts b/benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectUnionExplicit.ts similarity index 100% rename from benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isStringify-ObjectUnionExplicit.ts rename to benchmark/src/programs/stringify/typia.isStringify/benchmark-stringify-typia.isstringify-ObjectUnionExplicit.ts diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursive.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursive.ts index cd3808dbb6..30ad491348 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursive.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursive.ts @@ -4,5 +4,5 @@ import { ArrayRecursive } from "../../../structures/pure/ArrayRecursive"; import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ArrayRecursive], "3.0">(), + typia.json.schemas<[ArrayRecursive], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionExplicit.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionExplicit.ts index 28d8049e85..061230bfb3 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionExplicit.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionExplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionExplicit } from "../../../structures/pure/ArrayRecur import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionExplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionImplicit.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionImplicit.ts index 149cf22c3c..ae36c86328 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionImplicit.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ArrayRecursiveUnionImplicit.ts @@ -4,5 +4,5 @@ import { ArrayRecursiveUnionImplicit } from "../../../structures/pure/ArrayRecur import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ArrayRecursiveUnionImplicit], "3.0">(), + typia.json.schemas<[ArrayRecursiveUnionImplicit], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectHierarchical.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectHierarchical.ts index bc9e65a6be..8c33cad2e9 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectHierarchical.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectHierarchical.ts @@ -4,5 +4,5 @@ import { ObjectHierarchical } from "../../../structures/pure/ObjectHierarchical" import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ObjectHierarchical], "3.0">(), + typia.json.schemas<[ObjectHierarchical], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectRecursive.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectRecursive.ts index 7e1078bed9..e080a9a9c5 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectRecursive.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectRecursive.ts @@ -4,5 +4,5 @@ import { ObjectRecursive } from "../../../structures/pure/ObjectRecursive"; import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ObjectRecursive], "3.0">(), + typia.json.schemas<[ObjectRecursive], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectSimple.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectSimple.ts index 4e323b2579..f63e1d53ef 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectSimple.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectSimple.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { ObjectSimple } from "../../../structures/pure/ObjectSimple"; import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; -createValidateAjvBenchmarkProgram( - typia.json.application<[ObjectSimple], "3.0">(), -); +createValidateAjvBenchmarkProgram(typia.json.schemas<[ObjectSimple], "3.0">()); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionExplicit.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionExplicit.ts index c5e1f7c395..d30533dee1 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionExplicit.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionExplicit.ts @@ -4,5 +4,5 @@ import { ObjectUnionExplicit } from "../../../structures/pure/ObjectUnionExplici import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ObjectUnionExplicit], "3.0">(), + typia.json.schemas<[ObjectUnionExplicit], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionImplicit.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionImplicit.ts index 00dd87ec7c..29426ee696 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionImplicit.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-ObjectUnionImplicit.ts @@ -4,5 +4,5 @@ import { ObjectUnionImplicit } from "../../../structures/pure/ObjectUnionImplici import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; createValidateAjvBenchmarkProgram( - typia.json.application<[ObjectUnionImplicit], "3.0">(), + typia.json.schemas<[ObjectUnionImplicit], "3.0">(), ); diff --git a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-UltimateUnion.ts b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-UltimateUnion.ts index ba474421c5..642b034462 100644 --- a/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-UltimateUnion.ts +++ b/benchmark/src/programs/validate/ajv/benchmark-validate-ajv-UltimateUnion.ts @@ -3,6 +3,4 @@ import typia from "typia"; import { UltimateUnion } from "../../../structures/pure/UltimateUnion"; import { createValidateAjvBenchmarkProgram } from "./createValidateAjvBenchmarkProgram"; -createValidateAjvBenchmarkProgram( - typia.json.application<[UltimateUnion], "3.0">(), -); +createValidateAjvBenchmarkProgram(typia.json.schemas<[UltimateUnion], "3.0">()); diff --git a/benchmark/src/programs/validate/ajv/createValidateAjvBenchmarkProgram.ts b/benchmark/src/programs/validate/ajv/createValidateAjvBenchmarkProgram.ts index 8f71fc6871..980ab10005 100644 --- a/benchmark/src/programs/validate/ajv/createValidateAjvBenchmarkProgram.ts +++ b/benchmark/src/programs/validate/ajv/createValidateAjvBenchmarkProgram.ts @@ -1,11 +1,11 @@ import Ajv from "ajv"; -import { IJsonApplication } from "typia"; +import { IJsonSchemaCollection } from "typia"; import { AjvFactory } from "../../../internal/AjvFactory"; import { createValidateBenchmarkProgram } from "../createValidateBenchmarkProgram"; export const createValidateAjvBenchmarkProgram = ( - app: IJsonApplication<"3.0">, + app: IJsonSchemaCollection<"3.0">, ) => { try { const validate = AjvFactory.create({ diff --git a/benchmark/src/structures/io-ts/IoTsUltimateUnion.ts b/benchmark/src/structures/io-ts/IoTsUltimateUnion.ts index 62ed193e40..723ce123c9 100644 --- a/benchmark/src/structures/io-ts/IoTsUltimateUnion.ts +++ b/benchmark/src/structures/io-ts/IoTsUltimateUnion.ts @@ -1,6 +1,6 @@ import { OpenApi } from "@samchon/openapi"; import * as t from "io-ts"; -import { IJsonApplication } from "typia"; +import { IJsonSchemaCollection } from "typia"; const Schema: t.Type = t.recursion( "Schema", @@ -82,7 +82,7 @@ const Components: t.Type = t.recursion( }) as any, ); -const Application: t.Type = t.recursion( +const Application: t.Type = t.recursion( "Application", () => t.type({ @@ -93,7 +93,7 @@ const Application: t.Type = t.recursion( }) as any, ); -export const IoTsUltimateUnion: t.Type = t.recursion( +export const IoTsUltimateUnion: t.Type = t.recursion( "UltimateUnion", () => t.array(Application) as any, ); diff --git a/benchmark/src/structures/pure/UltimateUnion.ts b/benchmark/src/structures/pure/UltimateUnion.ts index d2a6483005..bb964e6401 100644 --- a/benchmark/src/structures/pure/UltimateUnion.ts +++ b/benchmark/src/structures/pure/UltimateUnion.ts @@ -6,13 +6,13 @@ import { ArrayRecursiveUnionExplicit } from "./ArrayRecursiveUnionExplicit"; import { ObjectUnionExplicit } from "./ObjectUnionExplicit"; import { ObjectUnionImplicit } from "./ObjectUnionImplicit"; -export type UltimateUnion = typia.IJsonApplication[]; +export type UltimateUnion = typia.IJsonSchemaCollection[]; export namespace UltimateUnion { - export function generate(): typia.IJsonApplication[] { + export function generate(): typia.IJsonSchemaCollection[] { const output = [ - typia.json.application<[ObjectUnionExplicit]>(), - typia.json.application<[ObjectUnionImplicit]>(), - typia.json.application<[ArrayRecursiveUnionExplicit]>(), + typia.json.schemas<[ObjectUnionExplicit]>(), + typia.json.schemas<[ObjectUnionImplicit]>(), + typia.json.schemas<[ArrayRecursiveUnionExplicit]>(), ]; output[0]!.schemas[0] = { type: "number", @@ -20,13 +20,13 @@ export namespace UltimateUnion { return output; } - export function trail(): typia.IJsonApplication[] { - const input: typia.IJsonApplication[] = generate(); + export function trail(): typia.IJsonSchemaCollection[] { + const input: typia.IJsonSchemaCollection[] = generate(); SPOILERS[0]!(input); return input; } - export const SPOILERS: Spoiler[] = [ + export const SPOILERS: Spoiler[] = [ (input) => { const [key, schema] = (() => { const entries = Object.entries( diff --git a/benchmark/src/structures/zod/ZodUltimateUnion.ts b/benchmark/src/structures/zod/ZodUltimateUnion.ts index feedc41a14..8edbd82920 100644 --- a/benchmark/src/structures/zod/ZodUltimateUnion.ts +++ b/benchmark/src/structures/zod/ZodUltimateUnion.ts @@ -1,5 +1,5 @@ import { OpenApi } from "@samchon/openapi"; -import { IJsonApplication } from "typia"; +import { IJsonSchemaCollection } from "typia"; import { z } from "zod"; const Schema: z.ZodType = z.lazy( @@ -76,10 +76,9 @@ const ObjectDef: z.ZodType = z.lazy(() => z.object({ $id: z.string(), type: z.literal("object"), - properties: z.record(Schema), patternProperties: z.union([z.undefined(), z.record(Schema)]), - required: z.union([z.undefined(), z.array(z.string())]), + required: z.array(z.string()), description: z.union([z.string(), z.undefined()]), }), ); @@ -89,7 +88,7 @@ const Components: z.ZodType = z.lazy(() => }), ); -const Application: z.ZodType = z.lazy( +const Application: z.ZodType = z.lazy( () => z.object({ schemas: z.array(Schema), diff --git a/benchmark/src/template/server-assert.ts b/benchmark/src/template/server-assert.ts index 16b7de9d37..a2a8d4a645 100644 --- a/benchmark/src/template/server-assert.ts +++ b/benchmark/src/template/server-assert.ts @@ -86,7 +86,7 @@ const SERVERS: BenchmarkProgrammer.ILibrary[] = [ `import { createFastifyPureServerAssertBenchmarkProgram } from "../createFastifyPureServerAssertBenchmarkProgram";`, ``, `createFastifyPureServerAssertBenchmarkProgram(`, - ` typia.json.application<[ICollection<${type}>], "3.0">()`, + ` typia.json.schemas<[ICollection<${type}>], "3.0">()`, `);`, ].join("\n"), }, diff --git a/benchmark/src/template/server-performance.ts b/benchmark/src/template/server-performance.ts index 4c129eb974..7d282c3e56 100644 --- a/benchmark/src/template/server-performance.ts +++ b/benchmark/src/template/server-performance.ts @@ -88,7 +88,7 @@ const SERVERS: BenchmarkProgrammer.ILibrary[] = [ `import { createFastifyPureServerPerformanceBenchmarkProgram } from "../createFastifyPureServerPerformanceBenchmarkProgram";`, ``, `createFastifyPureServerPerformanceBenchmarkProgram(`, - ` typia.json.application<[ICollection<${type}>], "3.0">()`, + ` typia.json.schemas<[ICollection<${type}>], "3.0">()`, `);`, ].join("\n"), }, diff --git a/benchmark/src/template/server-stringify.ts b/benchmark/src/template/server-stringify.ts index e944747fe8..301f3b0f70 100644 --- a/benchmark/src/template/server-stringify.ts +++ b/benchmark/src/template/server-stringify.ts @@ -93,7 +93,7 @@ const SERVERS: BenchmarkProgrammer.ILibrary[] = [ `import { createFastifyPureServerStringifyBenchmarkProgram } from "../createFastifyPureServerStringifyBenchmarkProgram";`, ``, `createFastifyPureServerStringifyBenchmarkProgram(`, - ` typia.json.application<[ICollection<${type}>], "3.0">()`, + ` typia.json.schemas<[ICollection<${type}>], "3.0">()`, `);`, ].join("\n"), }, diff --git a/benchmark/src/template/stringify.ts b/benchmark/src/template/stringify.ts index a8b3adcd2e..c38a6968b7 100644 --- a/benchmark/src/template/stringify.ts +++ b/benchmark/src/template/stringify.ts @@ -52,7 +52,7 @@ const LIBRARIES: BenchmarkProgrammer.ILibrary[] = [ `import { createStringifyFastBenchmarkProgram } from "./createStringifyFastBenchmarkProgram";`, ``, `createStringifyFastBenchmarkProgram(`, - ` typia.json.application<[${type}], "3.0">()`, + ` typia.json.schemas<[${type}], "3.0">()`, `);`, ].join("\n"), }, diff --git a/benchmark/src/template/validate.ts b/benchmark/src/template/validate.ts index a814c96314..43f163acda 100644 --- a/benchmark/src/template/validate.ts +++ b/benchmark/src/template/validate.ts @@ -64,7 +64,7 @@ const LIBRARIES = (category: string): BenchmarkProgrammer.ILibrary[] => [ `import { ${program} } from "./${program}";`, ``, `${program}(`, - ` typia.json.application<[${type}], "3.0">(),`, + ` typia.json.schemas<[${type}], "3.0">(),`, `);`, ].join("\n"); }, diff --git a/debug/index.js b/debug/index.js deleted file mode 100644 index 0c398e7915..0000000000 --- a/debug/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const cp = require("child_process"); -const fs = require("fs"); -const runner = require("ts-node"); -const supress = require("suppress-warnings"); - -const setup = () => { - const version = (() => { - cp.execSync("npm pack", { cwd: `${__dirname}/..` }); - const pack = JSON.parse( - fs.readFileSync(`${__dirname}/../package.json`, "utf8"), - ); - return pack.version; - })(); - const mine = JSON.parse(fs.readFileSync(`${__dirname}/package.json`, "utf8")); - - if (fs.existsSync(`${__dirname}/node_modules/typia`)) - cp.execSync("npm uninstall typia", { - cwd: __dirname, - stdio: "ignore", - }); - mine.dependencies.typia = `../typia-${version}.tgz`; - fs.writeFileSync(`${__dirname}/package.json`, JSON.stringify(mine, null, 2)); - cp.execSync("npm install", { cwd: __dirname, stdio: "ignore" }); -}; - -const execute = () => { - cp.execSync("npx tsc", { cwd: __dirname, stdio: "inherit" }); - cp.execSync(`node bin/${process.argv[2]}`, { - cwd: __dirname, - stdio: "inherit", - }); -}; - -supress([() => true]); -setup(); -execute(); diff --git a/debug/package.json b/debug/package.json deleted file mode 100644 index 51198ef52c..0000000000 --- a/debug/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@typia/debug", - "version": "0.1.0", - "description": "", - "main": "index.js", - "scripts": { - "start": "node index", - "prepare": "ts-patch install && typia patch" - }, - "author": "", - "license": "ISC", - "devDependencies": { - "@types/uuid": "^10.0.0", - "ts-node": "^10.9.2", - "ts-patch": "^3.2.0", - "typescript": "^5.4.2" - }, - "dependencies": { - "tstl": "^3.0.0", - "typia": "../typia-6.11.1.tgz", - "uuid": "^10.0.0" - } -} \ No newline at end of file diff --git a/debug/src/llm.ts b/debug/src/llm.ts deleted file mode 100644 index c11ae0280d..0000000000 --- a/debug/src/llm.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ILlmApplication } from "@samchon/openapi"; -import typia from "typia"; - -interface ICalculator { - /** - * @deprecated - */ - plus(x: number, y: number): number; - - /** - * @tag arithmetic - * @tag mathmatics - * @tag something for nothing - */ - minus(x: number, y: number): number; -} - -const app: ILlmApplication = typia.llm.application(); -console.log(app.functions[1]?.tags); diff --git a/debug/src/protobuf.ts b/debug/src/protobuf.ts deleted file mode 100644 index e65cb56800..0000000000 --- a/debug/src/protobuf.ts +++ /dev/null @@ -1,12 +0,0 @@ -import typia from "typia"; - -interface MyObj { - private: boolean | null; -} - -const encode = typia.protobuf.createEncode(); -console.log( - encode({ - private: true, - }), -); diff --git a/debug/src/shorthand.ts b/debug/src/shorthand.ts deleted file mode 100644 index fcf2068227..0000000000 --- a/debug/src/shorthand.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -const x: number = 3; -const rest = { - y: 4, - z: 5, -}; -typia.is({ x, ...rest }); diff --git a/debug/tsconfig.json b/debug/tsconfig.json deleted file mode 100644 index 4330ec468f..0000000000 --- a/debug/tsconfig.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Projects */ - // "incremental": true, /* Enable incremental compilation */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "lib": [ - "DOM", - "ESNext" - ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */// "jsx": "preserve", /* Specify what JSX code is generated. */ - "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ - // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "resolveJsonModule": true, /* Enable importing .json files */ - // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./bin", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - "newLine": "lf", /* Set the newline character for emitting files. */// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ - // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ - // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ - "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true, /* Skip type checking all .d.ts files. */ - "plugins": [ - { - "transform": "typia/lib/transform" - } - ], - }, - "include": [ - "src" - ] -} \ No newline at end of file diff --git a/deploy/bun.ts b/deploy/bun.ts index 6daea35108..0f390aba8d 100644 --- a/deploy/bun.ts +++ b/deploy/bun.ts @@ -26,7 +26,7 @@ const main = async (): Promise => { }); if (skipSetup === undefined) throw new Error("skipSetup is undefined"); await DeployRunner.main({ - tag: "tgz", + tag: "test", publish: false, setup: !skipSetup, testExecutors: [ diff --git a/deploy/index.ts b/deploy/index.ts index 028f5d6f36..7a58d36602 100644 --- a/deploy/index.ts +++ b/deploy/index.ts @@ -19,22 +19,27 @@ const main = async (): Promise => { } await DeployRunner.main({ tag, - publish: tag !== "tgz", + publish: tag !== "test", setup: true, testExecutors: [ { name: "test", commands: - tag === "tgz" && template === true - ? ["npm run template", "npm run build", "npm start"] - : ["npm run build", "npm start"], + tag === "test" && template === true + ? [ + "npm run template", + "npm run build", + "npm start", + "npm run generate", + ] + : ["npm run build", "npm start", "npm run generate"], }, { name: "test-esm", commands: ["npm run build", "npm start"], }, { - name: "errors", + name: "test-error", commands: ["npm start"], }, { diff --git a/deploy/internal/DeployRunner.ts b/deploy/internal/DeployRunner.ts index 73dd107750..efd8593d51 100644 --- a/deploy/internal/DeployRunner.ts +++ b/deploy/internal/DeployRunner.ts @@ -23,7 +23,7 @@ export namespace DeployRunner { }); } const version: string = props.setup - ? await publish("tgz") + ? await publish("test") : JSON.parse( await fs.promises.readFile(`${__dirname}/../../package.json`, "utf8"), ).version; @@ -68,8 +68,7 @@ export namespace DeployRunner { JSON.stringify(pack, null, 2), "utf8", ); - if (tag === "tgz") cp.execSync("npm pack"); - else + if (tag !== "test") cp.execSync( `npm publish --tag ${tag}${tag === "latest" ? " --provenance" : ""}`, { stdio: "inherit" }, @@ -100,7 +99,7 @@ export namespace DeployRunner { await fs.promises.readFile("package.json", "utf8"), ); pack.dependencies ??= {}; - pack.dependencies.typia = `../typia-${props.version}.tgz`; + pack.dependencies.typia = `../`; await fs.promises.writeFile( "package.json", JSON.stringify(pack, null, 2), diff --git a/errors/package.json b/errors/package.json deleted file mode 100644 index b7c77dc086..0000000000 --- a/errors/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "private": true, - "name": "@typia/errors", - "version": "0.1.0", - "description": "Test program of typia generated errors", - "main": "index.js", - "scripts": { - "build": "rimraf bin && tsc", - "prepare": "ts-patch install", - "prettier": "prettier ./src/**/*.ts --write", - "setup": "node build/setup.js", - "start": "node index" - }, - "repository": { - "type": "git", - "url": "https://github.com/samchon/typia" - }, - "keywords": [ - "typia", - "test", - "error" - ], - "author": "Jeongho Nam", - "license": "MIT", - "bugs": { - "url": "https://github.com/samchon/typia/issues" - }, - "homepage": "https://github.com/samchon/typia#readme", - "devDependencies": { - "rimraf": "^5.0.5", - "ts-patch": "^3.2.0", - "typescript": "^5.3.2" - }, - "dependencies": { - "typia": "../typia-6.12.1.tgz" - } -} \ No newline at end of file diff --git a/errors/src/llm/llm.application.bigint.ts b/errors/src/llm/llm.application.bigint.ts deleted file mode 100644 index 71f92f50ba..0000000000 --- a/errors/src/llm/llm.application.bigint.ts +++ /dev/null @@ -1,7 +0,0 @@ -import typia from "typia"; - -typia.llm.application(); - -interface Controller { - plus(X: bigint, y: bigint): bigint; -} diff --git a/package.json b/package.json index 44d5449dab..1c79f82f77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "6.12.2", + "version": "7.0.0", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -14,12 +14,13 @@ } }, "scripts": { - "test": "npm run package:tgz", + "test": "ts-node deploy --tag test", "test:bun": "bun run deploy/bun.ts", "test:template": "npm run --tag test --template", "-------------------------------------------------": "", "build": "rimraf lib && tsc && rollup -c", "dev": "rimraf lib && tsc --watch", + "dev:errors": "tsc --project tsconfig.errors.json --watch", "eslint": "eslint ./**/*.ts", "eslint:fix": "eslint ./**/*.ts --fix", "prettier": "prettier src --write", @@ -27,39 +28,12 @@ "package:latest": "ts-node deploy --tag latest", "package:next": "ts-node deploy --tag next", "package:patch": "ts-node deploy --tag patch", - "package:tgz": "ts-node deploy --tag tgz", "package:deprecate": "npm deprecate typescript-json \"Renamed to typia\"" }, "repository": { "type": "git", "url": "https://github.com/samchon/typia" }, - "keywords": [ - "fast", - "json", - "stringify", - "typescript", - "transform", - "ajv", - "io-ts", - "schema", - "jsonschema", - "generator", - "assert", - "clone", - "is", - "validate", - "equal", - "runtime", - "type", - "typebox", - "checker", - "validator", - "safe", - "parse", - "prune", - "random" - ], "author": "Jeongho Nam", "license": "MIT", "bugs": { @@ -67,7 +41,7 @@ }, "homepage": "https://typia.io", "dependencies": { - "@samchon/openapi": "^1.2.4", + "@samchon/openapi": "^2.0.0", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", @@ -76,7 +50,7 @@ }, "peerDependencies": { "typescript": ">=4.8.0 <5.7.0", - "@samchon/openapi": ">=1.2.4 <2.0.0" + "@samchon/openapi": ">=2.0.0 <3.0.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^26.0.1", @@ -107,5 +81,41 @@ "lib", "src" ], + "keywords": [ + "fast", + "json", + "stringify", + "typescript", + "transform", + "ajv", + "io-ts", + "zod", + "schema", + "json-schema", + "generator", + "assert", + "clone", + "is", + "validate", + "equal", + "runtime", + "type", + "typebox", + "checker", + "validator", + "safe", + "parse", + "prune", + "random", + "protobuf", + "llm", + "llm-function-calling", + "structured-output", + "openai", + "chatgpt", + "claude", + "gemini", + "llama" + ], "private": true } \ No newline at end of file diff --git a/packages/typescript-json/README.md b/packages/typescript-json/README.md index af5e12a836..291ed6b315 100644 --- a/packages/typescript-json/README.md +++ b/packages/typescript-json/README.md @@ -9,6 +9,7 @@ [![Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia) [![Build Status](https://github.com/samchon/typia/workflows/build/badge.svg)](https://github.com/samchon/typia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://typia.io/docs/) +[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20Typia%20Guru-006BFF)](https://gurubase.io/g/typia) ```typescript // RUNTIME VALIDATORS @@ -24,11 +25,13 @@ export namespace json { export function assertStringify(input: T): string; // safe and faster } -// LLM FUNCTION CALLING APPLICATION +// LLM FUNCTION CALLING SCHEMA export namespace llm { - // LLM function calling application from a class or interface type - export function application(): ILlmApplication; - export function schema(): ILlmSchema; // LLM type schema + // application schema from a class or interface type + export function application(): ILlmApplication; + // structured output + export function parameters(): ILlmSchema.IParameters; + export function schema(): ILlmSchema; // type schema } // PROTOCOL BUFFER @@ -45,8 +48,8 @@ export function random(g?: Partial): T; Typia is a transformer library supporting below features: - Super-fast Runtime Validators - - Enhanced JSON functions - - LLM function calling application composer + - Enhanced JSON schema and serde functions + - LLM function calling schema and structured output - Protocol Buffer encoder and decoder - Random data generator @@ -103,6 +106,7 @@ Check out the document in the [website](https://typia.io/docs/): - [`parse()` functions](https://typia.io/docs/json/parse/) - LLM Function Calling - [`application()` function](https://typia.io/docs/llm/application/) + - [`parameters()` function](https://typia.io/docs/llm/parameters/) - [`schema()` function](https://typia.io/docs/llm/schema/) - Protocol Buffer - [Message Schema](https://typia.io/docs/protobuf/message) diff --git a/packages/typescript-json/package.json b/packages/typescript-json/package.json index 5d367ede84..5941c70cfc 100644 --- a/packages/typescript-json/package.json +++ b/packages/typescript-json/package.json @@ -1,6 +1,6 @@ { "name": "typescript-json", - "version": "6.10.4-dev.20240925", + "version": "7.0.0-dev.20241202-3", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -10,12 +10,13 @@ } }, "scripts": { - "test": "npm run package:tgz", + "test": "ts-node deploy --tag test", "test:bun": "bun run deploy/bun.ts", "test:template": "npm run --tag test --template", "-------------------------------------------------": "", "build": "rimraf lib && tsc && rollup -c", "dev": "rimraf lib && tsc --watch", + "dev:errors": "tsc --project tsconfig.errors.json --watch", "eslint": "eslint ./**/*.ts", "eslint:fix": "eslint ./**/*.ts --fix", "prettier": "prettier src --write", @@ -23,13 +24,36 @@ "package:latest": "ts-node deploy --tag latest", "package:next": "ts-node deploy --tag next", "package:patch": "ts-node deploy --tag patch", - "package:tgz": "ts-node deploy --tag tgz", "package:deprecate": "npm deprecate typescript-json \"Renamed to typia\"" }, "repository": { "type": "git", "url": "https://github.com/samchon/typia" }, + "author": "Jeongho Nam", + "license": "MIT", + "bugs": { + "url": "https://github.com/samchon/typia/issues" + }, + "homepage": "https://typia.io", + "dependencies": { + "typia": "7.0.0-dev.20241202-3" + }, + "peerDependencies": { + "typescript": ">=4.8.0 <5.7.0", + "@samchon/openapi": ">=2.0.0 <3.0.0" + }, + "stackblitz": { + "startCommand": "npm install && npm run test" + }, + "sideEffects": false, + "files": [ + "LICENSE", + "README.md", + "package.json", + "lib", + "src" + ], "keywords": [ "fast", "json", @@ -38,8 +62,9 @@ "transform", "ajv", "io-ts", + "zod", "schema", - "jsonschema", + "json-schema", "generator", "assert", "clone", @@ -54,29 +79,15 @@ "safe", "parse", "prune", - "random" - ], - "author": "Jeongho Nam", - "license": "MIT", - "bugs": { - "url": "https://github.com/samchon/typia/issues" - }, - "homepage": "https://typia.io", - "dependencies": { - "typia": "6.10.4-dev.20240925" - }, - "peerDependencies": { - "typescript": ">=4.8.0 <5.7.0" - }, - "stackblitz": { - "startCommand": "npm install && npm run test" - }, - "sideEffects": false, - "files": [ - "LICENSE", - "README.md", - "package.json", - "lib", - "src" + "random", + "protobuf", + "llm", + "llm-function-calling", + "structured-output", + "openai", + "chatgpt", + "claude", + "gemini", + "llama" ] } \ No newline at end of file diff --git a/packages/typescript-json/tsconfig.json b/packages/typescript-json/tsconfig.json index f3914ece9a..1d4b4395e1 100644 --- a/packages/typescript-json/tsconfig.json +++ b/packages/typescript-json/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": [ "DOM", "ES2020" diff --git a/src/IRandomGenerator.ts b/src/IRandomGenerator.ts index 56114918fd..908798fbbf 100644 --- a/src/IRandomGenerator.ts +++ b/src/IRandomGenerator.ts @@ -1,19 +1,17 @@ -import { Customizable } from "./typings/Customizable"; +import { OpenApi } from "@samchon/openapi"; export interface IRandomGenerator { // REGULAR - boolean(): boolean; - integer(minimum?: number, maximum?: number): number; - bigint(minimum?: bigint, maximum?: bigint): bigint; - number(minimum?: number, maximum?: number): number; - string(length?: number): string; - + boolean(): boolean | undefined; + number(schema: OpenApi.IJsonSchema.INumber): number; + integer(schema: OpenApi.IJsonSchema.IInteger): number; + bigint(schema: OpenApi.IJsonSchema.IInteger): bigint; + string(schema: OpenApi.IJsonSchema.IString): string; array( - closure: (index: number) => T, - count?: number, - unique?: boolean, + schema: Omit & { + element: (index: number, count: number) => T; + }, ): T[]; - length(): number; pattern(regex: RegExp): string; //---- @@ -40,27 +38,12 @@ export interface IRandomGenerator { url(): string; // TIMESTAMPS - datetime(minimum?: number, maximum?: number): string; - date(minimum?: number, maximum?: number): string; + datetime(props?: { minimum?: number; maximum?: number }): string; + date(props?: { minimum?: number; maximum?: number }): string; time(): string; duration(): string; // POINTERS jsonPointer(): string; relativeJsonPointer(): string; - - customs?: IRandomGenerator.CustomMap; -} -export namespace IRandomGenerator { - export type CustomMap = { - [Type in keyof Customizable]?: ( - tags: ITypeTag[], - ) => Customizable[Type] | undefined; - }; - - export interface ITypeTag { - name: string; - kind: string; - value: any; - } } diff --git a/src/IReadableURLSearchParams.ts b/src/IReadableURLSearchParams.ts new file mode 100644 index 0000000000..a2e3bac750 --- /dev/null +++ b/src/IReadableURLSearchParams.ts @@ -0,0 +1,9 @@ +/** + * Interface for a readable URLSearchParams object. + * + * This interface is a subset of the {@link URLSearchParams} interface, + * designed especially for the [Hono.JS](https://hono.dev/) libray. + * + * @author https://github.com/miyaji255 + */ +export type IReadableURLSearchParams = Pick; diff --git a/src/IValidation.ts b/src/IValidation.ts index c793ccffb1..39377367d5 100644 --- a/src/IValidation.ts +++ b/src/IValidation.ts @@ -5,7 +5,6 @@ export namespace IValidation { export interface ISuccess { success: true; data: T; - errors: []; } export interface IFailure { diff --git a/src/executable/TypiaGenerateWizard.ts b/src/executable/TypiaGenerateWizard.ts index f3c5e55ac4..a12c737f9d 100644 --- a/src/executable/TypiaGenerateWizard.ts +++ b/src/executable/TypiaGenerateWizard.ts @@ -13,7 +13,7 @@ export namespace TypiaGenerateWizard { // LOAD PACKAGE.JSON INFO const pack: PackageManager = await PackageManager.mount(); - const options: IArguments = await ArgumentParser.parse(pack)(inquiry); + const options: IArguments = await ArgumentParser.parse(pack, inquiry); await TypiaProgrammer.build(options); } diff --git a/src/executable/TypiaSetupWizard.ts b/src/executable/TypiaSetupWizard.ts index 0258d16239..a36eaf4e6a 100644 --- a/src/executable/TypiaSetupWizard.ts +++ b/src/executable/TypiaSetupWizard.ts @@ -19,7 +19,7 @@ export namespace TypiaSetupWizard { // PREPARE ASSETS const pack: PackageManager = await PackageManager.mount(); - const args: IArguments = await ArgumentParser.parse(pack)(inquiry); + const args: IArguments = await ArgumentParser.parse(pack, inquiry); // INSTALL TYPESCRIPT COMPILERS pack.install({ @@ -159,8 +159,8 @@ export namespace TypiaSetupWizard { > => { const result: DetectResult | null = await detect({ cwd: process.cwd() }); switch (result?.name) { - case 'npm': - case 'deno': + case "npm": + case "deno": return null; // NPM case is still selectable & Deno is not supported default: return result?.name ?? null; diff --git a/src/executable/setup/ArgumentParser.ts b/src/executable/setup/ArgumentParser.ts index f692ab7b32..f72cf92358 100644 --- a/src/executable/setup/ArgumentParser.ts +++ b/src/executable/setup/ArgumentParser.ts @@ -11,33 +11,32 @@ export namespace ArgumentParser { action: (closure: (options: Partial) => Promise) => Promise, ) => Promise; - export const parse = - (pack: PackageManager) => - async ( - inquiry: ( - pack: PackageManager, - command: commander.Command, - prompt: (opt?: inquirer.StreamOptions) => inquirer.PromptModule, - action: (closure: (options: Partial) => Promise) => Promise, - ) => Promise, - ): Promise => { - // TAKE OPTIONS - const action = (closure: (options: Partial) => Promise) => - new Promise((resolve, reject) => { - commander.program.action(async (options) => { - try { - resolve(await closure(options)); - } catch (exp) { - reject(exp); - } - }); - commander.program.parseAsync().catch(reject); + export const parse = async ( + pack: PackageManager, + inquiry: ( + pack: PackageManager, + command: commander.Command, + prompt: (opt?: inquirer.StreamOptions) => inquirer.PromptModule, + action: (closure: (options: Partial) => Promise) => Promise, + ) => Promise, + ): Promise => { + // TAKE OPTIONS + const action = (closure: (options: Partial) => Promise) => + new Promise((resolve, reject) => { + commander.program.action(async (options) => { + try { + resolve(await closure(options)); + } catch (exp) { + reject(exp); + } }); - return inquiry( - pack, - commander.program, - inquirer.createPromptModule, - action, - ); - }; + commander.program.parseAsync().catch(reject); + }); + return inquiry( + pack, + commander.program, + inquirer.createPromptModule, + action, + ); + }; } diff --git a/src/executable/setup/FileRetriever.ts b/src/executable/setup/FileRetriever.ts index 35a5ab27b7..092582a2ad 100644 --- a/src/executable/setup/FileRetriever.ts +++ b/src/executable/setup/FileRetriever.ts @@ -2,21 +2,18 @@ import fs from "fs"; import path from "path"; export namespace FileRetriever { - export const directory = - (name: string) => - (dir: string, depth: number = 0): string | null => { - const location: string = path.join(dir, name); - if (fs.existsSync(location)) return dir; - else if (depth > 2) return null; - return directory(name)(path.join(dir, ".."), depth + 1); - }; - - export const file = - (name: string) => - (directory: string, depth: number = 0): string | null => { - const location: string = path.join(directory, name); - if (fs.existsSync(location)) return location; - else if (depth > 2) return null; - return file(name)(path.join(directory, ".."), depth + 1); - }; + export const directory = (props: { + file: string; + location: string; + depth?: number; + }): string | null => { + const location: string = path.join(props.location, props.file); + if (fs.existsSync(location)) return props.location; + else if ((props.depth ?? 0) > 2) return null; + return directory({ + file: props.file, + location: path.join(props.location, ".."), + depth: (props.depth ?? 0) + 1, + }); + }; } diff --git a/src/executable/setup/PackageManager.ts b/src/executable/setup/PackageManager.ts index decd067e49..61f1dc82a7 100644 --- a/src/executable/setup/PackageManager.ts +++ b/src/executable/setup/PackageManager.ts @@ -11,9 +11,10 @@ export class PackageManager { } public static async mount(): Promise { - const location: string | null = await FileRetriever.directory( - "package.json", - )(process.cwd()); + const location: string | null = await FileRetriever.directory({ + file: "package.json", + location: process.cwd(), + }); if (location === null) throw new URIError(`Unable to find "package.json" file`); diff --git a/src/factories/ExpressionFactory.ts b/src/factories/ExpressionFactory.ts index 46c53763c0..71e1a1b4c0 100644 --- a/src/factories/ExpressionFactory.ts +++ b/src/factories/ExpressionFactory.ts @@ -1,6 +1,8 @@ import ts from "typescript"; -import { RandomGenerator } from "../utils/RandomGenerator"; +import { ImportProgrammer } from "../programmers/ImportProgrammer"; + +import { _randomFormatUuid } from "../internal/_randomFormatUuid"; export namespace ExpressionFactory { export const number = (value: number) => @@ -31,68 +33,75 @@ export namespace ExpressionFactory { [input], ); - export const isObject = - (options: { checkNull: boolean; checkArray: boolean }) => - (input: ts.Expression): ts.Expression => { - const conditions: ts.Expression[] = [ + export const isObject = (props: { + checkNull: boolean; + checkArray: boolean; + input: ts.Expression; + }): ts.Expression => { + const conditions: ts.Expression[] = [ + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("object"), + ts.factory.createTypeOfExpression(props.input), + ), + ]; + if (props.checkNull === true) + conditions.push( + ts.factory.createStrictInequality(ts.factory.createNull(), props.input), + ); + if (props.checkArray === true) + conditions.push( ts.factory.createStrictEquality( - ts.factory.createStringLiteral("object"), - ts.factory.createTypeOfExpression(input), - ), - ]; - if (options.checkNull === true) - conditions.push( - ts.factory.createStrictInequality(ts.factory.createNull(), input), - ); - if (options.checkArray === true) - conditions.push( - ts.factory.createStrictEquality( - ts.factory.createFalse(), - ts.factory.createCallExpression( - ts.factory.createIdentifier("Array.isArray"), - undefined, - [input], - ), + ts.factory.createFalse(), + ts.factory.createCallExpression( + ts.factory.createIdentifier("Array.isArray"), + undefined, + [props.input], ), - ); + ), + ); - return conditions.length === 1 - ? conditions[0]! - : conditions.reduce((x, y) => ts.factory.createLogicalAnd(x, y)); - }; + return conditions.length === 1 + ? conditions[0]! + : conditions.reduce((x, y) => ts.factory.createLogicalAnd(x, y)); + }; - export const isInstanceOf = - (type: string) => - (input: ts.Expression): ts.Expression => { - return ts.factory.createBinaryExpression( - input, - ts.factory.createToken(ts.SyntaxKind.InstanceOfKeyword), - ts.factory.createIdentifier(type), - ); - }; + export const isInstanceOf = ( + type: string, + input: ts.Expression, + ): ts.Expression => { + return ts.factory.createBinaryExpression( + input, + ts.factory.createToken(ts.SyntaxKind.InstanceOfKeyword), + ts.factory.createIdentifier(type), + ); + }; - export const coalesce = - (x: ts.Expression) => - (y: ts.Expression): ts.Expression => - ts.factory.createBinaryExpression( - x, - ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), - y, - ); + export const coalesce = (x: ts.Expression, y: ts.Expression): ts.Expression => + ts.factory.createBinaryExpression( + x, + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), + y, + ); - export const currying = - (target: ts.Expression) => (parameters: ts.Expression[]) => { - if (parameters.length === 0) - return ts.factory.createCallExpression(target, undefined, undefined); - let prev: ts.CallExpression = ts.factory.createCallExpression( - target, + export const currying = (props: { + function: ts.Expression; + arguments: ts.Expression[]; + }): ts.CallExpression => { + if (props.arguments.length === 0) + return ts.factory.createCallExpression( + props.function, + undefined, undefined, - [parameters[0]!], ); - for (const param of parameters.slice(1)) - prev = ts.factory.createCallExpression(prev, undefined, [param]); - return prev; - }; + let prev: ts.CallExpression = ts.factory.createCallExpression( + props.function, + undefined, + [props.arguments[0]!], + ); + for (const param of props.arguments.slice(1)) + prev = ts.factory.createCallExpression(prev, undefined, [param]); + return prev; + }; export const selfCall = (body: ts.ConciseBody) => ts.isCallExpression(body) @@ -112,39 +121,96 @@ export namespace ExpressionFactory { undefined, ); - export const getEscapedText = - (printer: ts.Printer) => - (input: ts.Expression): string => - printer.printNode(ts.EmitHint.Expression, input, input.getSourceFile()); + export const getEscapedText = (props: { + printer: ts.Printer; + input: ts.Expression; + }): string => + props.printer.printNode( + ts.EmitHint.Expression, + props.input, + props.input.getSourceFile(), + ); - export const transpile = - (context: ts.TransformationContext) => (script: string) => { - const file: ts.SourceFile = ts.createSourceFile( - `${RandomGenerator.uuid()}.ts`, - script, - ts.ScriptTarget.ESNext, - true, - ts.ScriptKind.TS, + export const transpile = (props: { + transformer?: ts.TransformationContext; + importer?: ImportProgrammer; + script: string; + }) => { + const file: ts.SourceFile = ts.createSourceFile( + `${_randomFormatUuid()}.ts`, + props.script, + ts.ScriptTarget.ESNext, + true, + ts.ScriptKind.TS, + ); + const statement: ts.Statement | undefined = file.statements[0]; + if (statement === undefined) + throw new ReferenceError( + "Error on ExpressionFactory.transpile(): no statement exists.", ); - const statement: ts.Statement | undefined = file.statements[0]; - if (statement === undefined) - throw new ReferenceError( - "Error on ExpressionFactory.transpile(): no statement exists.", - ); - else if (!ts.isExpressionStatement(statement)) - throw new TypeError( - "Error on ExpressionFactory.transpile(): statement is not an expression statement.", + else if (!ts.isExpressionStatement(statement)) + throw new TypeError( + "Error on ExpressionFactory.transpile(): statement is not an expression statement.", + ); + return (input: ts.Expression): ts.Expression => { + const visitor = (node: ts.Node): ts.Node => { + if (ts.isIdentifier(node) && node.text === "$input") return input; + else if (props.importer !== undefined && ts.isCallExpression(node)) + if ( + node.expression.getText() === "$importInternal" && + node.arguments.length === 1 && + ts.isStringLiteralLike(node.arguments[0]!) + ) { + const name: string = node.arguments[0]!.text; + return props.importer.internal(name); + } else if ( + node.expression.getText() === "$importInstance" && + node.arguments.length === 2 && + ts.isStringLiteralLike(node.arguments[0]!) && + ts.isStringLiteralLike(node.arguments[1]!) + ) { + const name: string = node.arguments[0]!.text; + const file: string = node.arguments[1]!.text; + return props.importer.instance({ + file, + name, + alias: null, + }); + } else if ( + node.expression.getText() === "$importNamespace" && + node.arguments.length === 2 && + ts.isStringLiteralLike(node.arguments[0]!) && + ts.isStringLiteralLike(node.arguments[1]!) + ) { + const name: string = node.arguments[0]!.text; + const file: string = node.arguments[1]!.text; + return props.importer.namespace({ + file, + name, + }); + } else if ( + node.expression.getText() === "$importDefault" && + node.arguments.length === 3 && + ts.isStringLiteralLike(node.arguments[0]!) && + ts.isStringLiteralLike(node.arguments[1]!) + ) { + const name: string = node.arguments[0]!.text; + const file: string = node.arguments[1]!.text; + return props.importer.default({ + file, + name, + type: false, + }); + } + return ts.visitEachChild( + ts.factory.cloneNode(node), + visitor, + props.transformer, ); - return (input: ts.Expression): ts.Expression => { - const visitor = (node: ts.Node): ts.Node => { - if (ts.isIdentifier(node) && node.text === "$input") return input; - return ts.visitEachChild( - (ts.factory as any).cloneNode(node), - visitor, - context, - ); - }; - return visitor(statement.expression) as ts.Expression; }; + return visitor( + ts.factory.cloneNode(statement.expression), + ) as ts.Expression; }; + }; } diff --git a/src/factories/IdentifierFactory.ts b/src/factories/IdentifierFactory.ts index 99c1c12b4f..740ac7e8b5 100644 --- a/src/factories/IdentifierFactory.ts +++ b/src/factories/IdentifierFactory.ts @@ -10,11 +10,27 @@ export namespace IdentifierFactory { ? ts.factory.createIdentifier(name) : ts.factory.createStringLiteral(name); - export const access = (target: ts.Expression) => (property: string) => { - const postfix = identifier(property); + export const access = ( + input: ts.Expression, + key: string, + chain?: boolean, + ) => { + const postfix = identifier(key); return ts.isStringLiteral(postfix) - ? ts.factory.createElementAccessExpression(target, postfix) - : ts.factory.createPropertyAccessExpression(target, postfix); + ? chain === true + ? ts.factory.createElementAccessChain( + input, + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + postfix, + ) + : ts.factory.createElementAccessExpression(input, postfix) + : chain === true + ? ts.factory.createPropertyAccessChain( + input, + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + postfix, + ) + : ts.factory.createPropertyAccessExpression(input, postfix); }; export const getName = (input: ts.Expression): string => { @@ -29,7 +45,7 @@ export namespace IdentifierFactory { return `${getName(input.expression)}[${getName( input.argumentExpression, )}]`; - return "uknown"; + return "unknown"; }; export const postfix = (str: string): string => @@ -39,8 +55,11 @@ export namespace IdentifierFactory { export const parameter = ( name: string | ts.BindingName, - type?: ts.TypeNode, - init?: ts.Expression | ts.PunctuationToken, + type?: ts.TypeNode | undefined, + init?: + | ts.Expression + | ts.PunctuationToken + | undefined, ): ts.ParameterDeclaration => { // instead of ts.version >= "4.8" if (ts.getDecorators !== undefined) diff --git a/src/factories/JsonMetadataFactory.ts b/src/factories/JsonMetadataFactory.ts index ed607b0781..acce43b319 100644 --- a/src/factories/JsonMetadataFactory.ts +++ b/src/factories/JsonMetadataFactory.ts @@ -6,28 +6,48 @@ import { AtomicPredicator } from "../programmers/helpers/AtomicPredicator"; import { TransformerError } from "../transformers/TransformerError"; +import { ValidationPipe } from "../typings/ValidationPipe"; + import { MetadataCollection } from "./MetadataCollection"; import { MetadataFactory } from "./MetadataFactory"; export namespace JsonMetadataFactory { - export const analyze = - (method: string) => - (checker: ts.TypeChecker, context?: ts.TransformationContext) => - (type: ts.Type): [MetadataCollection, Metadata] => { - const collection = new MetadataCollection(); - const result = MetadataFactory.analyze( - checker, - context, - )({ - escape: true, - constant: true, - absorb: true, - validate, - })(collection)(type); - if (result.success === false) - throw TransformerError.from(method)(result.errors); - return [collection, result.data]; + export interface IProps { + method: string; + checker: ts.TypeChecker; + transformer?: ts.TransformationContext; + type: ts.Type; + } + export interface IOutput { + collection: MetadataCollection; + metadata: Metadata; + } + + export const analyze = (props: IProps): IOutput => { + const collection: MetadataCollection = new MetadataCollection(); + const result: ValidationPipe = + MetadataFactory.analyze({ + checker: props.checker, + transformer: props.transformer, + options: { + escape: true, + constant: true, + absorb: true, + validate, + }, + collection, + type: props.type, + }); + if (result.success === false) + throw TransformerError.from({ + code: props.method, + errors: result.errors, + }); + return { + collection, + metadata: result.data, }; + }; export const validate = (meta: Metadata) => { const output: string[] = []; @@ -46,8 +66,11 @@ export namespace JsonMetadataFactory { if (meta.maps.length) output.push("JSON does not support Map type."); if (meta.sets.length) output.push("JSON does not support Set type."); for (const native of meta.natives) - if (AtomicPredicator.native(native) === false && native !== "Date") - output.push(`JSON does not support ${native} type.`); + if ( + AtomicPredicator.native(native.name) === false && + native.name !== "Date" + ) + output.push(`JSON does not support ${native.name} type.`); return output; }; } diff --git a/src/factories/LiteralFactory.ts b/src/factories/LiteralFactory.ts index 6b39802bb6..5c46726e83 100644 --- a/src/factories/LiteralFactory.ts +++ b/src/factories/LiteralFactory.ts @@ -4,15 +4,15 @@ import { ExpressionFactory } from "./ExpressionFactory"; import { IdentifierFactory } from "./IdentifierFactory"; export namespace LiteralFactory { - export const generate = (input: any): ts.Expression => { + export const write = (input: any): ts.Expression => { if (input === null) return ts.factory.createNull(); else if (ts.isIdentifier(input)) return input; - else if (input instanceof Array) return generate_array(input); - else if (typeof input === "object") return generate_object(input); - else if (typeof input === "string") return generate_string(input); - else if (typeof input === "boolean") return generate_value(input); - else if (typeof input === "number") return generate_value(input); - else if (typeof input === "bigint") return generate_bigint(input); + else if (input instanceof Array) return writeArray(input); + else if (typeof input === "object") return writeObject(input); + else if (typeof input === "boolean") return writeBoolean(input); + else if (typeof input === "bigint") return writeBigint(input); + else if (typeof input === "number") return writeNumber(input); + else if (typeof input === "string") return writeStrinng(input); // unreachable code else if (typeof input === "function") return ts.factory.createIdentifier("undefined"); @@ -20,28 +20,31 @@ export namespace LiteralFactory { throw new TypeError("Error on LiteralFactory.generate(): unknown type."); }; - const generate_object = (obj: object): ts.ObjectLiteralExpression => + const writeObject = (obj: object): ts.ObjectLiteralExpression => ts.factory.createObjectLiteralExpression( Object.entries(obj) .filter((tuple) => tuple[1] !== undefined) .map(([key, value]) => ts.factory.createPropertyAssignment( IdentifierFactory.identifier(key), - generate(value), + write(value), ), ), true, ); - const generate_array = (array: any[]): ts.ArrayLiteralExpression => - ts.factory.createArrayLiteralExpression(array.map(generate), true); + const writeArray = (array: any[]): ts.ArrayLiteralExpression => + ts.factory.createArrayLiteralExpression(array.map(write), true); - const generate_value = (value: number | boolean | bigint): ts.Expression => - ts.factory.createIdentifier(value.toString()); + const writeBoolean = (value: boolean): ts.Expression => + value ? ts.factory.createTrue() : ts.factory.createFalse(); - const generate_bigint = (value: bigint): ts.Expression => + const writeNumber = (value: number): ts.Expression => + ExpressionFactory.number(value); + + const writeBigint = (value: bigint): ts.Expression => ExpressionFactory.bigint(value); - const generate_string = (value: string): ts.StringLiteral => + const writeStrinng = (value: string): ts.StringLiteral => ts.factory.createStringLiteral(value); } diff --git a/src/factories/MetadataCollection.ts b/src/factories/MetadataCollection.ts index 3793a21344..6feeb4b7d8 100644 --- a/src/factories/MetadataCollection.ts +++ b/src/factories/MetadataCollection.ts @@ -2,9 +2,9 @@ import ts from "typescript"; import { IMetadataComponents } from "../schemas/metadata/IMetadataComponents"; import { Metadata } from "../schemas/metadata/Metadata"; -import { MetadataAlias } from "../schemas/metadata/MetadataAlias"; +import { MetadataAliasType } from "../schemas/metadata/MetadataAliasType"; import { MetadataArrayType } from "../schemas/metadata/MetadataArrayType"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; import { MetadataTupleType } from "../schemas/metadata/MetadataTupleType"; import { Writable } from "../typings/Writable"; @@ -15,9 +15,9 @@ import { CommentFactory } from "./CommentFactory"; import { TypeFactory } from "./TypeFactory"; export class MetadataCollection { - private objects_: Map; - private object_unions_: Map; - private aliases_: Map; + private objects_: Map; + private object_unions_: Map; + private aliases_: Map; private arrays_: Map; private tuples_: Map; @@ -26,9 +26,7 @@ export class MetadataCollection { private recursive_array_index_: number; private recursive_tuple_index_: number; - public constructor( - private readonly options?: Partial, - ) { + public constructor(private options?: Partial) { this.objects_ = new Map(); this.object_unions_ = new Map(); this.aliases_ = new Map(); @@ -42,7 +40,7 @@ export class MetadataCollection { } public clone(): MetadataCollection { - const output: MetadataCollection = new MetadataCollection(); + const output: MetadataCollection = new MetadataCollection(this.options); output.objects_ = new Map(this.objects_); output.object_unions_ = new Map(this.object_unions_); output.aliases_ = new Map(this.aliases_); @@ -58,15 +56,15 @@ export class MetadataCollection { /* ----------------------------------------------------------- ACCESSORS ----------------------------------------------------------- */ - public aliases(): MetadataAlias[] { + public aliases(): MetadataAliasType[] { return [...this.aliases_.values()]; } - public objects(): MetadataObject[] { + public objects(): MetadataObjectType[] { return [...this.objects_.values()]; } - public unions(): MetadataObject[][] { + public unions(): MetadataObjectType[][] { return [...this.object_unions_.values()]; } @@ -80,11 +78,15 @@ export class MetadataCollection { private getName(checker: ts.TypeChecker, type: ts.Type): string { const name: string = (() => { - const str: string = TypeFactory.getFullName(checker)(type); + const str: string = TypeFactory.getFullName({ + checker, + type, + }); return this.options?.replace ? this.options.replace(str) : str; })(); - const duplicates: Map = MapUtil.take(this.names_)( + const duplicates: Map = MapUtil.take( + this.names_, name, () => new Map(), ); @@ -102,8 +104,10 @@ export class MetadataCollection { * @internal */ public getUnionIndex(meta: Metadata): number { - const key: string = meta.objects.map((obj) => obj.name).join(" | "); - MapUtil.take(this.object_unions_)(key, () => meta.objects); + const key: string = meta.objects.map((obj) => obj.type.name).join(" | "); + MapUtil.take(this.object_unions_, key, () => + meta.objects.map((o) => o.type), + ); return [...this.object_unions_.keys()].indexOf(key); } @@ -113,13 +117,13 @@ export class MetadataCollection { public emplace( checker: ts.TypeChecker, type: ts.Type, - ): [MetadataObject, boolean] { + ): [MetadataObjectType, boolean] { const oldbie = this.objects_.get(type); if (oldbie !== undefined) return [oldbie, false]; - const $id: string = this.getName(checker, type); - const obj: MetadataObject = MetadataObject.create({ - name: $id, + const id: string = this.getName(checker, type); + const obj: MetadataObjectType = MetadataObjectType.create({ + name: id, properties: [], description: (type.aliasSymbol && CommentFactory.description(type.aliasSymbol)) ?? @@ -140,13 +144,13 @@ export class MetadataCollection { checker: ts.TypeChecker, type: ts.Type, symbol: ts.Symbol, - ): [MetadataAlias, boolean, (meta: Metadata) => void] { + ): [MetadataAliasType, boolean, (meta: Metadata) => void] { const oldbie = this.aliases_.get(type); if (oldbie !== undefined) return [oldbie, false, () => {}]; - const $id: string = this.getName(checker, type); - const alias: MetadataAlias = MetadataAlias.create({ - name: $id, + const id: string = this.getName(checker, type); + const alias: MetadataAliasType = MetadataAliasType.create({ + name: id, value: null!, description: CommentFactory.description(symbol) ?? null, recursive: null!, @@ -164,9 +168,9 @@ export class MetadataCollection { const oldbie = this.arrays_.get(type); if (oldbie !== undefined) return [oldbie, false, () => {}]; - const $id = this.getName(checker, type); + const id = this.getName(checker, type); const array: MetadataArrayType = MetadataArrayType.create({ - name: $id, + name: id, value: null!, index: null, recursive: null!, @@ -183,9 +187,9 @@ export class MetadataCollection { const oldbie = this.tuples_.get(type); if (oldbie !== undefined) return [oldbie, false, () => {}]; - const $id = this.getName(checker, type); + const id = this.getName(checker, type); const tuple: MetadataTupleType = MetadataTupleType.create({ - name: $id, + name: id, elements: null!, index: null, recursive: null!, @@ -198,14 +202,14 @@ export class MetadataCollection { /** * @internal */ - public setObjectRecursive(obj: MetadataObject, recursive: boolean): void { + public setObjectRecursive(obj: MetadataObjectType, recursive: boolean): void { Writable(obj).recursive = recursive; } /** * @internal */ - public setAliasRecursive(alias: MetadataAlias, recursive: boolean): void { + public setAliasRecursive(alias: MetadataAliasType, recursive: boolean): void { Writable(alias).recursive = recursive; } diff --git a/src/factories/MetadataCommentTagFactory.ts b/src/factories/MetadataCommentTagFactory.ts index 05f4fc0163..860077440b 100644 --- a/src/factories/MetadataCommentTagFactory.ts +++ b/src/factories/MetadataCommentTagFactory.ts @@ -10,185 +10,257 @@ import { MetadataFactory } from "./MetadataFactory"; import { MetadataTypeTagFactory } from "./MetadataTypeTagFactory"; /** - * Extremely hard coded, but no reason to maintain. - * * @internal */ export namespace MetadataCommentTagFactory { - export const analyze = - (errors: MetadataFactory.IError[]) => - (metadata: Metadata) => - ( - commentList: ts.JSDocTagInfo[], - explore: MetadataFactory.IExplore, - ): void => { - // PREPARE MESSAGE CONTAINER - const messages: string[] = []; - const report = (msg: string) => { - messages.push(msg); - return null; - }; - const validateReport = - (property: string | null) => - (msg: string): false => { - messages.push( - `the property ${ - property === null ? `["typia.tag"]` : `["typia.tag.${property}"]` - } ${msg}.`, - ); - return false; - }; + export const analyze = (props: { + errors: MetadataFactory.IError[]; + metadata: Metadata; + tags: ts.JSDocTagInfo[]; + explore: MetadataFactory.IExplore; + }): void => { + // PREPARE MESSAGE CONTAINER + const messages: string[] = []; + const report = (msg: string) => { + messages.push(msg); + return null; + }; + const validateReport = (next: { + property: string | null; + message: string; + }): false => { + messages.push( + `the property ${ + next.property === null + ? `["typia.tag"]` + : `["typia.tag.${next.property}"]` + } ${next.message}.`, + ); + return false; + }; - // VALIDATE AND CONSTRUCT COMMENT TAGS - for (const comment of commentList) { - const tagger: TagRecord | null = parse(report)(comment); - if (tagger === null) continue; - for (const [key, value] of Object.entries(tagger)) { - const filtered: IMetadataTypeTag[] = value.filter( - (v) => v.validate !== null, - ) as IMetadataTypeTag[]; - if (key === "array") { - if (metadata.arrays.length === 0) { - report(`requires array type`); - continue; - } - for (const a of metadata.arrays) { - Writable(a).tags = a.tags.filter((x) => - MetadataTypeTagFactory.validate(validateReport)("array")([ - ...x, - ...filtered, - ]), - ); - if (a.tags.length === 0) a.tags.push(filtered); - else for (const tags of a.tags) tags.push(...filtered); - } - } else { - const atomic = metadata.atomics.find((a) => a.type == key); - if (atomic === undefined) - if (key === "bigint" || key === "number") { - const opposite = key === "bigint" ? "number" : "bigint"; - if ( - tagger[opposite] !== undefined && - metadata.atomics.some((a) => a.type === opposite) - ) - continue; - } else if ( - key === "string" && - value[0]?.kind === "format" && - value[0]?.value === "date-time" + // VALIDATE AND CONSTRUCT COMMENT TAGS + for (const tag of props.tags) { + const tagger: TagRecord | null = parse({ + report, + tag, + }); + if (tagger === null) continue; + for (const [key, value] of Object.entries(tagger)) { + const filtered: IMetadataTypeTag[] = value.filter( + (v) => v.validate !== null, + ) as IMetadataTypeTag[]; + if (key === "array") { + if (props.metadata.arrays.length === 0) { + report(`requires array type`); + continue; + } + for (const a of props.metadata.arrays) { + Writable(a).tags = a.tags.filter((x) => + MetadataTypeTagFactory.validate({ + report: validateReport, + type: "array", + tags: [...x, ...filtered], + }), + ); + if (a.tags.length === 0) a.tags.push(filtered); + else for (const tags of a.tags) tags.push(...filtered); + } + } else { + const atomic = props.metadata.atomics.find((a) => a.type == key); + if (atomic === undefined) + if (key === "bigint" || key === "number") { + const opposite = key === "bigint" ? "number" : "bigint"; + if ( + tagger[opposite] !== undefined && + props.metadata.atomics.some((a) => a.type === opposite) ) continue; - else report(`requires ${key} type`); - else { - Writable(atomic).tags = atomic.tags.filter((x) => - MetadataTypeTagFactory.validate(validateReport)( - key as "string", - )([...x, ...filtered]), - ); - if (atomic.tags.length === 0) atomic.tags.push(filtered); - else for (const tags of atomic.tags) tags.push(...filtered); - } + } else if ( + key === "string" && + value[0]?.kind === "format" && + value[0]?.value === "date-time" + ) + continue; + else report(`requires ${key} type`); + else { + Writable(atomic).tags = atomic.tags.filter((x) => + MetadataTypeTagFactory.validate({ + report: validateReport, + type: key as "string", + tags: [...x, ...filtered], + }), + ); + if (atomic.tags.length === 0) atomic.tags.push(filtered); + else for (const tags of atomic.tags) tags.push(...filtered); } } } + } - // DO REPORT - if (messages.length !== 0) - errors.push({ - name: "comment tag(s)", - explore, - messages, - }); - }; + // DO REPORT + if (messages.length !== 0) + props.errors.push({ + name: "comment tag(s)", + explore: props.explore, + messages, + }); + }; - const parse = - (report: (msg: string) => null) => - (comment: ts.JSDocTagInfo): TagRecord | null => { - const parser = PARSER[comment.name]; - if (parser === undefined) return {}; + const parse = (props: { + report: (msg: string) => null; + tag: ts.JSDocTagInfo; + }): TagRecord | null => { + const next = PARSER[props.tag.name]; + if (next === undefined) return {}; - const text = (comment.text || [])[0]?.text; - if (text === undefined && comment.name !== "uniqueItems") - return report(`no comment tag value`); - return parser(report)(text!); - }; + const value = (props.tag.text || [])[0]?.text; + if (value === undefined && props.tag.name !== "uniqueItems") + return props.report(`no comment tag value`); + return next({ + report: props.report, + value: value!, + }); + }; + + export const get = (props: { + kind: string; + type: "array" | "bigint" | "number" | "string"; + value: string; + }): IMetadataTypeTag[] => { + const output: IMetadataTypeTag[] | undefined = PARSER[props.kind]?.({ + report: () => null, + value: props.value, + })?.[props.type]; + if (output === undefined) + throw new Error( + `no tag found for (kind: ${props.kind}, type: ${props.type}).`, + ); + return output; + }; } +/** + * @internal + */ type TagRecord = { [P in Target]?: NotDeterminedTypeTag[]; }; + +/** + * @internal + */ type Target = "bigint" | "number" | "string" | "array"; + +/** + * @internal + */ type NotDeterminedTypeTag = Omit & { - validate: string | null; + validate: string | undefined; schema: object | undefined; }; +/** + * @internal + */ const PARSER: Record< string, - (report: (msg: string) => null) => (text: string) => { + (props: { report: (msg: string) => null; value: string }) => { [P in Target]?: NotDeterminedTypeTag[]; } > = { /* ----------------------------------------------------------- ARRAY ----------------------------------------------------------- */ - items: (report) => (Value) => ({ + items: ({ report, value }) => ({ array: [ { - name: `MinItems<${Value}>`, + name: `MinItems<${value}>`, target: "array", kind: "minItems", - value: parse_integer(report)(true)(Value), - validate: `${Value} <= $input.length`, + value: parse_integer({ + report, + value, + unsigned: true, + }), + validate: `${value} <= $input.length`, exclusive: true, schema: { - minItems: parse_integer(report)(true)(Value), + minItems: parse_integer({ + report, + value, + unsigned: true, + }), }, }, { - name: `MaxItems<${Value}>`, + name: `MaxItems<${value}>`, target: "array", kind: "maxItems", - value: parse_integer(report)(true)(Value), - validate: `$input.length <= ${Value}`, + value: parse_integer({ + report, + value, + unsigned: true, + }), + validate: `$input.length <= ${value}`, exclusive: true, schema: { - maxItems: parse_integer(report)(true)(Value), + maxItems: parse_integer({ + report, + unsigned: true, + value, + }), }, }, ], }), - minItems: (report) => (Value) => ({ + minItems: ({ report, value }) => ({ array: [ { - name: `MinItems<${Value}>`, + name: `MinItems<${value}>`, target: "array", kind: "minItems", - value: parse_integer(report)(true)(Value), - validate: `${Value} <= $input.length`, + value: parse_integer({ + report, + value, + unsigned: true, + }), + validate: `${value} <= $input.length`, exclusive: true, schema: { - minItems: parse_integer(report)(true)(Value), + minItems: parse_integer({ + report, + value, + unsigned: true, + }), }, }, ], }), - maxItems: (report) => (Value) => ({ + maxItems: ({ report, value }) => ({ array: [ { - name: `MaxItems<${Value}>`, + name: `MaxItems<${value}>`, target: "array", kind: "maxItems", - value: parse_integer(report)(true)(Value), - validate: `$input.length <= ${Value}`, + value: parse_integer({ + report, + value, + unsigned: true, + }), + validate: `$input.length <= ${value}`, exclusive: true, schema: { - maxItems: parse_integer(report)(true)(Value), + maxItems: parse_integer({ + report, + value, + unsigned: true, + }), }, }, ], }), - uniqueItems: () => () => ({ + uniqueItems: () => ({ array: [ { name: `UniqueItems`, @@ -207,205 +279,237 @@ const PARSER: Record< /* ----------------------------------------------------------- NUMBER ----------------------------------------------------------- */ - type: () => (Value) => { + type: ({ value }) => { // EMENDATIONS - if (Value.startsWith("{") && Value.endsWith("}")) - Value = Value.substring(1, Value.length - 1); - if (Value === "int") Value = "int32"; - else if (Value === "uint") Value = "uint32"; + if (value.startsWith("{") && value.endsWith("}")) + value = value.substring(1, value.length - 1); + if (value === "int") value = "int32"; + else if (value === "uint") value = "uint32"; // MUST BE ONE OF THEM if ( ["int32", "uint32", "int64", "uint64", "float", "double"].includes( - Value, + value, ) === false ) return {}; return { number: [ { - name: `Type<${JSON.stringify(Value)}>`, + name: `Type<${JSON.stringify(value)}>`, target: "number", kind: "type", - value: Value, + value: value, validate: - Value === "int32" + value === "int32" ? `Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647` - : Value === "uint32" + : value === "uint32" ? `Math.floor($input) === $input && 0 <= $input && $input <= 4294967295` - : Value === "int64" + : value === "int64" ? `Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807` - : Value === "uint64" + : value === "uint64" ? `Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615` - : Value === "float" + : value === "float" ? `-1.175494351e38 <= $input && $input <= 3.4028235e38` : `true`, exclusive: true, - schema: ["int32", "uint32", "int64", "uint64"].includes(Value) + schema: ["int32", "uint32", "int64", "uint64"].includes(value) ? { type: "integer" } : undefined, }, ], bigint: - Value === "int64" || "uint64" + value === "int64" || "uint64" ? [ { - name: `Type<${JSON.stringify(Value)}>`, + name: `Type<${JSON.stringify(value)}>`, target: "bigint", kind: "type", - value: Value, - validate: Value === "int64" ? "true" : "BigInt(0) <= $input", + value: value, + validate: value === "int64" ? "true" : "BigInt(0) <= $input", exclusive: true, - schema: undefined, + schema: value === "uint64" ? { minimum: 0 } : undefined, }, ] : [], }; }, - minimum: (report) => (Value) => ({ + minimum: (props) => ({ number: [ { - name: `Minimum<${Value}>`, + name: `Minimum<${props.value}>`, target: "number", kind: "minimum", - value: parse_number(report)(Value), - validate: `${Value} <= $input`, + value: parse_number(props), + validate: `${props.value} <= $input`, exclusive: ["minimum", "exclusiveMinimum"], schema: { - minimum: parse_number(report)(Value), + minimum: parse_number(props), }, }, ], bigint: [ { - name: `Minimum<${Value}n>`, + name: `Minimum<${props.value}n>`, target: "bigint", kind: "minimum", value: (() => { - const value = parse_integer(report)(false)(Value); - return value === null ? null : BigInt(value); + const parsed = parse_integer({ + report: props.report, + value: props.value, + unsigned: false, + }); + return parsed === null ? null : BigInt(parsed); })(), - validate: `${Value} <= $input`, + validate: `${props.value} <= $input`, exclusive: ["minimum", "exclusiveMinimum"], - schema: undefined, + schema: { + minimum: parse_number(props), + }, }, ], }), - maximum: (report) => (Value) => ({ + maximum: (props) => ({ number: [ { - name: `Maximum<${Value}>`, + name: `Maximum<${props.value}>`, target: "number", kind: "maximum", - value: parse_number(report)(Value), - validate: `$input <= ${Value}`, + value: parse_number(props), + validate: `$input <= ${props.value}`, exclusive: ["maximum", "exclusiveMaximum"], schema: { - maximum: parse_number(report)(Value), + maximum: parse_number(props), }, }, ], bigint: [ { - name: `Maximum<${Value}n>`, + name: `Maximum<${props.value}n>`, target: "bigint", kind: "maximum", value: (() => { - const value = parse_integer(report)(false)(Value); - return value === null ? null : BigInt(value); + const parsed = parse_integer({ + report: props.report, + value: props.value, + unsigned: false, + }); + return parsed === null ? null : BigInt(parsed); })(), - validate: `$input <= ${Value}`, + validate: `$input <= ${props.value}`, exclusive: ["maximum", "exclusiveMaximum"], - schema: undefined, + schema: { + maximum: parse_number(props), + }, }, ], }), - exclusiveMinimum: (report) => (Value) => ({ + exclusiveMinimum: (props) => ({ number: [ { - name: `ExclusiveMinimum<${Value}>`, + name: `ExclusiveMinimum<${props.value}>`, target: "number", kind: "exclusiveMinimum", - value: parse_number(report)(Value), - validate: `${Value} < $input`, + value: parse_number(props), + validate: `${props.value} < $input`, exclusive: ["minimum", "exclusiveMinimum"], schema: { exclusiveMinimum: true, - minimum: parse_number(report)(Value), + minimum: parse_number(props), }, }, ], bigint: [ { - name: `ExclusiveMinimum<${Value}n>`, + name: `ExclusiveMinimum<${props.value}n>`, target: "bigint", kind: "exclusiveMinimum", value: (() => { - const value = parse_integer(report)(false)(Value); - return value === null ? null : BigInt(value); + const parsed = parse_integer({ + report: props.report, + value: props.value, + unsigned: false, + }); + return parsed === null ? null : BigInt(parsed); })(), - validate: `${Value} < $input`, + validate: `${props.value} < $input`, exclusive: ["minimum", "exclusiveMinimum"], - schema: undefined, + schema: { + exclusiveMinimum: true, + minimum: parse_number(props), + }, }, ], }), - exclusiveMaximum: (report) => (Value) => ({ + exclusiveMaximum: (props) => ({ number: [ { - name: `ExclusiveMaximum<${Value}>`, + name: `ExclusiveMaximum<${props.value}>`, target: "number", kind: "exclusiveMaximum", - value: parse_number(report)(Value), - validate: `$input < ${Value}`, + value: parse_number(props), + validate: `$input < ${props.value}`, exclusive: ["maximum", "exclusiveMaximum"], schema: { exclusiveMaximum: true, - maximum: parse_number(report)(Value), + maximum: parse_number(props), }, }, ], bigint: [ { - name: `ExclusiveMaximum<${Value}n>`, + name: `ExclusiveMaximum<${props.value}n>`, target: "bigint", kind: "exclusiveMaximum", value: (() => { - const value = parse_integer(report)(false)(Value); - return value === null ? null : BigInt(value); + const parsed = parse_integer({ + report: props.report, + value: props.value, + unsigned: false, + }); + return parsed === null ? null : BigInt(parsed); })(), - validate: `$input < ${Value}`, + validate: `$input < ${props.value}`, exclusive: ["maximum", "exclusiveMaximum"], - schema: undefined, + schema: { + exclusiveMaximum: true, + maximum: parse_number(props), + }, }, ], }), - multipleOf: (report) => (Value) => ({ + multipleOf: (props) => ({ number: [ { - name: `MultipleOf<${Value}>`, + name: `MultipleOf<${props.value}>`, target: "number", kind: "multipleOf", - value: parse_number(report)(Value), - validate: `$input % ${Value} === 0`, + value: parse_number(props), + validate: `$input % ${props.value} === 0`, exclusive: true, schema: { - multipleOf: parse_number(report)(Value), + multipleOf: parse_number(props), }, }, ], bigint: [ { - name: `MultipleOf<${Value}n>`, + name: `MultipleOf<${props.value}n>`, target: "bigint", kind: "multipleOf", value: (() => { - const value = parse_integer(report)(false)(Value); - return value === null ? null : BigInt(value); + const parsed = parse_integer({ + report: props.report, + value: props.value, + unsigned: false, + }); + return parsed === null ? null : BigInt(parsed); })(), - validate: `$input % ${Value}n === 0n`, + validate: `$input % ${props.value}n === 0n`, exclusive: true, - schema: undefined, + schema: { + multipleOf: parse_number(props), + }, }, ], }), @@ -413,8 +517,8 @@ const PARSER: Record< /* ----------------------------------------------------------- STRING ----------------------------------------------------------- */ - format: () => (Value) => { - const matched = FORMATS.get(Value); + format: ({ value }) => { + const matched = FORMATS.get(value); if (matched === undefined) return {}; return { string: [ @@ -432,99 +536,111 @@ const PARSER: Record< ], }; }, - pattern: () => (Value) => ({ + pattern: ({ value }) => ({ string: [ { - name: `Pattern<${JSON.stringify(Value)}>`, + name: `Pattern<${JSON.stringify(value)}>`, target: "string", kind: "pattern", - value: Value, - validate: `RegExp(${JSON.stringify(Value)}).test($input)`, + value: value, + validate: `RegExp(${JSON.stringify(value)}).test($input)`, exclusive: ["format"], schema: { - pattern: Value, + pattern: value, }, }, ], }), - length: (report) => (Value) => ({ + length: (props) => ({ string: [ { - name: `MinLength<${Value}>`, + name: `MinLength<${props.value}>`, target: "string", kind: "minLength", - value: parse_number(report)(Value), - validate: `${Value} <= $input.length`, + value: parse_number(props), + validate: `${props.value} <= $input.length`, exclusive: true, schema: { - minLength: parse_number(report)(Value), + minLength: parse_number(props), }, }, { - name: `MaxLength<${Value}>`, + name: `MaxLength<${props.value}>`, target: "string", kind: "maxLength", - value: parse_number(report)(Value), - validate: `$input.length <= ${Value}`, + value: parse_number(props), + validate: `$input.length <= ${props.value}`, exclusive: true, schema: { - maxLength: parse_number(report)(Value), + maxLength: parse_number(props), }, }, ], }), - minLength: (report) => (Value) => ({ + minLength: ({ report, value }) => ({ string: [ { - name: `MinLength<${Value}>`, + name: `MinLength<${value}>`, target: "string", kind: "minLength", - value: parse_number(report)(Value), - validate: `${Value} <= $input.length`, + value: parse_number({ report, value }), + validate: `${value} <= $input.length`, exclusive: true, schema: { - minLength: parse_number(report)(Value), + minLength: parse_number({ report, value }), }, }, ], }), - maxLength: (report) => (Value) => ({ + maxLength: ({ report, value }) => ({ string: [ { - name: `MaxLength<${Value}>`, + name: `MaxLength<${value}>`, target: "string", kind: "maxLength", - value: parse_number(report)(Value), - validate: `$input.length <= ${Value}`, + value: parse_number({ report, value }), + validate: `$input.length <= ${value}`, exclusive: true, schema: { - maxLength: parse_number(report)(Value), + maxLength: parse_number({ report, value }), }, }, ], }), }; -const parse_number = - (report: (msg: string) => null) => - (str: string): number | null => { - const value: number = Number(str); - if (isNaN(value) === true) return report(`invalid number`); - return value; - }; +/** + * @internal + */ +const parse_number = (props: { + report: (msg: string) => null; + value: string; +}): number | null => { + const parsed: number = Number(props.value); + if (isNaN(parsed) === true) return props.report(`invalid number`); + return parsed; +}; -const parse_integer = - (report: (msg: string) => null) => - (unsigned: boolean) => - (str: string): number | null => { - const value: number | null = parse_number(report)(str); - if (value === null) return null; - else if (Math.floor(value) !== value) return report(`invalid integer`); - else if (unsigned === true && value < 0) - return report(`invalid unsigned integer`); - return value; - }; +/** + * @internal + */ +const parse_integer = (props: { + report: (msg: string) => null; + unsigned: boolean; + value: string; +}): number | null => { + const parsed: number | null = parse_number(props); + if (parsed === null) return null; + else if (Math.floor(parsed) !== parsed) + return props.report(`invalid integer`); + else if (props.unsigned === true && parsed < 0) + return props.report(`invalid unsigned integer`); + return parsed; +}; +/** + * @internal + */ const FORMATS: Map = new Map([ ...Object.entries(FormatCheatSheet).map( ([key, value]) => [key, [key, value]] as any, diff --git a/src/factories/MetadataFactory.ts b/src/factories/MetadataFactory.ts index 266bebd147..07f5f60ee8 100644 --- a/src/factories/MetadataFactory.ts +++ b/src/factories/MetadataFactory.ts @@ -1,11 +1,12 @@ import ts from "typescript"; import { Metadata } from "../schemas/metadata/Metadata"; -import { MetadataAlias } from "../schemas/metadata/MetadataAlias"; +import { MetadataAliasType } from "../schemas/metadata/MetadataAliasType"; import { MetadataArrayType } from "../schemas/metadata/MetadataArrayType"; import { MetadataConstant } from "../schemas/metadata/MetadataConstant"; import { MetadataFunction } from "../schemas/metadata/MetadataFunction"; import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; import { MetadataTupleType } from "../schemas/metadata/MetadataTupleType"; import { explore_metadata } from "./internal/metadata/explore_metadata"; import { iterate_metadata_collection } from "./internal/metadata/iterate_metadata_collection"; @@ -19,6 +20,13 @@ import { MetadataCollection } from "./MetadataCollection"; export namespace MetadataFactory { export type Validator = (meta: Metadata, explore: IExplore) => string[]; + export interface IProps { + checker: ts.TypeChecker; + transformer: ts.TransformationContext | undefined; + options: IOptions; + collection: MetadataCollection; + type: ts.Type | null; + } export interface IOptions { escape: boolean; constant: boolean; @@ -27,12 +35,11 @@ export namespace MetadataFactory { validate?: Validator; onError?: (node: ts.Node | undefined, message: string) => void; } - export interface IExplore { top: boolean; - object: MetadataObject | null; + object: MetadataObjectType | null; property: string | object | null; - nested: null | MetadataAlias | MetadataArrayType | MetadataTupleType; + nested: null | MetadataAliasType | MetadataArrayType | MetadataTupleType; parameter: string | null; output: boolean; escaped: boolean; @@ -45,15 +52,12 @@ export namespace MetadataFactory { messages: string[]; } - export const analyze = - (checker: ts.TypeChecker, context?: ts.TransformationContext) => - (options: IOptions) => - (collection: MetadataCollection) => - (type: ts.Type | null): ValidationPipe => { - const errors: IError[] = []; - const meta: Metadata = explore_metadata(checker)(options)(collection)( - errors, - )(type, { + export const analyze = (props: IProps): ValidationPipe => { + const errors: IError[] = []; + const metadata: Metadata = explore_metadata({ + ...props, + errors, + explore: { top: true, object: null, property: null, @@ -62,22 +66,37 @@ export namespace MetadataFactory { aliased: false, escaped: false, output: false, - }); - iterate_metadata_collection(errors)(collection); - iterate_metadata_sort(collection)(meta); + }, + intersected: false, + }); + iterate_metadata_collection({ + errors, + collection: props.collection, + }); + iterate_metadata_sort({ + collection: props.collection, + metadata: metadata, + }); - if (options.validate) - errors.push(...validate(context)(options)(options.validate)(meta)); - return errors.length - ? { - success: false, - errors, - } - : { - success: true, - data: meta, - }; - }; + if (props.options.validate) + errors.push( + ...validate({ + transformer: props.transformer, + options: props.options, + functor: props.options.validate, + metadata, + }), + ); + return errors.length + ? { + success: false, + errors, + } + : { + success: true, + data: metadata, + }; + }; /** * @internal @@ -89,7 +108,7 @@ export namespace MetadataFactory { values: [ { value, - tags: undefined, + tags: [], }, ], type: "string", @@ -98,21 +117,25 @@ export namespace MetadataFactory { return meta; }; - export const validate = - (context?: ts.TransformationContext) => - (options: IOptions) => - (functor: Validator) => - (meta: Metadata): IError[] => { - const visitor: IValidationVisitor = { - functor, - errors: [], - objects: new Set(), - arrays: new Set(), - tuples: new Set(), - aliases: new Set(), - functions: new Set(), - }; - validateMeta(context)(options)(visitor)(meta, { + export const validate = (props: { + transformer?: ts.TransformationContext; + options: IOptions; + functor: Validator; + metadata: Metadata; + }): IError[] => { + const visitor: IValidationVisitor = { + functor: props.functor, + errors: [], + objects: new Set(), + arrays: new Set(), + tuples: new Set(), + aliases: new Set(), + functions: new Set(), + }; + validateMeta({ + ...props, + visitor, + explore: { object: null, property: null, parameter: null, @@ -121,149 +144,205 @@ export namespace MetadataFactory { aliased: false, escaped: false, output: false, - }); - return visitor.errors; - }; + }, + }); + return visitor.errors; + }; - const validateMeta = - (context?: ts.TransformationContext) => - (options: IOptions) => - (visitor: IValidationVisitor) => - (meta: Metadata, explore: IExplore) => { - const result: string[] = []; - if (context !== undefined) - for (const atomic of meta.atomics) - for (const row of atomic.tags) - for (const tag of row.filter( - (t) => t.validate !== undefined && t.predicate === undefined, - )) - try { - tag.predicate = ExpressionFactory.transpile(context)( - tag.validate!, - ); - } catch { - result.push( - `Unable to transpile type tag script: ${JSON.stringify( - tag.validate, - )}`, - ); - tag.predicate = () => ts.factory.createTrue(); - } - result.push(...visitor.functor(meta, explore)); - if (result.length) - visitor.errors.push({ - name: meta.getName(), - explore: { ...explore }, - messages: [...new Set(result)], - }); + const validateMeta = (props: { + options: IOptions; + visitor: IValidationVisitor; + metadata: Metadata; + explore: IExplore; + }) => { + const result: string[] = []; + for (const atomic of props.metadata.atomics) + for (const row of atomic.tags) + for (const tag of row.filter( + (t) => t.validate !== undefined && t.predicate === undefined, + )) + try { + tag.predicate = ExpressionFactory.transpile({ + script: tag.validate!, + }); + } catch { + result.push( + `Unable to transpile type tag script: ${JSON.stringify( + tag.validate, + )}`, + ); + tag.predicate = () => ts.factory.createTrue(); + } + result.push(...props.visitor.functor(props.metadata, props.explore)); + if (result.length) + props.visitor.errors.push({ + name: props.metadata.getName(), + explore: { ...props.explore }, + messages: [...new Set(result)], + }); - for (const alias of meta.aliases) - validateAlias(context)(options)(visitor)(alias, explore); - for (const array of meta.arrays) - validateArray(context)(options)(visitor)(array.type, explore); - for (const tuple of meta.tuples) - validateTuple(context)(options)(visitor)(tuple.type, explore); - for (const obj of meta.objects) - validateObject(context)(options)(visitor)(obj); - for (const func of meta.functions) - validateFunction(context)(options)(visitor)(func, explore); - for (const set of meta.sets) - validateMeta(context)(options)(visitor)(set, explore); - for (const map of meta.maps) { - validateMeta(context)(options)(visitor)(map.key, explore); - validateMeta(context)(options)(visitor)(map.value, explore); - } + for (const alias of props.metadata.aliases) + validateAlias({ + ...props, + alias: alias.type, + }); + for (const array of props.metadata.arrays) + validateArray({ + ...props, + array: array.type, + }); + for (const tuple of props.metadata.tuples) + validateTuple({ + ...props, + tuple: tuple.type, + }); + for (const object of props.metadata.objects) + validateObject({ + ...props, + object: object.type, + }); + for (const func of props.metadata.functions) + validateFunction({ + ...props, + function: func, + }); + for (const set of props.metadata.sets) + validateMeta({ + ...props, + metadata: set.value, + }); + for (const map of props.metadata.maps) { + validateMeta({ + ...props, + metadata: map.key, + }); + validateMeta({ + ...props, + metadata: map.value, + }); + } - if (options.escape === true && meta.escaped !== null) - validateMeta(context)(options)(visitor)(meta.escaped.returns, { - ...explore, + if (props.options.escape === true && props.metadata.escaped !== null) + validateMeta({ + ...props, + metadata: props.metadata.escaped.returns, + explore: { + ...props.explore, escaped: true, - }); - }; + }, + }); + }; - const validateAlias = - (context?: ts.TransformationContext) => - (options: IOptions) => - (visitor: IValidationVisitor) => - (alias: MetadataAlias, explore: IExplore) => { - if (visitor.aliases.has(alias)) return; - visitor.aliases.add(alias); + const validateAlias = (props: { + transformer?: ts.TransformationContext; + options: IOptions; + visitor: IValidationVisitor; + alias: MetadataAliasType; + explore: IExplore; + }) => { + if (props.visitor.aliases.has(props.alias)) return; + props.visitor.aliases.add(props.alias); - validateMeta(context)(options)(visitor)(alias.value, { - ...explore, - nested: alias, + validateMeta({ + ...props, + metadata: props.alias.value, + explore: { + ...props.explore, + nested: props.alias, aliased: true, - }); - }; + }, + }); + }; - const validateArray = - (context?: ts.TransformationContext) => - (options: IOptions) => - (visitor: IValidationVisitor) => - (array: MetadataArrayType, explore: IExplore) => { - if (visitor.arrays.has(array)) return; - visitor.arrays.add(array); + const validateArray = (props: { + transformer?: ts.TransformationContext; + options: IOptions; + visitor: IValidationVisitor; + array: MetadataArrayType; + explore: IExplore; + }) => { + if (props.visitor.arrays.has(props.array)) return; + props.visitor.arrays.add(props.array); - validateMeta(context)(options)(visitor)(array.value, { - ...explore, - nested: array, + validateMeta({ + ...props, + metadata: props.array.value, + explore: { + ...props.explore, + nested: props.array, top: false, - }); - }; + }, + }); + }; - const validateTuple = - (context?: ts.TransformationContext) => - (options: IOptions) => - (visitor: IValidationVisitor) => - (tuple: MetadataTupleType, explore: IExplore) => { - if (visitor.tuples.has(tuple)) return; - visitor.tuples.add(tuple); + const validateTuple = (props: { + transformer?: ts.TransformationContext; + options: IOptions; + visitor: IValidationVisitor; + tuple: MetadataTupleType; + explore: IExplore; + }) => { + if (props.visitor.tuples.has(props.tuple)) return; + props.visitor.tuples.add(props.tuple); - for (const elem of tuple.elements) - validateMeta(context)(options)(visitor)(elem, { - ...explore, - nested: tuple, + for (const elem of props.tuple.elements) + validateMeta({ + ...props, + metadata: elem, + explore: { + ...props.explore, + nested: props.tuple, top: false, - }); - }; + }, + }); + }; - const validateObject = - (context?: ts.TransformationContext) => - (options: IOptions) => - (visitor: IValidationVisitor) => - (object: MetadataObject) => { - if (visitor.objects.has(object)) return; - visitor.objects.add(object); + const validateObject = (props: { + transformer?: ts.TransformationContext; + options: IOptions; + visitor: IValidationVisitor; + object: MetadataObjectType; + }) => { + if (props.visitor.objects.has(props.object)) return; + props.visitor.objects.add(props.object); - if (options.validate) { - const explore: IExplore = { - object, - top: false, - property: null, - parameter: null, - nested: null, - aliased: false, - escaped: false, - output: false, - }; - const errors: string[] = options.validate( - Metadata.create({ - ...Metadata.initialize(), - objects: [object], - }), + if (props.options.validate) { + const explore: IExplore = { + object: props.object, + top: false, + property: null, + parameter: null, + nested: null, + aliased: false, + escaped: false, + output: false, + }; + const errors: string[] = props.options.validate( + Metadata.create({ + ...Metadata.initialize(), + objects: [ + MetadataObject.create({ + type: props.object, + tags: [], + }), + ], + }), + explore, + ); + if (errors.length) + props.visitor.errors.push({ + name: props.object.name, explore, - ); - if (errors.length) - visitor.errors.push({ - name: object.name, - explore, - messages: [...new Set(errors)], - }); - } + messages: [...new Set(errors)], + }); + } - for (const property of object.properties) - validateMeta(context)(options)(visitor)(property.value, { - object, + for (const property of props.object.properties) + validateMeta({ + ...props, + metadata: property.value, + explore: { + object: props.object, property: property.key.isSoleLiteral() ? property.key.getSoleLiteral()! : {}, @@ -273,42 +352,53 @@ export namespace MetadataFactory { aliased: false, escaped: false, output: false, - }); - }; + }, + }); + }; - const validateFunction = - (context?: ts.TransformationContext) => - (options: IOptions) => - (visitor: IValidationVisitor) => - (func: MetadataFunction, explore: IExplore) => { - if (visitor.functions.has(func)) return; - visitor.functions.add(func); + const validateFunction = (props: { + transformer?: ts.TransformationContext; + options: IOptions; + visitor: IValidationVisitor; + function: MetadataFunction; + explore: IExplore; + }) => { + if (props.visitor.functions.has(props.function)) return; + props.visitor.functions.add(props.function); - for (const param of func.parameters) - validateMeta(context)(options)(visitor)(param.type, { - ...explore, + for (const param of props.function.parameters) + validateMeta({ + ...props, + metadata: param.type, + explore: { + ...props.explore, parameter: param.name, nested: null, top: false, output: false, - }); - if (func.output) - validateMeta(context)(options)(visitor)(func.output, { - ...explore, + }, + }); + if (props.function.output) + validateMeta({ + ...props, + metadata: props.function.output, + explore: { + ...props.explore, parameter: null, nested: null, top: false, output: true, - }); - }; + }, + }); + }; interface IValidationVisitor { functor: Validator; errors: IError[]; - objects: Set; + objects: Set; arrays: Set; tuples: Set; - aliases: Set; + aliases: Set; functions: Set; } } diff --git a/src/factories/MetadataTypeTagFactory.ts b/src/factories/MetadataTypeTagFactory.ts index 4fd0411e83..e781097470 100644 --- a/src/factories/MetadataTypeTagFactory.ts +++ b/src/factories/MetadataTypeTagFactory.ts @@ -1,330 +1,405 @@ import { IMetadataTypeTag } from "../schemas/metadata/IMetadataTypeTag"; import { Metadata } from "../schemas/metadata/Metadata"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../schemas/metadata/MetadataProperty"; import { MetadataFactory } from "./MetadataFactory"; import { MetadataTypeTagSchemaFactory } from "./MetadataTypeTagSchemaFactory"; export namespace MetadataTypeTagFactory { - export const analyze = - (errors: MetadataFactory.IError[]) => - (type: "boolean" | "bigint" | "number" | "string" | "array") => - ( - objects: MetadataObject[], - explore: MetadataFactory.IExplore, - ): IMetadataTypeTag[] => { - const messages: string[] = []; - const report = - (property: string | null) => - (msg: string): false => { - messages.push( - `the property ${ - property === null ? `["typia.tag"]` : `["typia.tag.${property}"]` - } ${msg}.`, - ); - return false; - }; + export const is = (obj: MetadataObjectType): boolean => { + if (obj.properties.length !== 1) return false; - //---- - // VALIDATION PROCESS - //---- - const filtered: MetadataObject[] = objects.filter((obj) => { - // ONLY ONE PROPERTY - if (obj.properties.length !== 1) return false; + const top: MetadataProperty = obj.properties[0]!; + if (top.key.isSoleLiteral() === false) return false; + else if (top.key.getSoleLiteral() !== "typia.tag") return false; - // THE TAG.TYPE PROPERTY MUST BE - const top: MetadataProperty = obj.properties[0]!; - if ( - top.key.getSoleLiteral() !== "typia.tag" || - top.value.size() !== 1 || - top.value.objects.length !== 1 - ) - return false; - else if (top.value.optional === false) - return report(null)("must be optional object"); + const value: Metadata = top.value; + if ( + value.size() !== 1 || + value.objects.length !== 1 || + value.isRequired() === true || + value.nullable === true + ) + return false; - // CHECK LIST OF PROPERTIES - const tag: MetadataObject = top.value.objects[0]!; - const statics: string[] = tag.properties - .map((p) => p.key.getSoleLiteral()!) - .filter((str) => str !== null); - if (ESSENTIAL_FIELDS.some((f) => !statics.includes(f))) - return report(null)( - `must have at least three properties - ${ESSENTIAL_FIELDS.map( - (str) => `'${str}'`, - ).join(", ")}`, - ); + const tag: MetadataObjectType = top.value.objects[0]!.type; + const statics: string[] = tag.properties + .map((p) => p.key.getSoleLiteral()!) + .filter((str) => str !== null); + if (ESSENTIAL_FIELDS.some((f) => !statics.includes(f))) return false; + return true; + }; + + export const analyze = (props: { + errors: MetadataFactory.IError[]; + type: "boolean" | "bigint" | "number" | "string" | "array" | "object"; + objects: MetadataObjectType[]; + explore: MetadataFactory.IExplore; + }): IMetadataTypeTag[] => { + const messages: string[] = []; + const report = (next: { + property: string | null; + message: string; + }): false => { + messages.push( + `the property ${ + next.property === null + ? `["typia.tag"]` + : `["typia.tag.${next.property}"]` + } ${next.message}.`, + ); + return false; + }; - const each: boolean[] = tag.properties.map((p) => { - const key: string | null = p.key.getSoleLiteral(); - if (key === null) return true; - else if (FIELDS.includes(key) === false) return true; - return validate_property(report)(key, p.value); + //---- + // VALIDATION PROCESS + //---- + const filtered: MetadataObjectType[] = props.objects.filter((obj) => { + // ONLY ONE PROPERTY + if (obj.properties.length !== 1) return false; + + // THE TAG.TYPE PROPERTY MUST BE + const top: MetadataProperty = obj.properties[0]!; + if ( + top.key.getSoleLiteral() !== "typia.tag" || + top.value.size() !== 1 || + top.value.objects.length !== 1 + ) + return false; + else if (top.value.optional === false) + return report({ + property: null, + message: "must be optional object", + }); + + // CHECK LIST OF PROPERTIES + const tag: MetadataObjectType = top.value.objects[0]!.type; + const statics: string[] = tag.properties + .map((p) => p.key.getSoleLiteral()!) + .filter((str) => str !== null); + if (ESSENTIAL_FIELDS.some((f) => !statics.includes(f))) + return report({ + property: null, + message: `must have at least three properties - ${ESSENTIAL_FIELDS.map( + (str) => `'${str}'`, + ).join(", ")}`, + }); + + const each: boolean[] = tag.properties.map((p) => { + const key: string | null = p.key.getSoleLiteral(); + if (key === null) return true; + else if (FIELDS.includes(key) === false) return true; + return validate_property({ + report, + key, + value: p.value, }); - return each.every((v) => v === true); }); - if (filtered.length === 0) return []; + return each.every((v) => v === true); + }); + if (filtered.length === 0) return []; - //---- - // CONSTRUCT TYPE TAGS - //---- - // CREATE 1ST - const tagList: Array = filtered.map( - create_metadata_type_tag(report), - ); + //---- + // CONSTRUCT TYPE TAGS + //---- + // CREATE 1ST + const tagList: Array = filtered.map((object) => + create_metadata_type_tag({ + report, + object, + }), + ); - const output: IMetadataTypeTag[] = []; - for (const tag of tagList) - if (tag !== null) - output.push({ - target: tag.target.some((str) => str === type) ? type : null!, - name: tag.name, - kind: tag.kind, - value: tag.value, - validate: tag.validate[type]!, - exclusive: tag.exclusive, - schema: tag.schema, - }); - validate(report)(type)(output); + const output: IMetadataTypeTag[] = []; + for (const tag of tagList) + if (tag !== null) + output.push({ + target: tag.target.some((str) => str === props.type) + ? props.type + : null!, + name: tag.name, + kind: tag.kind, + value: tag.value, + validate: tag.validate[props.type]!, + exclusive: tag.exclusive, + schema: tag.schema, + }); + validate({ + report, + type: props.type, + tags: output, + }); + + if (messages.length > 0) { + props.errors.push({ + name: [props.type, ...props.objects.map((o) => o.name)].join(" & "), + explore: props.explore, + messages, + }); + return []; + } + return output; + }; - if (messages.length > 0) { - errors.push({ - name: [type, ...objects.map((o) => o.name)].join(" & "), - explore, - messages, + export const validate = (props: { + report: (next: { property: string | null; message: string }) => false; + type: "boolean" | "bigint" | "number" | "string" | "array" | "object"; + tags: IMetadataTypeTag[]; + }): boolean => { + let success: boolean = true; + for (const tag of props.tags) + if (tag.target !== props.type) { + success &&= props.report({ + property: null, + message: `target must constains ${props.type} type`, }); - return []; } - return output; - }; - export const validate = - (report: (property: string | null) => (msg: string) => false) => - (type: "boolean" | "bigint" | "number" | "string" | "array") => - (tagList: IMetadataTypeTag[]): boolean => { - let success: boolean = true; - for (const tag of tagList) - if (tag.target !== type) { - success &&= report(null)(`target must constains ${type} type`); - } + props.tags.forEach((tag, i) => { + if (tag.exclusive === false) return; + else if (tag.exclusive === true) { + const some: boolean = props.tags.some( + (opposite, j) => i !== j && opposite.kind === tag.kind, + ); + if (some === true) + success &&= props.report({ + property: null, + message: `kind '${tag.kind}' can't be duplicated`, + }); + } else if (Array.isArray(tag.exclusive)) { + const some: IMetadataTypeTag | undefined = props.tags.find( + (opposite, j) => + i !== j && + opposite.kind === tag.kind && + (tag.exclusive as string[]).includes(opposite.name), + ); + if (some !== undefined) + success ??= props.report({ + property: null, + message: `kind '${tag.kind}' can't be used with '${some.name}'`, + }); + } + }); + return success; + }; - tagList.forEach((tag, i) => { - if (tag.exclusive === false) return; - else if (tag.exclusive === true) { - const some: boolean = tagList.some( - (opposite, j) => i !== j && opposite.kind === tag.kind, - ); - if (some === true) - success &&= report(null)(`kind '${tag.kind}' can't be duplicated`); - } else if (Array.isArray(tag.exclusive)) { - const some: IMetadataTypeTag | undefined = tagList.find( - (opposite, j) => - i !== j && - opposite.kind === tag.kind && - (tag.exclusive as string[]).includes(opposite.name), - ); - if (some !== undefined) - success ??= report(null)( - `kind '${tag.kind}' can't be used with '${some.name}'`, - ); - } + const validate_property = (props: { + report: (next: { property: string | null; message: string }) => false; + key: string; + value: Metadata; + }): boolean => { + if ( + // TARGET + props.key === "target" && + (props.value.constants.length !== 1 || + props.value.constants[0]!.values.length !== props.value.size() || + props.value.constants[0]!.values.some( + (v) => + v.value !== "boolean" && + v.value !== "bigint" && + v.value !== "number" && + v.value !== "string" && + v.value !== "array" && + v.value !== "object", + )) + ) + return props.report({ + property: props.key, + message: `must be one of 'boolean', 'bigint', 'number', 'string', 'array', 'object'`, }); - return success; - }; - - const validate_property = - (report: (property: string | null) => (msg: string) => false) => - (key: string, value: Metadata): boolean => { + else if ( + // KIND + props.key === "kind" && + (props.value.size() !== 1 || + props.value.constants.length !== 1 || + props.value.constants[0]!.type !== "string" || + props.value.constants[0]!.values.length !== 1) + ) + return props.report({ + property: props.key, + message: "must be a string literal type", + }); + else if ( + // VALUE + props.key === "value" && + (props.value.size() > 1 || + (props.value.size() !== 0 && + (props.value.constants.length !== 1 || + props.value.constants[0]!.values.length !== 1))) + ) + return props.report({ + property: props.key, + message: "must be a constant literal type or undefined value", + }); + else if (props.key === "exclusive") return get_exclusive(props) !== null; + else if (props.key === "validate") { + //---- + // VALIDATE + //---- + // UNDEFINED CASE if ( - // TARGET - key === "target" && - (value.constants.length !== 1 || - value.constants[0]!.values.length !== value.size() || - value.constants[0]!.values.some( - (v) => - v.value !== "boolean" && - v.value !== "bigint" && - v.value !== "number" && - v.value !== "string" && - v.value !== "array", - )) - ) - return report(key)( - `must be one of 'boolean', 'bigint', 'number', 'string', 'array'`, - ); - else if ( - // KIND - key === "kind" && - (value.size() !== 1 || - value.constants.length !== 1 || - value.constants[0]!.type !== "string" || - value.constants[0]!.values.length !== 1) - ) - return report(key)("must be a string literal type"); - else if ( - // VALUE - key === "value" && - (value.size() > 1 || - (value.size() !== 0 && - (value.constants.length !== 1 || - value.constants[0]!.values.length !== 1))) + props.value.size() === 0 && + props.value.isRequired() === false && + props.value.nullable === false ) - return report(key)( - "must be a constant literal type or undefined value", - ); - else if (key === "exclusive") - return get_exclusive(report)(key)(value) !== null; - else if (key === "validate") { - //---- - // VALIDATE - //---- - // UNDEFINED CASE - if ( - value.size() === 0 && - value.isRequired() === false && - value.nullable === false - ) - return true; + return true; - // STRING CASE - if ( - value.size() === 1 && - value.constants.length === 1 && - value.constants[0]!.type === "string" && - (value.constants[0]!.values.length === 1) === true - ) - return true; + // STRING CASE + if ( + props.value.size() === 1 && + props.value.constants.length === 1 && + props.value.constants[0]!.type === "string" && + (props.value.constants[0]!.values.length === 1) === true + ) + return true; - // RECORD - const target: string[] | undefined = value.objects[0]?.properties + // RECORD + const target: string[] | undefined = + props.value.objects[0]?.type.properties .map((p) => p.key.getSoleLiteral()!) .filter((str) => str !== null) as string[] | undefined; - if (target === undefined) - return report("target")( - `must be one of 'boolean', 'bigint', 'number', 'string', 'array'`, - ); - const variadic: boolean = - value.size() === 1 && - value.objects.length === 1 && - value.objects[0]!.properties.every( - (vp) => - vp.value.size() === 1 && - vp.value.isRequired() && - vp.value.nullable === false && - vp.value.constants.length === 1 && - vp.value.constants[0]!.type === "string" && - vp.value.constants[0]!.values.length === 1 && - target.includes(vp.key.getSoleLiteral()!), - ); - if (variadic === false) - return report(key)( - `must be a string literal type or Record type.`, - ); - } - return true; - }; - - const create_metadata_type_tag = - (report: (property: string | null) => (msg: string) => false) => - (obj: MetadataObject): ITypeTag | null => { - const find = (key: string): MetadataProperty | undefined => - obj.properties[0]?.value.objects[0]?.properties.find( - (p) => p.key.getSoleLiteral() === key, + if (target === undefined) + return props.report({ + property: "target", + message: `must be one of 'boolean', 'bigint', 'number', 'string', 'array', 'object`, + }); + const variadic: boolean = + props.value.size() === 1 && + props.value.objects.length === 1 && + props.value.objects[0]!.type.properties.every( + (vp) => + vp.value.size() === 1 && + vp.value.isRequired() && + vp.value.nullable === false && + vp.value.constants.length === 1 && + vp.value.constants[0]!.type === "string" && + vp.value.constants[0]!.values.length === 1 && + target.includes(vp.key.getSoleLiteral()!), ); + if (variadic === false) + return props.report({ + property: props.key, + message: `must be a string literal type or Record type.`, + }); + } + return true; + }; - const target = find("target")!.value.constants[0]!.values.map( - (v) => v.value, - ) as ITypeTag["target"]; - const kind: string = find("kind")!.value.constants[0]!.values[0]! - .value as string; - const value: boolean | bigint | number | string | undefined = - find("value")?.value.constants[0]?.values[0]!.value; - const exclusive: string[] | boolean | null = get_exclusive(report)( - "exclusive", - )(find("exclusive")?.value); - if (exclusive === null) return null; + const create_metadata_type_tag = (props: { + report: (next: { property: string | null; message: string }) => false; + object: MetadataObjectType; + }): ITypeTag | null => { + const find = (key: string): MetadataProperty | undefined => + props.object.properties[0]?.value.objects[0]?.type.properties.find( + (p) => p.key.getSoleLiteral() === key, + ); + + const target = find("target")!.value.constants[0]!.values.map( + (v) => v.value, + ) as ITypeTag["target"]; + const kind: string = find("kind")!.value.constants[0]!.values[0]! + .value as string; + const value: boolean | bigint | number | string | undefined = + find("value")?.value.constants[0]?.values[0]!.value; + const exclusive: string[] | boolean | null = get_exclusive({ + report: props.report, + key: "exclusive", + value: find("exclusive")?.value, + }); + if (exclusive === null) return null; - const validate: Record = (() => { - const validate = find("validate")?.value; - if (!validate || validate.size() === 0) return {}; - else if (validate.constants.length) - return Object.fromEntries( - target.map((t) => [ - t, - validate.constants[0]!.values[0]!.value as string, - ]), - ); + const validate: Record = (() => { + const validate = find("validate")?.value; + if (!validate || validate.size() === 0) return {}; + else if (validate.constants.length) return Object.fromEntries( - validate.objects[0]!.properties.map((p) => [ - p.key.getSoleLiteral()!, - p.value.constants[0]!.values[0]!.value as string, + target.map((t) => [ + t, + validate.constants[0]!.values[0]!.value as string, ]), ); - })(); - const schema: object | undefined = (() => { - const p: Metadata | undefined = find("schema")?.value; - if (p === undefined) return undefined; - else if (p.size() === 0 && p.isRequired() === false) return undefined; - else if ( - p.size() === 1 && - p.nullable === false && - p.isRequired() === true && - p.any === false - ) - return MetadataTypeTagSchemaFactory.object((msg) => - report("schema")(msg), - )(p.objects[0]!); - report("schema")("must be an object type"); - return undefined; - })(); - return { - name: obj.name, - target, - kind, - value, - validate, - exclusive: exclusive ?? false, - schema, - }; - }; - - const get_exclusive = - (report: (property: string | null) => (msg: string) => false) => - (key: string) => - (value: Metadata | undefined): boolean | string[] | null => { - if (value === undefined) return false; + return Object.fromEntries( + validate.objects[0]!.type.properties.map((p) => [ + p.key.getSoleLiteral()!, + p.value.constants[0]!.values[0]!.value as string, + ]), + ); + })(); + const schema: object | undefined = (() => { + const p: Metadata | undefined = find("schema")?.value; + if (p === undefined) return undefined; + else if (p.size() === 0 && p.isRequired() === false) return undefined; else if ( - value.size() === 1 && - value.constants.length === 1 && - value.constants[0]!.type === "boolean" && - value.constants[0]!.values.length === 1 + p.size() === 1 && + p.nullable === false && + p.isRequired() === true && + p.any === false ) - return value.constants[0]!.values[0]!.value as boolean; - else if ( - value.size() === 1 && - value.tuples.length === 1 && - value.tuples[0]!.type.elements.every( - (elem) => - elem.size() === 1 && - elem.constants.length === 1 && - elem.constants[0]!.type === "string" && - elem.constants[0]!.values.length === 1, - ) + return MetadataTypeTagSchemaFactory.object({ + report: (message) => + props.report({ + property: "schema", + message, + }), + object: p.objects[0]!.type, + }); + props.report({ + property: "schema", + message: "must be an object type", + }); + return undefined; + })(); + return { + name: props.object.name, + target, + kind, + value, + validate, + exclusive: exclusive ?? false, + schema, + }; + }; + + const get_exclusive = (props: { + report: (next: { property: string | null; message: string }) => false; + key: string; + value: Metadata | undefined; + }): boolean | string[] | null => { + if (props.value === undefined) return false; + else if ( + props.value.size() === 1 && + props.value.constants.length === 1 && + props.value.constants[0]!.type === "boolean" && + props.value.constants[0]!.values.length === 1 + ) + return props.value.constants[0]!.values[0]!.value as boolean; + else if ( + props.value.size() === 1 && + props.value.tuples.length === 1 && + props.value.tuples[0]!.type.elements.every( + (elem) => + elem.size() === 1 && + elem.constants.length === 1 && + elem.constants[0]!.type === "string" && + elem.constants[0]!.values.length === 1, ) - return value.tuples[0]!.type.elements.map( - (elem) => elem.constants[0]!.values[0]!.value as string, - ); - report(key)( - "must a boolean literal type or a tuple of string literal types.", + ) + return props.value.tuples[0]!.type.elements.map( + (elem) => elem.constants[0]!.values[0]!.value as string, ); - return null; - }; + props.report({ + property: props.key, + message: + "must a boolean literal type or a tuple of string literal types.", + }); + return null; + }; } interface ITypeTag { name: string; - target: Array<"bigint" | "number" | "string" | "array">; + target: Array<"bigint" | "number" | "string" | "array" | "object">; kind: string; value?: undefined | boolean | bigint | number | string; validate: Record; diff --git a/src/factories/MetadataTypeTagSchemaFactory.ts b/src/factories/MetadataTypeTagSchemaFactory.ts index 63c2251938..2f660c4762 100644 --- a/src/factories/MetadataTypeTagSchemaFactory.ts +++ b/src/factories/MetadataTypeTagSchemaFactory.ts @@ -1,59 +1,82 @@ import { Metadata } from "../schemas/metadata/Metadata"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; export namespace MetadataTypeTagSchemaFactory { - export const object = - (report: (msg: string) => false) => - (obj: MetadataObject): object | undefined => { - if (obj.recursive) { - report(`${obj.name} has recursive type`); - return undefined; + export const object = (props: { + report: (msg: string) => false; + object: MetadataObjectType; + }): object | undefined => { + if (props.object.recursive) { + props.report(`${props.object.name} has recursive type`); + return undefined; + } + const output: any = {}; + for (const p of props.object.properties) { + const key: string | null = p.key.getSoleLiteral()!; + if (key === null) { + props.report( + `${props.object.name} has non-literal key type: ${p.key.getName()}`, + ); + continue; } - const output: any = {}; - for (const p of obj.properties) { - const key: string | null = p.key.getSoleLiteral()!; - if (key === null) { - report(`${obj.name} has non-literal key type: ${p.key.getName()}`); - continue; - } - output[key] = iterate(report)({ object: obj, key })(p.value); - } - return output; - }; + output[key] = iterate({ + report: props.report, + object: props.object, + key, + metadata: p.value, + }); + } + return output; + }; - const iterate = - (report: (msg: string) => false) => - (parent: { object: MetadataObject; key: string }) => - (meta: Metadata): any => { - if ( - meta.any || - meta.atomics.length || - meta.arrays.length || - meta.natives.length || - meta.functions.length - ) - report(`${parent.object.name}.${parent.key} has non-literal type`); - else if (meta.size() > 1) - report(`${parent.object.name}.${parent.key} has union type`); - else if (meta.size() === 0) - if (meta.nullable) return null; - else if (meta.isRequired() === true) - report(`${parent.object.name}.${parent.key} has non-literal type`); - else return undefined; - else if (meta.constants.length) - return meta.constants[0]!.values[0]!.value; - else if (meta.tuples.length) { - const tuple = meta.tuples[0]!; - if (tuple.type.isRest()) - report(`${parent.object.name}.${parent.key} has rest tuple type`); - else if (tuple.type.recursive) - report( - `${parent.object.name}.${parent.key} has recursive tuple type`, - ); - else if (tuple.type.elements.some((e) => e.required === false)) - report(`${parent.object.name}.${parent.key} has optional tuple type`); - return tuple.type.elements.map(iterate(report)(parent)); - } else if (meta.objects.length) return object(report)(meta.objects[0]!); - else report(`${parent.object.name}.${parent.key} has non-literal type`); - }; + const iterate = (props: { + report: (message: string) => false; + object: MetadataObjectType; + key: string; + metadata: Metadata; + }): any => { + if ( + props.metadata.any || + props.metadata.atomics.length || + props.metadata.arrays.length || + props.metadata.natives.length || + props.metadata.functions.length + ) + props.report(`${props.object.name}.${props.key} has non-literal type`); + else if (props.metadata.size() > 1) + props.report(`${props.object.name}.${props.key} has union type`); + else if (props.metadata.size() === 0) + if (props.metadata.nullable) return null; + else if (props.metadata.isRequired() === true) + props.report(`${props.object.name}.${props.key} has non-literal type`); + else return undefined; + else if (props.metadata.constants.length) + return props.metadata.constants[0]!.values[0]!.value; + else if (props.metadata.tuples.length) { + const tuple = props.metadata.tuples[0]!; + if (tuple.type.isRest()) + props.report(`${props.object.name}.${props.key} has rest tuple type`); + else if (tuple.type.recursive) + props.report( + `${props.object.name}.${props.key} has recursive tuple type`, + ); + else if (tuple.type.elements.some((e) => e.required === false)) + props.report( + `${props.object.name}.${props.key} has optional tuple type`, + ); + return tuple.type.elements.map((elem) => + iterate({ + report: props.report, + object: props.object, + key: props.key, + metadata: elem, + }), + ); + } else if (props.metadata.objects.length) + return object({ + report: props.report, + object: props.metadata.objects[0]!.type, + }); + else props.report(`${props.object.name}.${props.key} has non-literal type`); + }; } diff --git a/src/factories/NumericRangeFactory.ts b/src/factories/NumericRangeFactory.ts index 408ae73600..a9de878b00 100644 --- a/src/factories/NumericRangeFactory.ts +++ b/src/factories/NumericRangeFactory.ts @@ -5,15 +5,15 @@ import { ProtobufAtomic } from "../typings/ProtobufAtomic"; import { ExpressionFactory } from "./ExpressionFactory"; export namespace NumericRangeFactory { - export const number = - (type: ProtobufAtomic.Numeric) => - (input: ts.Expression): ts.Expression => - NumberPredicator[type](input); + export const number = ( + type: ProtobufAtomic.Numeric, + input: ts.Expression, + ): ts.Expression => NumberPredicator[type](input); - export const bigint = - (type: ProtobufAtomic.BigNumeric) => - (input: ts.Expression): ts.Expression => - BigIntPredicator[type](input); + export const bigint = ( + type: ProtobufAtomic.BigNumeric, + input: ts.Expression, + ): ts.Expression => BigIntPredicator[type](input); } namespace NumberPredicator { diff --git a/src/factories/ProtobufFactory.ts b/src/factories/ProtobufFactory.ts index f97731e0aa..ae9260f246 100644 --- a/src/factories/ProtobufFactory.ts +++ b/src/factories/ProtobufFactory.ts @@ -1,229 +1,842 @@ import ts from "typescript"; +import { IMetadataTypeTag } from "../schemas/metadata/IMetadataTypeTag"; import { Metadata } from "../schemas/metadata/Metadata"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; +import { MetadataProperty } from "../schemas/metadata/MetadataProperty"; +import { IProtobufProperty } from "../schemas/protobuf/IProtobufProperty"; +import { IProtobufPropertyType } from "../schemas/protobuf/IProtobufPropertyType"; +import { IProtobufSchema } from "../schemas/protobuf/IProtobufSchema"; import { ProtobufUtil } from "../programmers/helpers/ProtobufUtil"; import { TransformerError } from "../transformers/TransformerError"; +import { ProtobufAtomic } from "../typings/ProtobufAtomic"; import { ValidationPipe } from "../typings/ValidationPipe"; import { MetadataCollection } from "./MetadataCollection"; import { MetadataFactory } from "./MetadataFactory"; export namespace ProtobufFactory { - export const metadata = - (method: string) => - (checker: ts.TypeChecker, context?: ts.TransformationContext) => - (collection: MetadataCollection) => - (type: ts.Type): Metadata => { - // COMPOSE METADATA WITH INDIVIDUAL VALIDATIONS - const result: ValidationPipe = - MetadataFactory.analyze( - checker, - context, - )({ + export interface IProps { + method: string; + checker: ts.TypeChecker; + transformer?: ts.TransformationContext; + collection: MetadataCollection; + type: ts.Type; + } + + /* ----------------------------------------------------------- + METADATA COMPOSER + ----------------------------------------------------------- */ + export const metadata = (props: IProps): Metadata => { + // COMPOSE METADATA WITH INDIVIDUAL VALIDATIONS + const result: ValidationPipe = + MetadataFactory.analyze({ + ...props, + transformer: props.transformer, + options: { escape: false, constant: true, absorb: true, - validate, - })(collection)(type); - if (result.success === false) - throw TransformerError.from(`typia.protobuf.${method}`)(result.errors); - return result.data; + validate: validate(), + }, + }); + if (result.success === false) + throw TransformerError.from({ + code: `typia.protobuf.${props.method}`, + errors: result.errors, + }); + return result.data; + }; + + /** + * @internal + */ + export const emplaceObject = (object: MetadataObjectType): void => { + for (const p of object.properties) emplaceProperty(p); + const properties: IProtobufProperty[] = object.properties + .map((p) => p.of_protobuf_) + .filter((p) => p !== undefined); + const unique: Set = new Set( + properties + .filter((p) => p !== undefined) + .filter((p) => p.fixed === true) + .map((p) => p.union.map((u) => u.index)) + .flat(), + ); + let index: number = 1; + properties.forEach((schema) => { + if (schema.fixed === true) + index = Math.max( + index, + Math.max(...schema.union.map((u) => u.index)) + 1, + ); + else { + for (const u of schema.union) { + while (unique.has(index) === true) ++index; + u.index = index; + unique.add(index); + } + ++index; + } + }); + }; + + const emplaceProperty = (prop: MetadataProperty): void => { + const union: IProtobufPropertyType[] = []; + for (const native of prop.value.natives) + if (native.name === "Uint8Array") + union.push({ + type: "bytes", + index: ProtobufUtil.getSequence(native.tags[0] ?? [])!, + }); + union.push(...emplaceAtomic(prop.value).values()); + for (const array of prop.value.arrays) + union.push({ + type: "array", + array: array.type, + value: emplaceSchema( + array.type.value, + ) as IProtobufSchema.IArray["value"], + index: ProtobufUtil.getSequence(array.tags[0] ?? [])!, + }); + for (const obj of prop.value.objects) + if (isDynamicObject(obj.type)) + union.push({ + type: "map", + map: obj.type, + key: emplaceSchema( + obj.type.properties[0]!.key, + ) as IProtobufSchema.IMap["key"], + value: emplaceSchema( + obj.type.properties[0]!.value, + ) as IProtobufSchema.IMap["value"], + index: ProtobufUtil.getSequence(obj.tags[0] ?? [])!, + }); + else + union.push({ + type: "object", + object: obj.type, + index: ProtobufUtil.getSequence(obj.tags[0] ?? [])!, + }); + for (const map of prop.value.maps) + union.push({ + type: "map", + map, + key: emplaceSchema(map.key) as IProtobufSchema.IMap["key"], + value: emplaceSchema(map.value) as IProtobufSchema.IMap["value"], + index: ProtobufUtil.getSequence(map.tags[0] ?? [])!, + }); + prop.of_protobuf_ = { + union, + fixed: union.every((p) => p.index !== null), }; + }; + + const emplaceSchema = (metadata: Metadata): IProtobufSchema => { + for (const native of metadata.natives) + if (native.name === "Uint8Array") + return { + type: "bytes", + }; + const atomic = emplaceAtomic(metadata); + if (atomic.size) return atomic.values().next().value!; + for (const array of metadata.arrays) + return { + type: "array", + array: array.type, + value: emplaceSchema( + array.type.value, + ) as IProtobufSchema.IArray["value"], + }; + for (const obj of metadata.objects) + if (isDynamicObject(obj.type)) + return { + type: "map", + map: obj.type, + key: emplaceSchema( + obj.type.properties[0]!.key, + ) as IProtobufSchema.IMap["key"], + value: emplaceSchema( + obj.type.properties[0]!.value, + ) as IProtobufSchema.IMap["value"], + }; + else + return { + type: "object", + object: obj.type, + }; + for (const map of metadata.maps) + return { + type: "map", + map, + key: emplaceSchema(map.key) as IProtobufSchema.IMap["key"], + value: emplaceSchema(map.value) as IProtobufSchema.IMap["value"], + }; + throw new Error( + "Error on ProtobufFactory.emplaceSchema(): any type detected.", + ); + }; - const validate = ( + const emplaceAtomic = ( meta: Metadata, - explore: MetadataFactory.IExplore, - ): string[] => { - const errors: string[] = []; - const insert = (msg: string) => errors.push(msg); - - if (explore.top === true) { - const onlyObject: boolean = - meta.size() === 1 && - meta.objects.length === 1 && - meta.objects[0]!.properties.every((p) => p.key.isSoleLiteral()) && - meta.isRequired() === true && - meta.nullable === false; - if (onlyObject === false) - insert("target type must be a sole and static object type"); + ): Map => { + const map: Map = new Map(); + + // CONSTANTS + for (const c of meta.constants) + if (c.type === "boolean") + map.set("bool", { + type: "bool", + index: getSequence(c.values[0]?.tags[0] ?? [])!, + }); + else if (c.type === "bigint") { + const init: ProtobufAtomic.BigNumeric = getBigintType( + c.values.map((v) => BigInt(v.value)), + ); + for (const value of c.values) + emplaceBigint({ + map, + tags: value.tags, + init, + }); + } else if (c.type === "number") { + const init: ProtobufAtomic.Numeric = getNumberType( + c.values.map((v) => v.value) as number[], + ); + for (const value of c.values) + emplaceNumber({ + map, + tags: value.tags, + init, + }); + } else if (c.type === "string") + map.set("string", { + type: "string", + index: getSequence(c.values[0]?.tags[0] ?? [])!, + }); + + // TEMPLATE + if (meta.templates.length) + map.set("string", { + type: "string", + index: getSequence(meta.templates[0]?.tags[0] ?? [])!, + }); + + // ATOMICS + for (const atomic of meta.atomics) + if (atomic.type === "boolean") + map.set("bool", { + type: "bool", + index: getSequence(atomic.tags[0] ?? [])!, + }); + else if (atomic.type === "bigint") + emplaceBigint({ + map, + tags: atomic.tags, + init: "int64", + }); + else if (atomic.type === "number") + emplaceNumber({ + map, + tags: atomic.tags, + init: "double", + }); + else if (atomic.type === "string") + map.set("string", { + type: "string", + index: getSequence(atomic.tags[0] ?? [])!, + }); + + // SORTING FOR VALIDATION REASON + return new Map( + Array.from(map).sort((x, y) => ProtobufUtil.compare(x[0], y[0])), + ); + }; + + const emplaceBigint = (next: { + map: Map; + tags: IMetadataTypeTag[][]; + init: ProtobufAtomic.BigNumeric; + }): void => { + if (next.tags.length === 0) { + next.map.set(next.init, { + type: "bigint", + name: next.init, + index: null!, + }); + return; + } + for (const row of next.tags) { + const value: ProtobufAtomic.BigNumeric = + row.find( + (tag) => + tag.kind === "type" && + (tag.value === "int64" || tag.value === "uint64"), + )?.value ?? next.init; + next.map.set(next.init, { + type: "bigint", + name: value, + index: ProtobufUtil.getSequence(row)!, + }); } + }; - //---- - // NOT SUPPORTED TYPES - //---- - const noSupport = (msg: string) => insert(`does not support ${msg}`); - - // PROHIBIT ANY TYPE - if (meta.any) noSupport("any type"); - // PROHIBIT FUNCTIONAL TYPE - if (meta.functions.length) noSupport("functional type"); - // PROHIBIT TUPLE TYPE - if (meta.tuples.length) noSupport("tuple type"); - // PROHIBIT SET TYPE - if (meta.sets.length) noSupport("Set type"); - // NATIVE TYPE, BUT NOT Uint8Array - if (meta.natives.length) - for (const native of meta.natives) { - if (native === "Uint8Array") continue; - - const instead = BANNED_NATIVE_TYPES.get(native); - if (instead === undefined) noSupport(`${native} type`); - else noSupport(`${native} type. Use ${instead} type instead.`); - } - //---- - // ATOMIC CASES - //---- - if (meta.atomics.length) { - const numbers = ProtobufUtil.getNumbers(meta); - const bigints = ProtobufUtil.getBigints(meta); - - for (const type of ["int64", "uint64"]) - if (numbers.some((n) => n === type) && bigints.some((b) => b === type)) - insert( - `tags.Type<"${type}"> cannot be used in both number and bigint types. Recommend to remove from number type`, - ); + const emplaceNumber = (next: { + map: Map; + tags: IMetadataTypeTag[][]; + init: ProtobufAtomic.Numeric; + }): void => { + if (next.tags.length === 0) { + next.map.set(next.init, { + type: "number", + name: next.init, + index: null!, + }); + return; } - //---- - // ARRRAY CASES - //---- - // DO NOT ALLOW MULTI-DIMENTIONAL ARRAY - if ( - meta.arrays.length && - meta.arrays.some((array) => !!array.type.value.arrays.length) - ) - noSupport("over two dimenstional array type"); - // CHILD OF ARRAY TYPE MUST BE REQUIRED - if ( - meta.arrays.length && - meta.arrays.some( - (array) => - array.type.value.isRequired() === false || - array.type.value.nullable === true, + for (const row of next.tags) { + const value: ProtobufAtomic.Numeric = + row.find( + (tag) => + tag.kind === "type" && + (tag.value === "int32" || + tag.value === "uint32" || + tag.value === "int64" || + tag.value === "uint64" || + tag.value === "float" || + tag.value === "double"), + )?.value ?? next.init; + next.map.set(value, { + type: "number", + name: value, + index: ProtobufUtil.getSequence(row)!, + }); + } + }; + + const getBigintType = (values: bigint[]): ProtobufAtomic.BigNumeric => + values.some((v) => v < 0) ? "int64" : "uint64"; + + const getNumberType = (values: number[]): ProtobufAtomic.Numeric => + values.every((v) => Math.floor(v) === v) + ? values.every((v) => -2147483648 <= v && v <= 2147483647) + ? "int32" + : "int64" + : "double"; + + const getSequence = (tags: IMetadataTypeTag[]): number | null => { + const sequence = tags.find( + (t) => + t.kind === "sequence" && + typeof (t.schema as any)?.["x-protobuf-sequence"] === "number", + ); + if (sequence === undefined) return null; + const value: number = Number( + (sequence.schema as any)["x-protobuf-sequence"], + ); + return Number.isNaN(value) ? null : value; + }; + + /* ----------------------------------------------------------- + VALIDATORS + ----------------------------------------------------------- */ + const validate = () => { + const visited: WeakSet = new WeakSet(); + return (meta: Metadata, explore: MetadataFactory.IExplore): string[] => { + const errors: string[] = []; + const insert = (msg: string) => errors.push(msg); + + if (explore.top === true) { + const onlyObject: boolean = + meta.size() === 1 && + meta.objects.length === 1 && + meta.objects[0]!.type.properties.every((p) => + p.key.isSoleLiteral(), + ) && + meta.isRequired() === true && + meta.nullable === false; + if (onlyObject === false) + insert("target type must be a sole and static object type"); + } + for (const obj of meta.objects) { + if (visited.has(obj.type)) continue; + visited.add(obj.type); + validateObject({ + object: obj.type, + errors, + }); + try { + emplaceObject(obj.type); + } catch {} + } + + //---- + // NOT SUPPORTED TYPES + //---- + const noSupport = (msg: string) => insert(`does not support ${msg}`); + + // PROHIBIT ANY TYPE + if (meta.any) noSupport("any type"); + // PROHIBIT FUNCTIONAL TYPE + if (meta.functions.length) noSupport("functional type"); + // PROHIBIT TUPLE TYPE + if (meta.tuples.length) noSupport("tuple type"); + // PROHIBIT SET TYPE + if (meta.sets.length) noSupport("Set type"); + // NATIVE TYPE, BUT NOT Uint8Array + if (meta.natives.length) + for (const native of meta.natives) { + if (native.name === "Uint8Array") continue; + + const instead = BANNED_NATIVE_TYPES.get(native.name); + if (instead === undefined) noSupport(`${native.name} type`); + else noSupport(`${native.name} type. Use ${instead} type instead.`); + } + //---- + // ATOMIC CASES + //---- + if (meta.atomics.length) { + const numbers = ProtobufUtil.getNumbers(meta); + const bigints = ProtobufUtil.getBigints(meta); + + for (const type of ["int64", "uint64"]) + if (numbers.has(type) && bigints.has(type)) + insert( + `tags.Type<"${type}"> cannot be used in both number and bigint types. Recommend to remove from number type`, + ); + } + //---- + // ARRRAY CASES + //---- + // DO NOT ALLOW MULTI-DIMENTIONAL ARRAY + if ( + meta.arrays.length && + meta.arrays.some((array) => !!array.type.value.arrays.length) ) - ) - noSupport("optional type in array"); - // UNION IN ARRAY - if ( - meta.arrays.length && - meta.arrays.some( - (a) => - a.type.value.size() > 1 && - a.type.value.constants.length !== 1 && - a.type.value.constants[0]?.values.length !== a.type.value.size(), + noSupport("over two dimenstional array type"); + // CHILD OF ARRAY TYPE MUST BE REQUIRED + if ( + meta.arrays.length && + meta.arrays.some( + (array) => + array.type.value.isRequired() === false || + array.type.value.nullable === true, + ) ) - ) - noSupport("union type in array"); - // DO DYNAMIC OBJECT IN ARRAY - if ( - meta.arrays.length && - meta.arrays.some( - (a) => - a.type.value.maps.length || - (a.type.value.objects.length && - a.type.value.objects.some( - (o) => ProtobufUtil.isStaticObject(o) === false, - )), + noSupport("optional type in array"); + // UNION IN ARRAY + if ( + meta.arrays.length && + meta.arrays.some( + (a) => + a.type.value.size() > 1 && + a.type.value.constants.length !== 1 && + a.type.value.constants[0]?.values.length !== a.type.value.size(), + ) ) - ) - noSupport("dynamic object in array"); - // UNION WITH ARRAY - if (meta.size() > 1 && meta.arrays.length) - noSupport("union type with array type"); - //---- - // OBJECT CASES - //---- - // EMPTY PROPERTY - if ( - meta.objects.length && - meta.objects.some((obj) => obj.properties.length === 0) - ) - noSupport("empty object type"); - // MULTIPLE DYNAMIC KEY TYPED PROPERTIES - if ( - meta.objects.length && - meta.objects.some( - (obj) => - obj.properties.filter((p) => !p.key.isSoleLiteral()).length > 1, + noSupport("union type in array"); + // DO DYNAMIC OBJECT IN ARRAY + if ( + meta.arrays.length && + meta.arrays.some( + (a) => + a.type.value.maps.length || + (a.type.value.objects.length && + a.type.value.objects.some( + (o) => ProtobufUtil.isStaticObject(o.type) === false, + )), + ) ) - ) - noSupport( - "object type with multiple dynamic key typed properties. Keep only one.", - ); - // STATIC AND DYNAMIC PROPERTIES ARE COMPATIBLE - if ( - meta.objects.length && - meta.objects.some( - (obj) => - obj.properties.some((p) => p.key.isSoleLiteral()) && - obj.properties.some((p) => !p.key.isSoleLiteral()), + noSupport("dynamic object in array"); + // UNION WITH ARRAY + if (meta.size() > 1 && meta.arrays.length) + noSupport("union type with array type"); + //---- + // OBJECT CASES + //---- + // EMPTY PROPERTY + if ( + meta.objects.length && + meta.objects.some((obj) => obj.type.properties.length === 0) ) - ) - noSupport( - "object type with mixed static and dynamic key typed properties. Keep statics or dynamic only.", - ); - // DYNAMIC OBJECT, BUT PROPERTY VALUE TYPE IS ARRAY - if ( - meta.objects.length && - isDynamicObject(meta.objects[0]!) && - meta.objects[0]!.properties.some((p) => !!p.value.arrays.length) - ) - noSupport("dynamic object with array value type"); - // UNION WITH DYNAMIC OBJECT - if ( - meta.size() > 1 && - meta.objects.length && - isDynamicObject(meta.objects[0]!) - ) - noSupport("union type with dynamic object type"); - // UNION IN DYNAMIC PROPERTY VALUE - if ( - meta.objects.length && - meta.objects.some( - (obj) => - isDynamicObject(obj) && - obj.properties.some((p) => ProtobufUtil.isUnion(p.value)), + noSupport("empty object type"); + // MULTIPLE DYNAMIC KEY TYPED PROPERTIES + if ( + meta.objects.length && + meta.objects.some( + (obj) => + obj.type.properties.filter((p) => !p.key.isSoleLiteral()).length > + 1, + ) + ) + noSupport( + "object type with multiple dynamic key typed properties. Keep only one.", + ); + // STATIC AND DYNAMIC PROPERTIES ARE COMPATIBLE + if ( + meta.objects.length && + meta.objects.some( + (obj) => + obj.type.properties.some((p) => p.key.isSoleLiteral()) && + obj.type.properties.some((p) => !p.key.isSoleLiteral()), + ) + ) + noSupport( + "object type with mixed static and dynamic key typed properties. Keep statics or dynamic only.", + ); + // DYNAMIC OBJECT, BUT PROPERTY VALUE TYPE IS ARRAY + if ( + meta.objects.length && + isDynamicObject(meta.objects[0]!.type) && + meta.objects[0]!.type.properties.some((p) => !!p.value.arrays.length) + ) + noSupport("dynamic object with array value type"); + // UNION WITH DYNAMIC OBJECTa + if ( + meta.size() > 1 && + meta.objects.length && + isDynamicObject(meta.objects[0]!.type) + ) + noSupport("union type with dynamic object type"); + // UNION IN DYNAMIC PROPERTY VALUE + if ( + meta.objects.length && + meta.objects.some( + (obj) => + isDynamicObject(obj.type) && + obj.type.properties.some((p) => ProtobufUtil.isUnion(p.value)), + ) + ) + noSupport("union type in dynamic property"); + //---- + // MAP CASES + //---- + // KEY TYPE IS UNION + if ( + meta.maps.length && + meta.maps.some((m) => ProtobufUtil.isUnion(m.key)) + ) + noSupport("union key typed map"); + // KEY TYPE IS NOT ATOMIC + if ( + meta.maps.length && + meta.maps.some((m) => ProtobufUtil.getAtomics(m.key).size !== 1) ) - ) - noSupport("union type in dynamic property"); - //---- - // MAP CASES - //---- - // KEY TYPE IS UNION - if (meta.maps.length && meta.maps.some((m) => ProtobufUtil.isUnion(m.key))) - noSupport("union key typed map"); - // KEY TYPE IS NOT ATOMIC - if ( - meta.maps.length && - meta.maps.some((m) => ProtobufUtil.getAtomics(m.key).length !== 1) - ) - noSupport("non-atomic key typed map"); - // MAP TYPE, BUT PROPERTY KEY TYPE IS OPTIONAL - if ( - meta.maps.length && - meta.maps.some((m) => m.key.isRequired() === false || m.key.nullable) - ) - noSupport("optional key typed map"); - // MAP TYPE, BUT VALUE TYPE IS ARRAY - if (meta.maps.length && meta.maps.some((m) => !!m.value.arrays.length)) - noSupport("map type with array value type"); - // UNION WITH MAP - if (meta.size() > 1 && meta.maps.length) - noSupport("union type with map type"); - // UNION IN MAP - if ( - meta.maps.length && - meta.maps.some((m) => ProtobufUtil.isUnion(m.value)) - ) - noSupport("union type in map value type"); - return errors; + noSupport("non-atomic key typed map"); + // MAP TYPE, BUT PROPERTY KEY TYPE IS OPTIONAL + if ( + meta.maps.length && + meta.maps.some((m) => m.key.isRequired() === false || m.key.nullable) + ) + noSupport("optional key typed map"); + // MAP TYPE, BUT VALUE TYPE IS ARRAY + if (meta.maps.length && meta.maps.some((m) => !!m.value.arrays.length)) + noSupport("map type with array value type"); + // UNION WITH MAP + if (meta.size() > 1 && meta.maps.length) + noSupport("union type with map type"); + // UNION IN MAP + if ( + meta.maps.length && + meta.maps.some((m) => ProtobufUtil.isUnion(m.value)) + ) + noSupport("union type in map value type"); + return errors; + }; + }; + + /* ----------------------------------------------------------- + SEQUENE VALIDATOR + ----------------------------------------------------------- */ + const validateObject = (next: { + object: MetadataObjectType; + errors: string[]; + }): void => { + for (const property of next.object.properties) + validateProperty({ + metadata: property.value, + errors: next.errors, + }); + + const entire: Map = new Map(); + const visitProperty = (p: MetadataProperty) => { + const local: Set = new Set(); + const tagger = (matrix: IMetadataTypeTag[][]): void => { + matrix.forEach((tags) => { + const value: number | null = ProtobufUtil.getSequence(tags); + if (value !== null) local.add(value); + }); + }; + for (const c of p.value.constants) + for (const v of c.values) tagger(v.tags); + for (const a of p.value.atomics) tagger(a.tags); + for (const t of p.value.templates) tagger(t.tags); + for (const o of p.value.objects) tagger(o.tags); + for (const a of p.value.arrays) tagger(a.tags); + for (const s of local) + if (entire.has(s)) + next.errors.push( + `The Sequence<${s}> tag is duplicated in two properties (${JSON.stringify(entire.get(s))} and ${JSON.stringify(p.key.getSoleLiteral())})`, + ); + else entire.set(s, p.key.getSoleLiteral()!); + }; + for (const p of next.object.properties) visitProperty(p); + }; + + const validateProperty = (next: { + metadata: Metadata; + errors: string[]; + }): void => { + let expected: number = 0; + const sequences: Set = new Set(); + const add = (value: number): boolean => { + if (sequences.has(value)) return false; + sequences.add(value); + ++expected; + return true; + }; + + for (const validator of [ + validateBooleanSequence, + validateNumericSequences({ + type: "bigint", + default: "int64", + categories: BIGINT_TYPES, + }), + validateNumericSequences({ + type: "number", + default: "double", + categories: NUMBER_TYPES, + }), + validateStringSequence, + ]) + validator({ metadata: next.metadata, errors: next.errors, add }); + for (const array of next.metadata.arrays) + validateInstanceSequence({ + type: "array", + tags: array.tags, + errors: next.errors, + add, + }); + for (const object of next.metadata.objects) + validateInstanceSequence({ + type: "object", + tags: object.tags, + errors: next.errors, + add, + }); + for (const map of next.metadata.maps) + validateInstanceSequence({ + type: "map", + tags: map.tags, + errors: next.errors, + add, + }); + for (const native of next.metadata.natives) + if (native.name === "Uint8Array") + validateInstanceSequence({ + type: "Uint8Array", + tags: native.tags, + errors: next.errors, + add, + }); + }; + + const validateBooleanSequence = (next: { + metadata: Metadata; + errors: string[]; + add: (value: number) => boolean; + }): void => { + // PREPARE EMPLACER + const unique: Set = new Set(); + let expected: number = 0; + let actual: number = 0; + const emplace = (matrix: IMetadataTypeTag[][]): void => { + for (const tags of matrix) + for (const tag of tags) { + const sequence = ProtobufUtil.getSequence([tag]); + if (sequence !== null) { + unique.add(sequence); + ++actual; + } + ++expected; + } + }; + + // GATHER SEQUENCE TAGS + for (const atomic of next.metadata.atomics) + if (atomic.type === "boolean") emplace(atomic.tags); + for (const constant of next.metadata.constants) + if (constant.type === "boolean") + for (const value of constant.values) emplace(value.tags); + + // PREDICATE + if (unique.size && actual !== expected) + next.errors.push( + `The sequence tag must be declared in every union type members`, + ); + else if (unique.size > 1) + next.errors.push( + `The sequence tag value must be the same in boolean type (including literal types)`, + ); + else if (unique.size === 1) { + const value: number = unique.values().next().value!; + if (next.add(value) === false) + next.errors.push( + `The sequence tag value ${value} in boolean type is duplicated with other types`, + ); + } + }; + + const validateNumericSequences = + (config: { + type: "number" | "bigint"; + default: string; + categories: Set; + }) => + (next: { + metadata: Metadata; + errors: string[]; + add: (value: number) => boolean; + }): void => { + // FIND TYPE CATEGORIES + const categories: Set = new Set(); + const getType = (tags: IMetadataTypeTag[]): string => { + const found: IMetadataTypeTag | undefined = tags.find( + (t) => t.kind === "type" && config.categories.has(t.value), + ); + return found?.value ?? config.default; + }; + const exploreCategory = (matrix: IMetadataTypeTag[][]): void => { + for (const tags of matrix) categories.add(getType(tags)); + }; + for (const atomic of next.metadata.atomics) + if (atomic.type === config.type) exploreCategory(atomic.tags); + for (const constant of next.metadata.constants) + if (constant.type === config.type) + for (const value of constant.values) exploreCategory(value.tags); + + // ITERATE TYPE CATEGORIES + for (const category of categories) { + const unique: Set = new Set(); + let expected: number = 0; + let actual: number = 0; + const emplace = (tags: IMetadataTypeTag[]): void => { + const sequence: number | null = ProtobufUtil.getSequence(tags); + if (sequence !== null) { + unique.add(sequence); + ++actual; + } + ++expected; + }; + + for (const atomic of next.metadata.atomics) + if (atomic.type === config.type) + for (const tags of atomic.tags) + if (getType(tags) === category) emplace(tags); + for (const constant of next.metadata.constants) + if (constant.type === config.type) + for (const value of constant.values) + for (const tags of value.tags) + if (getType(tags) === category) emplace(tags); + + if (unique.size && actual !== expected) { + next.errors.push( + `The sequence tag must be declared in every union type members`, + ); + } else if (unique.size > 1) + next.errors.push( + `The sequence tag value must be the same in ${config.type} type (including literal types)`, + ); + else if (unique.size === 1) { + const value: number = unique.values().next().value!; + if (next.add(value) === false) + next.errors.push( + `The sequence tag value ${value} in ${config.type} type is duplicated with other types`, + ); + } + } + }; + + const validateStringSequence = (next: { + metadata: Metadata; + errors: string[]; + add: (value: number) => boolean; + }): void => { + const unique: Set = new Set(); + let expected: number = 0; + let actual: number = 0; + const emplace = (matrix: IMetadataTypeTag[][]): void => { + for (const tags of matrix) + for (const tag of tags) { + const sequence = ProtobufUtil.getSequence([tag]); + if (sequence !== null) { + unique.add(sequence); + ++actual; + } + ++expected; + } + }; + for (const atomic of next.metadata.atomics) + if (atomic.type === "string") emplace(atomic.tags); + for (const constant of next.metadata.constants) + if (constant.type === "string") + for (const value of constant.values) emplace(value.tags); + for (const template of next.metadata.templates) emplace(template.tags); + + if (unique.size && actual !== expected) + next.errors.push( + `The sequence tag must be declared in every union type members`, + ); + else if (unique.size > 1) + next.errors.push( + `The sequence tag value must be the same in string types including literal and template types`, + ); + else if (unique.size === 1) { + const value: number = unique.values().next().value!; + if (next.add(value) === false) + next.errors.push( + `The sequence tag value ${value} in string type is duplicated with other types`, + ); + } + }; + + const validateInstanceSequence = (next: { + type: "array" | "object" | "map" | "Uint8Array"; + tags: IMetadataTypeTag[][]; + errors: string[]; + add: (value: number) => boolean; + }): void => { + const unique: Set = new Set(); + let count: number = 0; + for (const tags of next.tags) { + const value: number | null = ProtobufUtil.getSequence(tags); + if (value === null) continue; + unique.add(value); + ++count; + } + if (unique.size && count !== next.tags.length) + next.errors.push( + `The sequence tag must be declared in every union type members`, + ); + else if (unique.size > 1) + next.errors.push( + `The sequence tag value must be the same in ${next.type === "array" ? "an array" : "object"} type.`, + ); + else if (unique.size === 1) { + const value: number = unique.values().next().value!; + if (next.add(value) === false) + next.errors.push( + `The sequence tag value ${value} in ${next.type} type is duplicated with other types`, + ); + } }; } -const isDynamicObject = (obj: MetadataObject): boolean => +const isDynamicObject = (obj: MetadataObjectType): boolean => obj.properties[0]!.key.isSoleLiteral() === false; const BANNED_NATIVE_TYPES: Map = new Map([ @@ -251,3 +864,12 @@ const BANNED_NATIVE_TYPES: Map = new Map([ ["WeakSet", "Array"], ["WeakMap", "Map"], ]); +const NUMBER_TYPES: Set = new Set([ + "int32", + "uint32", + "int64", + "uint64", + "float", + "double", +]); +const BIGINT_TYPES = new Set(["int64", "uint64"]); diff --git a/src/factories/StatementFactory.ts b/src/factories/StatementFactory.ts index 7496b161af..aaeda2fbc9 100644 --- a/src/factories/StatementFactory.ts +++ b/src/factories/StatementFactory.ts @@ -3,39 +3,55 @@ import ts from "typescript"; import { TypeFactory } from "./TypeFactory"; export namespace StatementFactory { - export const mut = (name: string, initializer?: ts.Expression) => + export const mut = (props: { + name: string; + type?: ts.TypeNode | undefined; + initializer?: ts.Expression | undefined; + }) => ts.factory.createVariableStatement( undefined, ts.factory.createVariableDeclarationList( [ ts.factory.createVariableDeclaration( - name, + props.name, undefined, - initializer === undefined ? TypeFactory.keyword("any") : undefined, - initializer, + props.type !== undefined + ? props.type + : props.initializer === undefined + ? TypeFactory.keyword("any") + : undefined, + props.initializer, ), ], ts.NodeFlags.Let, ), ); - export const constant = (name: string, initializer?: ts.Expression) => + export const constant = (props: { + name: string; + type?: ts.TypeNode | undefined; + value?: ts.Expression | undefined; + }) => ts.factory.createVariableStatement( undefined, ts.factory.createVariableDeclarationList( [ ts.factory.createVariableDeclaration( - name, + props.name, undefined, - undefined, - initializer, + props.type !== undefined + ? props.type + : props.value === undefined + ? TypeFactory.keyword("any") + : undefined, + props.value, ), ], ts.NodeFlags.Const, ), ); - export const entry = (key: string) => (value: string) => + export const entry = (props: { key: string; value: string }) => ts.factory.createVariableDeclarationList( [ ts.factory.createVariableDeclaration( @@ -43,13 +59,13 @@ export namespace StatementFactory { ts.factory.createBindingElement( undefined, undefined, - ts.factory.createIdentifier(key), + ts.factory.createIdentifier(props.key), undefined, ), ts.factory.createBindingElement( undefined, undefined, - ts.factory.createIdentifier(value), + ts.factory.createIdentifier(props.value), undefined, ), ]), diff --git a/src/factories/TemplateFactory.ts b/src/factories/TemplateFactory.ts index 7eb25e9d08..8f90ae679b 100644 --- a/src/factories/TemplateFactory.ts +++ b/src/factories/TemplateFactory.ts @@ -7,26 +7,32 @@ export namespace TemplateFactory { (expressions as ts.StringLiteral[]).map((str) => str.text).join(""), ); - const it: IIterator = { + const iterator: IIterator = { value: "", index: 0, }; - gather(expressions)(it); + gather({ + expressions, + iterator, + }); - const head: ts.TemplateHead = ts.factory.createTemplateHead(it.value); + const head: ts.TemplateHead = ts.factory.createTemplateHead(iterator.value); const spans: ts.TemplateSpan[] = []; while (true) { - const elem: ts.Expression = expressions[it.index++]!; - gather(expressions)(it); + const elem: ts.Expression = expressions[iterator.index++]!; + gather({ + expressions, + iterator, + }); - const broken: boolean = it.index === expressions.length; + const broken: boolean = iterator.index === expressions.length; spans.push( ts.factory.createTemplateSpan( elem, broken - ? ts.factory.createTemplateTail(it.value) - : ts.factory.createTemplateMiddle(it.value), + ? ts.factory.createTemplateTail(iterator.value) + : ts.factory.createTemplateMiddle(iterator.value), ), ); if (broken === true) break; @@ -34,20 +40,22 @@ export namespace TemplateFactory { return ts.factory.createTemplateExpression(head, spans); }; - const gather = - (expressions: ts.Expression[]) => - (it: IIterator): void => { - const found: number = expressions.findIndex( - (elem, index) => index >= it.index && !ts.isStringLiteral(elem), - ); + const gather = (props: { + expressions: ts.Expression[]; + iterator: IIterator; + }): void => { + const found: number = props.expressions.findIndex( + (elem, index) => + index >= props.iterator.index && !ts.isStringLiteral(elem), + ); - const last: number = found !== -1 ? found : expressions.length; - it.value = expressions - .slice(it.index, last) - .map((elem) => (elem as ts.StringLiteral).text) - .reduce((x, y) => x + y, ""); - it.index = last; - }; + const last: number = found !== -1 ? found : props.expressions.length; + props.iterator.value = props.expressions + .slice(props.iterator.index, last) + .map((elem) => (elem as ts.StringLiteral).text) + .reduce((x, y) => x + y, ""); + props.iterator.index = last; + }; interface IIterator { value: string; diff --git a/src/factories/TypeFactory.ts b/src/factories/TypeFactory.ts index d1b1d0f0d5..4e853ceab5 100644 --- a/src/factories/TypeFactory.ts +++ b/src/factories/TypeFactory.ts @@ -17,75 +17,97 @@ export namespace TypeFactory { : null; }; - export const getReturnType = - (checker: ts.TypeChecker) => - (type: ts.Type) => - (name: string): ts.Type | null => { - // FIND TO-JSON METHOD - const symbol: ts.Symbol | undefined = type.getProperty(name); - if (!symbol) return null; - else if (!symbol.valueDeclaration) return null; + export const getReturnTypeOfClassMethod = (props: { + checker: ts.TypeChecker; + class: ts.Type; + function: string; + }): ts.Type | null => { + // FIND TO-JSON METHOD + const symbol: ts.Symbol | undefined = props.class.getProperty( + props.function, + ); + if (!symbol) return null; + else if (!symbol.valueDeclaration) return null; - // GET FUNCTION DECLARATION - const functor: ts.Type = checker.getTypeOfSymbolAtLocation( - symbol, - symbol.valueDeclaration, - ); + // GET FUNCTION DECLARATION + const functor: ts.Type = props.checker.getTypeOfSymbolAtLocation( + symbol, + symbol.valueDeclaration, + ); - // RETURNS THE RETURN-TYPE - const signature: ts.Signature | undefined = checker.getSignaturesOfType( - functor, - ts.SignatureKind.Call, - )[0]; - return signature ? signature.getReturnType() : null; - }; + // RETURNS THE RETURN-TYPE + const signature: ts.Signature | undefined = + props.checker.getSignaturesOfType(functor, ts.SignatureKind.Call)[0]; + return signature ? signature.getReturnType() : null; + }; - export const getFullName = - (checker: ts.TypeChecker) => - (type: ts.Type, symbol?: ts.Symbol): string => { - // PRIMITIVE - symbol ??= type.aliasSymbol ?? type.getSymbol(); - if (symbol === undefined) return checker.typeToString(type); + export const getFullName = (props: { + checker: ts.TypeChecker; + type: ts.Type; + symbol?: ts.Symbol; + }): string => { + // PRIMITIVE + const symbol = + props.symbol ?? props.type.aliasSymbol ?? props.type.getSymbol(); + if (symbol === undefined) return props.checker.typeToString(props.type); - // UNION OR INTERSECT - if (type.aliasSymbol === undefined && type.isUnionOrIntersection()) { - const joiner: string = type.isIntersection() ? " & " : " | "; - return type.types - .map((child) => getFullName(checker)(child)) - .join(joiner); - } + // UNION OR INTERSECT + if ( + props.type.aliasSymbol === undefined && + props.type.isUnionOrIntersection() + ) { + const joiner: string = props.type.isIntersection() ? " & " : " | "; + return props.type.types + .map((child) => + getFullName({ + checker: props.checker, + type: child, + }), + ) + .join(joiner); + } - //---- - // SPECIALIZATION - //---- - const name: string = get_name(symbol); + //---- + // SPECIALIZATION + //---- + const name: string = get_name(symbol); - // CHECK GENERIC - const generic: readonly ts.Type[] = type.aliasSymbol - ? type.aliasTypeArguments || [] - : checker.getTypeArguments(type as ts.TypeReference); - return generic.length - ? name === "Promise" - ? getFullName(checker)(generic[0]!) - : `${name}<${generic - .map((child) => getFullName(checker)(child)) - .join(", ")}>` - : name; - }; + // CHECK GENERIC + const generic: readonly ts.Type[] = props.type.aliasSymbol + ? (props.type.aliasTypeArguments ?? []) + : props.checker.getTypeArguments(props.type as ts.TypeReference); + return generic.length + ? name === "Promise" + ? getFullName({ + checker: props.checker, + type: generic[0]!, + }) + : `${name}<${generic + .map((child) => + getFullName({ + checker: props.checker, + type: child, + }), + ) + .join(", ")}>` + : name; + }; - const explore_name = - (decl: ts.Node) => - (name: string): string => - ts.isModuleBlock(decl) - ? explore_name(decl.parent.parent)( - `${decl.parent.name.getFullText().trim()}.${name}`, - ) - : name; + const explore_name = (props: { node: ts.Node; name: string }): string => + ts.isModuleBlock(props.node) + ? explore_name({ + node: props.node.parent.parent, + name: `${props.node.parent.name.getFullText().trim()}.${props.name}`, + }) + : props.name; const get_name = (symbol: ts.Symbol): string => { const parent = symbol.getDeclarations()?.[0]?.parent; return parent - ? explore_name(parent)(symbol.escapedName.toString()) + ? explore_name({ + node: parent, + name: symbol.escapedName.toString(), + }) : "__type"; }; diff --git a/src/factories/internal/metadata/IMetadataIteratorProps.ts b/src/factories/internal/metadata/IMetadataIteratorProps.ts new file mode 100644 index 0000000000..ed9ac3ed7c --- /dev/null +++ b/src/factories/internal/metadata/IMetadataIteratorProps.ts @@ -0,0 +1,17 @@ +import ts from "typescript"; + +import { Metadata } from "../../../schemas/metadata/Metadata"; + +import { MetadataCollection } from "../../MetadataCollection"; +import { MetadataFactory } from "../../MetadataFactory"; + +export interface IMetadataIteratorProps { + options: MetadataFactory.IOptions; + checker: ts.TypeChecker; + collection: MetadataCollection; + errors: MetadataFactory.IError[]; + metadata: Metadata; + type: Type; + explore: MetadataFactory.IExplore; + intersected?: boolean; +} diff --git a/src/factories/internal/metadata/MetadataHelper.ts b/src/factories/internal/metadata/MetadataHelper.ts index 6ed708d1e7..94e275d2b8 100644 --- a/src/factories/internal/metadata/MetadataHelper.ts +++ b/src/factories/internal/metadata/MetadataHelper.ts @@ -11,7 +11,7 @@ export namespace MetadataHelper { values: [ MetadataConstantValue.create({ value: key, - tags: undefined, + tags: [], }), ], }), diff --git a/src/factories/internal/metadata/emplace_metadata_alias.ts b/src/factories/internal/metadata/emplace_metadata_alias.ts index b35c490967..7831a395ab 100644 --- a/src/factories/internal/metadata/emplace_metadata_alias.ts +++ b/src/factories/internal/metadata/emplace_metadata_alias.ts @@ -1,41 +1,33 @@ -import ts from "typescript"; - import { Metadata } from "../../../schemas/metadata/Metadata"; -import { MetadataAlias } from "../../../schemas/metadata/MetadataAlias"; +import { MetadataAliasType } from "../../../schemas/metadata/MetadataAliasType"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; -export const emplace_metadata_alias = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - type: ts.Type, - nullable: boolean, - explore: MetadataFactory.IExplore, - ): MetadataAlias => { - // CHECK EXISTENCE - const [alias, newbie, closure] = collection.emplaceAlias( - checker, - type, - type.aliasSymbol!, - ); - ArrayUtil.add(alias.nullables, nullable); - if (newbie === false) return alias; +export const emplace_metadata_alias = ( + props: IMetadataIteratorProps, +): MetadataAliasType => { + // CHECK EXISTENCE + const [alias, newbie, closure] = props.collection.emplaceAlias( + props.checker, + props.type, + props.type.aliasSymbol!, + ); + ArrayUtil.add(alias.nullables, props.metadata.nullable); + if (newbie === false) return alias; - // CONSTRUCT VALUE TYPE - const value: Metadata = explore_metadata(checker)(options)(collection)( - errors, - )(type, { - ...explore, + // CONSTRUCT VALUE TYPE + const value: Metadata = explore_metadata({ + ...props, + explore: { + ...props.explore, escaped: false, aliased: true, - }); - closure(value); - return alias; - }; + }, + intersected: false, + }); + closure(value); + return alias; +}; diff --git a/src/factories/internal/metadata/emplace_metadata_array_type.ts b/src/factories/internal/metadata/emplace_metadata_array_type.ts index 6c05332099..d63e024236 100644 --- a/src/factories/internal/metadata/emplace_metadata_array_type.ts +++ b/src/factories/internal/metadata/emplace_metadata_array_type.ts @@ -5,38 +5,35 @@ import { MetadataArrayType } from "../../../schemas/metadata/MetadataArrayType"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; -export const emplace_metadata_array_type = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - aliasType: ts.Type, - arrayType: ts.Type, - nullable: boolean, - explore: MetadataFactory.IExplore, - ): MetadataArrayType => { - // CHECK EXISTENCE - const [array, newbie, setValue] = collection.emplaceArray( - checker, - aliasType, - ); - ArrayUtil.add(array.nullables, nullable); - if (newbie === false) return array; +interface IProps extends IMetadataIteratorProps { + array: ts.Type; +} - // CONSTRUCT VALUE TYPE - const value: Metadata = explore_metadata(checker)(options)(collection)( - errors, - )(arrayType.getNumberIndexType()!, { - ...explore, +export const emplace_metadata_array_type = ( + props: IProps, +): MetadataArrayType => { + // CHECK EXISTENCE + const [array, newbie, setValue] = props.collection.emplaceArray( + props.checker, + props.type, + ); + ArrayUtil.add(array.nullables, props.metadata.nullable); + if (newbie === false) return array; + + // CONSTRUCT VALUE TYPE + const value: Metadata = explore_metadata({ + ...props, + type: props.array.getNumberIndexType()!, + explore: { + ...props.explore, escaped: false, aliased: false, - }); - setValue(value); - - return array; - }; + }, + intersected: false, + }); + setValue(value); + return array; +}; diff --git a/src/factories/internal/metadata/emplace_metadata_object.ts b/src/factories/internal/metadata/emplace_metadata_object.ts index 8a001f3976..970fe4229b 100644 --- a/src/factories/internal/metadata/emplace_metadata_object.ts +++ b/src/factories/internal/metadata/emplace_metadata_object.ts @@ -1,7 +1,7 @@ import ts from "typescript"; import { Metadata } from "../../../schemas/metadata/Metadata"; -import { MetadataObject } from "../../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../../schemas/metadata/MetadataProperty"; import { Writable } from "../../../typings/Writable"; @@ -9,115 +9,124 @@ import { Writable } from "../../../typings/Writable"; import { ArrayUtil } from "../../../utils/ArrayUtil"; import { CommentFactory } from "../../CommentFactory"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { MetadataHelper } from "./MetadataHelper"; import { explore_metadata } from "./explore_metadata"; import { iterate_metadata_coalesce } from "./iterate_metadata_coalesce"; -export const emplace_metadata_object = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - (parent: ts.Type, nullable: boolean): MetadataObject => { - // EMPLACE OBJECT - const [obj, newbie] = collection.emplace(checker, parent); - ArrayUtil.add(obj.nullables, nullable, (elem) => elem === nullable); - - if (newbie === false) return obj; - - // PREPARE ASSETS - const isClass: boolean = parent.isClass(); - const isProperty = significant(!!options.functional); - const pred: (node: ts.Declaration) => boolean = isClass - ? (node) => { - const kind: ts.SyntaxKind | undefined = node - .getChildren()[0] - ?.getChildren()[0]?.kind; - return ( - kind !== ts.SyntaxKind.PrivateKeyword && - kind !== ts.SyntaxKind.ProtectedKeyword && - isProperty(node) - ); - } - : (node) => isProperty(node); - - const insert = - (key: Metadata) => - (value: Metadata) => - ( - symbol: ts.Symbol | undefined, - filter?: (doc: ts.JSDocTagInfo) => boolean, - ): MetadataProperty => { - // COMMENTS AND TAGS - const description: string | null = symbol - ? (CommentFactory.description(symbol) ?? null) - : null; - const jsDocTags: ts.JSDocTagInfo[] = ( - symbol?.getJsDocTags() ?? [] - ).filter(filter ?? (() => true)); - - // THE PROPERTY - const property: MetadataProperty = MetadataProperty.create({ - key, - value, - description, - jsDocTags, - }); - obj.properties.push(property); - return property; - }; - - //---- - // REGULAR PROPERTIES - //---- - for (const prop of parent.getApparentProperties()) { - // CHECK INTERNAL TAG - if ( - (prop.getJsDocTags(checker) ?? []).find( - (tag) => tag.name === "internal", - ) !== undefined - ) - continue; - - // CHECK NODE IS A FORMAL PROPERTY - const [node, type] = (() => { - const node = prop.getDeclarations()?.[0] as - | ts.PropertyDeclaration - | undefined; - const type: ts.Type | undefined = node - ? checker.getTypeOfSymbolAtLocation(prop, node) - : checker.getTypeOfPropertyOfType(parent, prop.name); - return [node, type]; - })(); - if ((node && pred(node) === false) || type === undefined) continue; - - // GET EXACT TYPE - const key: Metadata = MetadataHelper.literal_to_metadata(prop.name); - const value: Metadata = explore_metadata(checker)(options)(collection)( - errors, - )(type, { +export const emplace_metadata_object = ( + props: IMetadataIteratorProps, +): MetadataObjectType => { + // EMPLACE OBJECT + const [obj, newbie] = props.collection.emplace(props.checker, props.type); + ArrayUtil.add( + obj.nullables, + props.metadata.nullable, + (elem) => elem === props.metadata.nullable, + ); + + if (newbie === false) return obj; + + // PREPARE ASSETS + const isClass: boolean = props.type.isClass(); + const isProperty = significant(!!props.options.functional); + const pred: (node: ts.Declaration) => boolean = isClass + ? (node) => { + const kind: ts.SyntaxKind | undefined = node + .getChildren()[0] + ?.getChildren()[0]?.kind; + return ( + kind !== ts.SyntaxKind.PrivateKeyword && + kind !== ts.SyntaxKind.ProtectedKeyword && + isProperty(node) + ); + } + : (node) => isProperty(node); + + const insert = (props: { + key: Metadata; + value: Metadata; + symbol: ts.Symbol | undefined; + filter?: (doc: ts.JSDocTagInfo) => boolean; + }): MetadataProperty => { + // COMMENTS AND TAGS + const description: string | null = props.symbol + ? (CommentFactory.description(props.symbol) ?? null) + : null; + const jsDocTags: ts.JSDocTagInfo[] = ( + props.symbol?.getJsDocTags() ?? [] + ).filter(props.filter ?? (() => true)); + + // THE PROPERTY + const property: MetadataProperty = MetadataProperty.create({ + key: props.key, + value: props.value, + description, + jsDocTags, + }); + obj.properties.push(property); + return property; + }; + + //---- + // REGULAR PROPERTIES + //---- + for (const symbol of props.type.getApparentProperties()) { + // CHECK INTERNAL TAG + if ( + (symbol.getJsDocTags(props.checker) ?? []).find( + (tag) => tag.name === "internal", + ) !== undefined + ) + continue; + + // CHECK NODE IS A FORMAL PROPERTY + const [node, type] = (() => { + const node = symbol.getDeclarations()?.[0] as + | ts.PropertyDeclaration + | undefined; + const type: ts.Type | undefined = node + ? props.checker.getTypeOfSymbolAtLocation(symbol, node) + : props.checker.getTypeOfPropertyOfType(props.type, symbol.name); + return [node, type]; + })(); + if ((node && pred(node) === false) || type === undefined) continue; + + // GET EXACT TYPE + const key: Metadata = MetadataHelper.literal_to_metadata(symbol.name); + const value: Metadata = explore_metadata({ + ...props, + type, + explore: { top: false, object: obj, - property: prop.name, + property: symbol.name, parameter: null, nested: null, aliased: false, escaped: false, output: false, - }); - Writable(value).optional = (prop.flags & ts.SymbolFlags.Optional) !== 0; - insert(key)(value)(prop); - } - - //---- - // DYNAMIC PROPERTIES - //---- - for (const index of checker.getIndexInfosOfType(parent)) { - // GET EXACT TYPE - const analyzer = (type: ts.Type) => (property: {} | null) => - explore_metadata(checker)(options)(collection)(errors)(type, { + }, + intersected: false, + }); + Writable(value).optional = (symbol.flags & ts.SymbolFlags.Optional) !== 0; + insert({ + key, + value, + symbol, + }); + } + + //---- + // DYNAMIC PROPERTIES + //---- + for (const index of props.checker.getIndexInfosOfType(props.type)) { + // GET EXACT TYPE + const analyzer = (type: ts.Type) => (property: {} | null) => + explore_metadata({ + ...props, + type, + explore: { top: false, object: obj, property, @@ -126,48 +135,52 @@ export const emplace_metadata_object = aliased: false, escaped: false, output: false, - }); - const key: Metadata = analyzer(index.keyType)(null); - const value: Metadata = analyzer(index.type)({}); - - if ( - key.atomics.length + - key.constants.map((c) => c.values.length).reduce((a, b) => a + b, 0) + - key.templates.length + - key.natives.filter( - (type) => - type === "Boolean" || - type === "BigInt" || - type === "Number" || - type === "String", - ).length !== - key.size() - ) - errors.push({ - name: key.getName(), - explore: { - top: false, - object: obj, - property: "[key]", - parameter: null, - nested: null, - aliased: false, - escaped: false, - output: false, - }, - messages: [], - }); - - // INSERT WITH REQUIRED CONFIGURATION - insert(key)(value)( - index.declaration?.parent - ? checker.getSymbolAtLocation(index.declaration.parent) - : undefined, - (doc) => doc.name !== "default", - ); - } - return obj; - }; + }, + intersected: false, + }); + const key: Metadata = analyzer(index.keyType)(null); + const value: Metadata = analyzer(index.type)({}); + + if ( + key.atomics.length + + key.constants.map((c) => c.values.length).reduce((a, b) => a + b, 0) + + key.templates.length + + key.natives.filter( + (native) => + native.name === "Boolean" || + native.name === "BigInt" || + native.name === "Number" || + native.name === "String", + ).length !== + key.size() + ) + props.errors.push({ + name: key.getName(), + explore: { + top: false, + object: obj, + property: "[key]", + parameter: null, + nested: null, + aliased: false, + escaped: false, + output: false, + }, + messages: [], + }); + + // INSERT WITH REQUIRED CONFIGURATION + insert({ + key, + value, + symbol: index.declaration?.parent + ? props.checker.getSymbolAtLocation(index.declaration.parent) + : undefined, + filter: (doc) => doc.name !== "default", + }); + } + return obj; +}; const significant = (functional: boolean) => functional @@ -180,8 +193,16 @@ const significant = (functional: boolean) => ts.isTypeLiteralNode(node) || ts.isShorthandPropertyAssignment(node); -const iterate_optional_coalesce = (meta: Metadata, type: ts.Type): void => { - if (type.isUnionOrIntersection()) - type.types.forEach((child) => iterate_optional_coalesce(meta, child)); - else iterate_metadata_coalesce(meta, type); +const iterate_optional_coalesce = (props: { + metadata: Metadata; + type: ts.Type; +}): void => { + if (props.type.isUnionOrIntersection()) + props.type.types.forEach((child) => + iterate_optional_coalesce({ + metadata: props.metadata, + type: child, + }), + ); + else iterate_metadata_coalesce(props); }; diff --git a/src/factories/internal/metadata/emplace_metadata_tuple.ts b/src/factories/internal/metadata/emplace_metadata_tuple.ts index a244110a7e..b8198215d5 100644 --- a/src/factories/internal/metadata/emplace_metadata_tuple.ts +++ b/src/factories/internal/metadata/emplace_metadata_tuple.ts @@ -7,51 +7,51 @@ import { Writable } from "../../../typings/Writable"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; -export const emplace_metadata_tuple = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - type: ts.TupleType, - nullable: boolean, - explore: MetadataFactory.IExplore, - ): MetadataTupleType => { - // CHECK EXISTENCE - const [tuple, newbie, closure] = collection.emplaceTuple(checker, type); - ArrayUtil.add(tuple.nullables, nullable); - if (newbie === false) return tuple; - - // CONSTRUCT ELEMENT TYPES - const flagList: readonly ts.ElementFlags[] = - type.elementFlags ?? (type.target as ts.TupleType)?.elementFlags ?? []; - const elements: Metadata[] = checker - .getTypeArguments(type as ts.TypeReference) - .map((elem, i) => { - const child: Metadata = explore_metadata(checker)(options)(collection)( - errors, - )(elem, { - ...explore, +export const emplace_metadata_tuple = ( + props: IMetadataIteratorProps, +): MetadataTupleType => { + // CHECK EXISTENCE + const [tuple, newbie, closure] = props.collection.emplaceTuple( + props.checker, + props.type, + ); + ArrayUtil.add(tuple.nullables, props.metadata.nullable); + if (newbie === false) return tuple; + + // CONSTRUCT ELEMENT TYPES + const flagList: readonly ts.ElementFlags[] = + props.type.elementFlags ?? + (props.type.target as ts.TupleType)?.elementFlags ?? + []; + const elements: Metadata[] = props.checker + .getTypeArguments(props.type as ts.TypeReference) + .map((elem, i) => { + const child: Metadata = explore_metadata({ + ...props, + type: elem, + explore: { + ...props.explore, nested: tuple, aliased: false, escaped: false, - }); + }, + intersected: false, + }); - // CHECK OPTIONAL - const flag: ts.ElementFlags | undefined = flagList[i]; - if (flag === ts.ElementFlags.Optional) Writable(child).optional = true; + // CHECK OPTIONAL + const flag: ts.ElementFlags | undefined = flagList[i]; + if (flag === ts.ElementFlags.Optional) Writable(child).optional = true; - // REST TYPE - if (flag !== ts.ElementFlags.Rest) return child; - const wrapper: Metadata = Metadata.initialize(); - Writable(wrapper).rest = child; - return wrapper; - }); - closure(elements); + // REST TYPE + if (flag !== ts.ElementFlags.Rest) return child; + const wrapper: Metadata = Metadata.initialize(); + Writable(wrapper).rest = child; + return wrapper; + }); + closure(elements); - return tuple; - }; + return tuple; +}; diff --git a/src/factories/internal/metadata/explore_metadata.ts b/src/factories/internal/metadata/explore_metadata.ts index ecbdd704f6..602de87820 100644 --- a/src/factories/internal/metadata/explore_metadata.ts +++ b/src/factories/internal/metadata/explore_metadata.ts @@ -2,27 +2,30 @@ import ts from "typescript"; import { Metadata } from "../../../schemas/metadata/Metadata"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { emend_metadata_atomics } from "./emend_metadata_atomics"; import { iterate_metadata } from "./iterate_metadata"; -export const explore_metadata = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - (type: ts.Type | null, explore: MetadataFactory.IExplore): Metadata => { - // CONSTRUCT METADATA - const meta: Metadata = Metadata.initialize(explore.escaped); - if (type === null) return meta; +export const explore_metadata = (props: Required): Metadata => { + // CONSTRUCT METADATA + const metadata: Metadata = Metadata.initialize(props.explore.escaped); + if (props.type === null) return metadata; - // ITERATE TYPESCRIPT TYPES - iterate_metadata(checker)(options)(collection)(errors)(meta, type, explore); - emend_metadata_atomics(meta); - if (meta.escaped) { - emend_metadata_atomics(meta.escaped.original); - emend_metadata_atomics(meta.escaped.returns); - } - return meta; - }; + // ITERATE TYPESCRIPT TYPES + props.intersected ??= false; + iterate_metadata({ + ...props, + metadata, + type: props.type, + }); + emend_metadata_atomics(metadata); + if (metadata.escaped) { + emend_metadata_atomics(metadata.escaped.original); + emend_metadata_atomics(metadata.escaped.returns); + } + return metadata; +}; + +interface IProps extends Omit { + type: ts.Type | null; +} diff --git a/src/factories/internal/metadata/iterate_metadata.ts b/src/factories/internal/metadata/iterate_metadata.ts index 86f9bf738d..ae79625f7f 100644 --- a/src/factories/internal/metadata/iterate_metadata.ts +++ b/src/factories/internal/metadata/iterate_metadata.ts @@ -1,10 +1,7 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; - -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; import { TypeFactory } from "../../TypeFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { iterate_metadata_alias } from "./iterate_metadata_alias"; import { iterate_metadata_array } from "./iterate_metadata_array"; import { iterate_metadata_atomic } from "./iterate_metadata_atomic"; @@ -21,80 +18,37 @@ import { iterate_metadata_template } from "./iterate_metadata_template"; import { iterate_metadata_tuple } from "./iterate_metadata_tuple"; import { iterate_metadata_union } from "./iterate_metadata_union"; -export const iterate_metadata = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - (meta: Metadata, type: ts.Type, explore: MetadataFactory.IExplore): void => { - if (type.isTypeParameter() === true) { - errors.push({ - name: TypeFactory.getFullName(checker)(type), - explore: { ...explore }, - messages: ["non-specified generic argument found."], - }); - return; - } - // CHECK SPECIAL CASES - else if ( - (explore.aliased !== true && - iterate_metadata_alias(checker)(options)(collection)(errors)( - meta, - type, - explore, - )) || - iterate_metadata_intersection(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_union(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_escape(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) - ) - return; +export const iterate_metadata = (props: IMetadataIteratorProps): void => { + if (props.type.isTypeParameter() === true) { + props.errors.push({ + name: TypeFactory.getFullName({ + checker: props.checker, + type: props.type, + }), + explore: { ...props.explore }, + messages: ["non-specified generic argument found."], + }); + return; + } + // CHECK SPECIAL CASES + if ( + (props.explore.aliased !== true && iterate_metadata_alias(props)) || + iterate_metadata_intersection(props) || + iterate_metadata_union(props) || + iterate_metadata_escape(props) + ) + return; - // ITERATE CASES - iterate_metadata_coalesce(meta, type) || - iterate_metadata_function(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_constant(checker)(options)(meta, type) || - iterate_metadata_template(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_atomic(meta, type) || - iterate_metadata_tuple(checker)(options)(collection)(errors)( - meta, - type as ts.TupleType, - explore, - ) || - iterate_metadata_array(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_native(checker)(meta, type) || - iterate_metadata_map(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_set(checker)(options)(collection)(errors)( - meta, - type, - explore, - ) || - iterate_metadata_object(checker)(options)(collection)(errors)(meta, type); - }; + // ITERATE CASES + iterate_metadata_coalesce(props) || + iterate_metadata_function(props) || + iterate_metadata_constant(props) || + iterate_metadata_template(props) || + iterate_metadata_atomic(props) || + iterate_metadata_tuple(props as IMetadataIteratorProps) || + iterate_metadata_array(props) || + iterate_metadata_native(props) || + iterate_metadata_map(props) || + iterate_metadata_set(props) || + iterate_metadata_object(props); +}; diff --git a/src/factories/internal/metadata/iterate_metadata_alias.ts b/src/factories/internal/metadata/iterate_metadata_alias.ts index 5bbb832dbf..1279d83b0f 100644 --- a/src/factories/internal/metadata/iterate_metadata_alias.ts +++ b/src/factories/internal/metadata/iterate_metadata_alias.ts @@ -1,34 +1,33 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataAlias } from "../../../schemas/metadata/MetadataAlias"; +import { MetadataAliasType } from "../../../schemas/metadata/MetadataAliasType"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { emplace_metadata_alias } from "./emplace_metadata_alias"; -export const iterate_metadata_alias = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - if (options.absorb !== false || type.aliasSymbol === undefined) - return false; +export const iterate_metadata_alias = ( + props: IMetadataIteratorProps, +): boolean => { + if (props.options.absorb !== false || props.type.aliasSymbol === undefined) + return false; - const node: ts.Declaration | undefined = type.aliasSymbol.declarations?.[0]; - if (node === undefined) return false; + const node: ts.Declaration | undefined = + props.type.aliasSymbol.declarations?.[0]; + if (node === undefined) return false; - // CONSTRUCT DEFINITION - const alias: MetadataAlias = emplace_metadata_alias(checker)(options)( - collection, - )(errors)(type, meta.nullable, explore); - ArrayUtil.add(meta.aliases, alias, (elem) => elem.name === alias.name); - return true; - }; + // CONSTRUCT DEFINITION + const type: MetadataAliasType = emplace_metadata_alias(props); + ArrayUtil.take( + props.metadata.aliases, + (elem) => elem.type.name === type.name, + () => + MetadataAlias.create({ + type, + tags: [], + }), + ); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_array.ts b/src/factories/internal/metadata/iterate_metadata_array.ts index 6720079354..bc114a46a3 100644 --- a/src/factories/internal/metadata/iterate_metadata_array.ts +++ b/src/factories/internal/metadata/iterate_metadata_array.ts @@ -1,63 +1,63 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataArray } from "../../../schemas/metadata/MetadataArray"; import { MetadataArrayType } from "../../../schemas/metadata/MetadataArrayType"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { emplace_metadata_array_type } from "./emplace_metadata_array_type"; -export const iterate_metadata_array = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - alias: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - const array: ts.Type | null = - checker.isArrayType(alias) === false - ? find_array_extended(checker)(new Map())(alias) - : alias; - if (array === null) return false; +export const iterate_metadata_array = ( + props: IMetadataIteratorProps, +): boolean => { + const array: ts.Type | null = + props.checker.isArrayType(props.type) === false + ? find_array_extended({ + checker: props.checker, + memory: new Map(), + type: props.type, + }) + : props.type; + if (array === null) return false; - const arrayType: MetadataArrayType = emplace_metadata_array_type(checker)( - options, - )(collection)(errors)(alias, array, meta.nullable, explore); - ArrayUtil.add( - meta.arrays, - MetadataArray.create({ - type: arrayType, - tags: [], - }), - (elem) => elem.type.name === arrayType.name, - ); - return true; - }; + const arrayType: MetadataArrayType = emplace_metadata_array_type({ + ...props, + array, + }); + ArrayUtil.add( + props.metadata.arrays, + MetadataArray.create({ + type: arrayType, + tags: [], + }), + (elem) => elem.type.name === arrayType.name, + ); + return true; +}; -const find_array_extended = - (checker: ts.TypeChecker) => - (memory: Map) => - (type: ts.Type): ts.Type | null => { - const cached = memory.get(type); - if (cached !== undefined) return null; +const find_array_extended = (props: { + checker: ts.TypeChecker; + memory: Map; + type: ts.Type; +}): ts.Type | null => { + const cached = props.memory.get(props.type); + if (cached !== undefined) return null; - memory.set(type, null); - const res: ts.Type | null = (() => { - if (type.isClassOrInterface() === false) return null; - for (const t of type.resolvedBaseTypes ?? []) - if (checker.isArrayType(t)) return t; - else { - const res: ts.Type | null = find_array_extended(checker)(memory)(t); - if (res !== null) return res; - } - return null; - })(); - memory.set(type, res); - return res; - }; + props.memory.set(props.type, null); + const res: ts.Type | null = (() => { + if (props.type.isClassOrInterface() === false) return null; + for (const t of props.type.resolvedBaseTypes ?? []) + if (props.checker.isArrayType(t)) return t; + else { + const res: ts.Type | null = find_array_extended({ + ...props, + type: t, + }); + if (res !== null) return res; + } + return null; + })(); + props.memory.set(props.type, res); + return res; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_atomic.ts b/src/factories/internal/metadata/iterate_metadata_atomic.ts index 39aea69859..4b17b97667 100644 --- a/src/factories/internal/metadata/iterate_metadata_atomic.ts +++ b/src/factories/internal/metadata/iterate_metadata_atomic.ts @@ -10,16 +10,16 @@ const same = (type: ts.Type | null) => { return (flag: ts.TypeFlags) => (type.getFlags() & flag) !== 0; }; -export const iterate_metadata_atomic = ( - meta: Metadata, - type: ts.Type, -): boolean => { +export const iterate_metadata_atomic = (props: { + metadata: Metadata; + type: ts.Type; +}): boolean => { // PREPARE INTERNAL FUNCTIONS - const filter = same(type); + const filter = same(props.type); const check = (info: IAtomicInfo) => { if (filter(info.atomic) || filter(info.literal)) { ArrayUtil.add( - meta.atomics, + props.metadata.atomics, MetadataAtomic.create({ type: info.name, tags: [] }), (x, y) => x.type === y.type, ); diff --git a/src/factories/internal/metadata/iterate_metadata_coalesce.ts b/src/factories/internal/metadata/iterate_metadata_coalesce.ts index 7bfa923c58..3ae2fdec7c 100644 --- a/src/factories/internal/metadata/iterate_metadata_coalesce.ts +++ b/src/factories/internal/metadata/iterate_metadata_coalesce.ts @@ -4,16 +4,16 @@ import { Metadata } from "../../../schemas/metadata/Metadata"; import { Writable } from "../../../typings/Writable"; -export const iterate_metadata_coalesce = ( - meta: Metadata, - type: ts.Type, -): boolean => { - const filter = (flag: ts.TypeFlags) => (type.getFlags() & flag) !== 0; +export const iterate_metadata_coalesce = (props: { + metadata: Metadata; + type: ts.Type; +}): boolean => { + const filter = (flag: ts.TypeFlags) => (props.type.getFlags() & flag) !== 0; if (filter(ts.TypeFlags.Unknown) || filter(ts.TypeFlags.Any)) { - Writable(meta).any = true; + Writable(props.metadata).any = true; return true; } else if (filter(ts.TypeFlags.Null)) { - Writable(meta).nullable = true; + Writable(props.metadata).nullable = true; return true; } else if ( filter(ts.TypeFlags.Undefined) || @@ -21,7 +21,7 @@ export const iterate_metadata_coalesce = ( filter(ts.TypeFlags.Void) || filter(ts.TypeFlags.VoidLike) ) { - Writable(meta).required = false; + Writable(props.metadata).required = false; return true; } return false; diff --git a/src/factories/internal/metadata/iterate_metadata_collection.ts b/src/factories/internal/metadata/iterate_metadata_collection.ts index a8a91376f7..a2ba9a0ddc 100644 --- a/src/factories/internal/metadata/iterate_metadata_collection.ts +++ b/src/factories/internal/metadata/iterate_metadata_collection.ts @@ -1,131 +1,146 @@ import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataArrayType } from "../../../schemas/metadata/MetadataArrayType"; -import { MetadataObject } from "../../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../../schemas/metadata/MetadataObjectType"; import { MetadataTupleType } from "../../../schemas/metadata/MetadataTupleType"; import { MetadataCollection } from "../../MetadataCollection"; import { MetadataFactory } from "../../MetadataFactory"; import { iterate_metadata_comment_tags } from "./iterate_metadata_comment_tags"; -export const iterate_metadata_collection = - (errors: MetadataFactory.IError[]) => - (collection: MetadataCollection): void => { - for (const array of collection.arrays()) - if (array.recursive === null) - collection.setArrayRecursive( +export const iterate_metadata_collection = (props: { + errors: MetadataFactory.IError[]; + collection: MetadataCollection; +}): void => { + for (const array of props.collection.arrays()) + if (array.recursive === null) + props.collection.setArrayRecursive( + array, + isArrayRecursive({ + visited: new Set(), array, - isArrayRecursive(new Set())(array)(array.value), - ); - for (const tuple of collection.tuples()) - if (tuple.recursive === null) { - const visited: Set = new Set(); - collection.setTupleRecursive( - tuple, - tuple.elements.some(isTupleRecursive(visited)(tuple)), - ); - } - for (const obj of collection.objects()) { - iterate_metadata_comment_tags(errors)(obj); - if (obj.recursive === null) { - const visited: Set = new Set(); - collection.setObjectRecursive( - obj, - obj.properties.some((p) => isObjectRecursive(visited)(obj)(p.value)), - ); - } + metadata: array.value, + }), + ); + for (const tuple of props.collection.tuples()) + if (tuple.recursive === null) { + const visited: Set = new Set(); + props.collection.setTupleRecursive( + tuple, + tuple.elements.some((e) => + isTupleRecursive({ + visited, + tuple, + metadata: e, + }), + ), + ); } - }; + for (const object of props.collection.objects()) { + iterate_metadata_comment_tags({ + errors: props.errors, + object, + }); + if (object.recursive === null) { + const visited: Set = new Set(); + props.collection.setObjectRecursive( + object, + object.properties.some((p) => + isObjectRecursive({ + visited, + object, + metadata: p.value, + }), + ), + ); + } + } +}; -const isArrayRecursive = - (visited: Set) => - (array: MetadataArrayType) => - (meta: Metadata): boolean => { - if (visited.has(meta)) return false; - visited.add(meta); +const isArrayRecursive = (props: { + visited: Set; + array: MetadataArrayType; + metadata: Metadata; +}): boolean => { + if (props.visited.has(props.metadata)) return false; + props.visited.add(props.metadata); - return ( - meta.arrays.some( - (a) => - a.type === array || isArrayRecursive(visited)(array)(a.type.value), - ) || - meta.aliases.some((alias) => - isArrayRecursive(visited)(array)(alias.value), - ) || - meta.tuples.some( - (t) => - !t.type.recursive && - t.type.elements.some((e) => isArrayRecursive(visited)(array)(e)), - ) || - meta.maps.some((m) => isArrayRecursive(visited)(array)(m.value)) || - meta.sets.some((s) => isArrayRecursive(visited)(array)(s)) || - (meta.escaped !== null && - isArrayRecursive(visited)(array)(meta.escaped.returns)) || - (meta.rest !== null && isArrayRecursive(visited)(array)(meta.rest)) - ); - }; + const next = (metadata: Metadata): boolean => + isArrayRecursive({ + ...props, + metadata, + }); + return ( + props.metadata.arrays.some( + (a) => a.type === props.array || next(a.type.value), + ) || + props.metadata.aliases.some((alias) => next(alias.type.value)) || + props.metadata.tuples.some( + (t) => !t.type.recursive && t.type.elements.some(next), + ) || + props.metadata.maps.some((m) => next(m.value)) || + props.metadata.sets.some((s) => next(s.value)) || + (props.metadata.escaped !== null && next(props.metadata.escaped.returns)) || + (props.metadata.rest !== null && next(props.metadata.rest)) + ); +}; -const isTupleRecursive = - (visited: Set) => - (tuple: MetadataTupleType) => - (meta: Metadata): boolean => { - if (visited.has(meta)) return false; - visited.add(meta); +const isTupleRecursive = (props: { + visited: Set; + tuple: MetadataTupleType; + metadata: Metadata; +}): boolean => { + if (props.visited.has(props.metadata)) return false; + props.visited.add(props.metadata); - return ( - meta.tuples.some( - (t) => - t.type === tuple || - t.type.elements.some((e) => isTupleRecursive(visited)(tuple)(e)), - ) || - meta.arrays.some( - (a) => - !a.type.recursive && isTupleRecursive(visited)(tuple)(a.type.value), - ) || - meta.maps.some((m) => isTupleRecursive(visited)(tuple)(m.value)) || - meta.sets.some((s) => isTupleRecursive(visited)(tuple)(s)) || - meta.aliases.some((alias) => - isTupleRecursive(visited)(tuple)(alias.value), - ) || - (meta.escaped !== null && - isTupleRecursive(visited)(tuple)(meta.escaped.returns)) || - (meta.rest !== null && isTupleRecursive(visited)(tuple)(meta.rest)) - ); - }; + const next = (metadata: Metadata): boolean => + isTupleRecursive({ + ...props, + metadata, + }); + return ( + props.metadata.tuples.some( + (t) => t.type === props.tuple || t.type.elements.some(next), + ) || + props.metadata.arrays.some( + (a) => !a.type.recursive && next(a.type.value), + ) || + props.metadata.maps.some((m) => next(m.value)) || + props.metadata.sets.some((s) => next(s.value)) || + props.metadata.aliases.some((alias) => next(alias.type.value)) || + (props.metadata.escaped !== null && next(props.metadata.escaped.returns)) || + (props.metadata.rest !== null && next(props.metadata.rest)) + ); +}; -const isObjectRecursive = - (visited: Set) => - (obj: MetadataObject) => - (meta: Metadata): boolean => { - if (visited.has(meta)) return false; +const isObjectRecursive = (props: { + visited: Set; + object: MetadataObjectType; + metadata: Metadata; +}): boolean => { + if (props.visited.has(props.metadata)) return false; + props.visited.add(props.metadata); - visited.add(meta); - return ( - meta.objects.some( - (o) => - obj === o || - o.properties.some((prop) => - isObjectRecursive(visited)(obj)(prop.value), - ), - ) || - meta.aliases.some((alias) => - isObjectRecursive(visited)(obj)(alias.value), - ) || - meta.arrays.some( - (array) => - !array.type.recursive && - isObjectRecursive(visited)(obj)(array.type.value), - ) || - meta.tuples.some( - (tuple) => - !tuple.type.recursive && - tuple.type.elements.some((elem) => - isObjectRecursive(visited)(obj)(elem), - ), - ) || - meta.maps.some((map) => isObjectRecursive(visited)(obj)(map.value)) || - meta.sets.some((value) => isObjectRecursive(visited)(obj)(value)) || - (meta.escaped !== null && - isObjectRecursive(visited)(obj)(meta.escaped.returns)) || - (meta.rest !== null && isObjectRecursive(visited)(obj)(meta.rest)) - ); - }; + const next = (metadata: Metadata): boolean => + isObjectRecursive({ + ...props, + metadata, + }); + return ( + props.metadata.objects.some( + (o) => + props.object === o.type || + o.type.properties.some((prop) => next(prop.value)), + ) || + props.metadata.aliases.some((alias) => next(alias.type.value)) || + props.metadata.arrays.some( + (array) => !array.type.recursive && next(array.type.value), + ) || + props.metadata.tuples.some( + (tuple) => !tuple.type.recursive && tuple.type.elements.some(next), + ) || + props.metadata.maps.some((map) => next(map.value)) || + props.metadata.sets.some((set) => next(set.value)) || + (props.metadata.escaped !== null && next(props.metadata.escaped.returns)) || + (props.metadata.rest !== null && next(props.metadata.rest)) + ); +}; diff --git a/src/factories/internal/metadata/iterate_metadata_comment_tags.ts b/src/factories/internal/metadata/iterate_metadata_comment_tags.ts index 55410857fc..a4e5878eff 100644 --- a/src/factories/internal/metadata/iterate_metadata_comment_tags.ts +++ b/src/factories/internal/metadata/iterate_metadata_comment_tags.ts @@ -1,28 +1,32 @@ -import { MetadataObject } from "../../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../../schemas/metadata/MetadataObjectType"; import { MetadataCommentTagFactory } from "../../MetadataCommentTagFactory"; import { MetadataFactory } from "../../MetadataFactory"; -export const iterate_metadata_comment_tags = - (errors: MetadataFactory.IError[]) => (object: MetadataObject) => { - if (object.tagged_ === true) return; - object.tagged_ = true; +export const iterate_metadata_comment_tags = (props: { + errors: MetadataFactory.IError[]; + object: MetadataObjectType; +}) => { + if (props.object.tagged_ === true) return; + props.object.tagged_ = true; - for (const property of object.properties) { - MetadataCommentTagFactory.analyze(errors)(property.value)( - property.jsDocTags, - { - top: false, - object, - property: property.key.isSoleLiteral() - ? property.key.getSoleLiteral()! - : {}, - parameter: null, - nested: null, - aliased: false, - escaped: false, - output: false, - }, - ); - } - }; + for (const property of props.object.properties) { + MetadataCommentTagFactory.analyze({ + errors: props.errors, + metadata: property.value, + tags: property.jsDocTags, + explore: { + top: false, + object: props.object, + property: property.key.isSoleLiteral() + ? property.key.getSoleLiteral()! + : {}, + parameter: null, + nested: null, + aliased: false, + escaped: false, + output: false, + }, + }); + } +}; diff --git a/src/factories/internal/metadata/iterate_metadata_constant.ts b/src/factories/internal/metadata/iterate_metadata_constant.ts index cfb3a1cb76..cd87e3d92e 100644 --- a/src/factories/internal/metadata/iterate_metadata_constant.ts +++ b/src/factories/internal/metadata/iterate_metadata_constant.ts @@ -1,76 +1,76 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataConstant } from "../../../schemas/metadata/MetadataConstant"; import { MetadataConstantValue } from "../../../schemas/metadata/MetadataConstantValue"; import { ArrayUtil } from "../../../utils/ArrayUtil"; import { CommentFactory } from "../../CommentFactory"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; -export const iterate_metadata_constant = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (meta: Metadata, type: ts.Type): boolean => { - if (!options.constant) return false; +export const iterate_metadata_constant = ( + props: IMetadataIteratorProps, +): boolean => { + if (!props.options.constant) return false; - const filter = (flag: ts.TypeFlags) => (type.getFlags() & flag) !== 0; - const comment = () => { - if (!filter(ts.TypeFlags.EnumLiteral)) return {}; - return { - jsDocTags: type.symbol?.getJsDocTags(), - description: type.symbol - ? CommentFactory.description(type.symbol) ?? null - : undefined, - }; + const filter = (flag: ts.TypeFlags) => (props.type.getFlags() & flag) !== 0; + const comment = () => { + if (!filter(ts.TypeFlags.EnumLiteral)) return {}; + return { + jsDocTags: props.type.symbol?.getJsDocTags(), + description: props.type.symbol + ? (CommentFactory.description(props.type.symbol) ?? null) + : undefined, }; - if (type.isLiteral()) { - const value: string | number | bigint = - typeof type.value === "object" - ? BigInt(`${type.value.negative ? "-" : ""}${type.value.base10Value}`) - : type.value; - const constant: MetadataConstant = ArrayUtil.take( - meta.constants, - (elem) => elem.type === typeof value, - () => - MetadataConstant.create({ - type: typeof value as "number", - values: [], - }), - ); - ArrayUtil.add( - constant.values, - MetadataConstantValue.create({ - value, - tags: [], - ...comment(), + }; + if (props.type.isLiteral()) { + const value: string | number | bigint = + typeof props.type.value === "object" + ? BigInt( + `${props.type.value.negative ? "-" : ""}${props.type.value.base10Value}`, + ) + : props.type.value; + const constant: MetadataConstant = ArrayUtil.take( + props.metadata.constants, + (elem) => elem.type === typeof value, + () => + MetadataConstant.create({ + type: typeof value as "number", + values: [], }), - (a, b) => a.value === b.value, - ); - return true; - } else if (filter(ts.TypeFlags.BooleanLiteral)) { - comment(); - const value: boolean = checker.typeToString(type) === "true"; - const constant: MetadataConstant = ArrayUtil.take( - meta.constants, - (elem) => elem.type === "boolean", - () => - MetadataConstant.create({ - type: "boolean", - values: [], - }), - ); - ArrayUtil.add( - constant.values, - MetadataConstantValue.create({ - value, - tags: [], - ...comment(), + ); + ArrayUtil.add( + constant.values, + MetadataConstantValue.create({ + value, + tags: [], + ...comment(), + }), + (a, b) => a.value === b.value, + ); + return true; + } else if (filter(ts.TypeFlags.BooleanLiteral)) { + comment(); + const value: boolean = props.checker.typeToString(props.type) === "true"; + const constant: MetadataConstant = ArrayUtil.take( + props.metadata.constants, + (elem) => elem.type === "boolean", + () => + MetadataConstant.create({ + type: "boolean", + values: [], }), - (a, b) => a.value === b.value, - ); - return true; - } - return false; - }; + ); + ArrayUtil.add( + constant.values, + MetadataConstantValue.create({ + value, + tags: [], + ...comment(), + }), + (a, b) => a.value === b.value, + ); + return true; + } + return false; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_escape.ts b/src/factories/internal/metadata/iterate_metadata_escape.ts index 226e8b6ba3..98b7e22322 100644 --- a/src/factories/internal/metadata/iterate_metadata_escape.ts +++ b/src/factories/internal/metadata/iterate_metadata_escape.ts @@ -5,48 +5,45 @@ import { MetadataEscaped } from "../../../schemas/metadata/MetadataEscaped"; import { Writable } from "../../../typings/Writable"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; import { TypeFactory } from "../../TypeFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { iterate_metadata } from "./iterate_metadata"; -export const iterate_metadata_escape = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - if (options.escape === false || explore.escaped === true) return false; +export const iterate_metadata_escape = ( + props: IMetadataIteratorProps, +): boolean => { + if (props.options.escape === false || props.explore.escaped === true) + return false; - const escaped: ts.Type | null = - TypeFactory.getReturnType(checker)(type)("toJSON"); - if (escaped === null) return false; + const escaped: ts.Type | null = TypeFactory.getReturnTypeOfClassMethod({ + checker: props.checker, + class: props.type, + function: "toJSON", + }); + if (escaped === null) return false; - if (meta.escaped === null) { - Writable(meta).escaped = MetadataEscaped.create({ - original: Metadata.initialize(), - returns: Metadata.initialize(), - }); - } - iterate_metadata(checker)(options)(collection)(errors)( - meta.escaped!.original, - type, - { - ...explore, - escaped: true, - }, - ); - iterate_metadata(checker)(options)(collection)(errors)( - meta.escaped!.returns, - escaped, - { - ...explore, - escaped: true, - }, - ); - return true; - }; + if (props.metadata.escaped === null) { + Writable(props.metadata).escaped = MetadataEscaped.create({ + original: Metadata.initialize(), + returns: Metadata.initialize(), + }); + } + iterate_metadata({ + ...props, + metadata: props.metadata.escaped!.original, + explore: { + ...props.explore, + escaped: true, + }, + }); + iterate_metadata({ + ...props, + metadata: props.metadata.escaped!.returns, + type: escaped, + explore: { + ...props.explore, + escaped: true, + }, + }); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_function.ts b/src/factories/internal/metadata/iterate_metadata_function.ts index 5d9a1452da..39f39c44b9 100644 --- a/src/factories/internal/metadata/iterate_metadata_function.ts +++ b/src/factories/internal/metadata/iterate_metadata_function.ts @@ -7,83 +7,84 @@ import { MetadataFunction } from "../../../schemas/metadata/MetadataFunction"; import { MetadataParameter } from "../../../schemas/metadata/MetadataParameter"; import { CommentFactory } from "../../CommentFactory"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; import { TypeFactory } from "../../TypeFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; -export const iterate_metadata_function = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - metadata: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - const declaration: ts.SignatureDeclaration | null = - TypeFactory.getFunction(type); - if (declaration === null) return false; - else if (!options.functional) { - if (metadata.functions.length === 0) - metadata.functions.push( - MetadataFunction.create({ - parameters: [], - output: Metadata.initialize(), - async: false, - }), - ); - } else { - const [signature] = type.getCallSignatures(); - if (signature === undefined || signature.declaration === undefined) - metadata.functions.push( - MetadataFunction.create({ - parameters: [], - output: Metadata.initialize(), - async: false, - }), - ); - else { - const { async }: FunctionalGeneralProgrammer.IOutput = - FunctionalGeneralProgrammer.getReturnType(checker)(declaration); - metadata.functions.push( - MetadataFunction.create({ - parameters: signature.parameters.map((p) => - MetadataParameter.create({ - name: p.name, - type: explore_metadata(checker)(options)(collection)(errors)( - checker.getTypeOfSymbol(p), - { - ...explore, - top: false, - parameter: p.name, - }, - ), - description: CommentFactory.description(p) ?? null, - jsDocTags: p?.getJsDocTags() ?? [], +export const iterate_metadata_function = ( + props: IMetadataIteratorProps, +): boolean => { + const declaration: ts.SignatureDeclaration | null = TypeFactory.getFunction( + props.type, + ); + if (declaration === null) return false; + else if (!props.options.functional) { + if (props.metadata.functions.length === 0) + props.metadata.functions.push( + MetadataFunction.create({ + parameters: [], + output: Metadata.initialize(), + async: false, + }), + ); + } else { + const [signature] = props.type.getCallSignatures(); + if (signature === undefined || signature.declaration === undefined) + props.metadata.functions.push( + MetadataFunction.create({ + parameters: [], + output: Metadata.initialize(), + async: false, + }), + ); + else { + const { async }: FunctionalGeneralProgrammer.IOutput = + FunctionalGeneralProgrammer.getReturnType({ + checker: props.checker, + declaration, + }); + props.metadata.functions.push( + MetadataFunction.create({ + parameters: signature.parameters.map((p) => + MetadataParameter.create({ + name: p.name, + type: explore_metadata({ + ...props, + type: props.checker.getTypeOfSymbol(p), + explore: { + ...props.explore, + top: false, + parameter: p.name, + }, + intersected: false, }), - ), - async, - output: explore_metadata(checker)({ - ...options, + description: CommentFactory.description(p) ?? null, + jsDocTags: p?.getJsDocTags() ?? [], + }), + ), + async, + output: explore_metadata({ + ...props, + options: { + ...props.options, functional: false, - })(collection)(errors)( - async - ? (checker.getTypeArguments( - signature.getReturnType() as ts.TypeReference, - )?.[0] ?? - checker.getTypeFromTypeNode(TypeFactory.keyword("any"))) - : signature.getReturnType(), - { - ...explore, - top: false, - output: true, - }, - ), + }, + type: async + ? (props.checker.getTypeArguments( + signature.getReturnType() as ts.TypeReference, + )?.[0] ?? + props.checker.getTypeFromTypeNode(TypeFactory.keyword("any"))) + : signature.getReturnType(), + explore: { + ...props.explore, + top: false, + output: true, + }, + intersected: false, }), - ); - } + }), + ); } - return true; - }; + } + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_intersection.ts b/src/factories/internal/metadata/iterate_metadata_intersection.ts index bedfb99869..7f1f73b123 100644 --- a/src/factories/internal/metadata/iterate_metadata_intersection.ts +++ b/src/factories/internal/metadata/iterate_metadata_intersection.ts @@ -1,213 +1,213 @@ -import ts from "typescript"; - +// import ts from "typescript"; import { IMetadataTypeTag } from "../../../schemas/metadata/IMetadataTypeTag"; import { Metadata } from "../../../schemas/metadata/Metadata"; -import { MetadataAtomic } from "../../../schemas/metadata/MetadataAtomic"; -import { MetadataConstant } from "../../../schemas/metadata/MetadataConstant"; -import { MetadataConstantValue } from "../../../schemas/metadata/MetadataConstantValue"; -import { MetadataTemplate } from "../../../schemas/metadata/MetadataTemplate"; - -import { ArrayUtil } from "../../../utils/ArrayUtil"; +import { MetadataObjectType } from "../../../schemas/metadata/MetadataObjectType"; import { MetadataCollection } from "../../MetadataCollection"; import { MetadataFactory } from "../../MetadataFactory"; import { MetadataTypeTagFactory } from "../../MetadataTypeTagFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; import { iterate_metadata } from "./iterate_metadata"; -import { iterate_metadata_array } from "./iterate_metadata_array"; -export const iterate_metadata_intersection = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - if (!type.isIntersection()) return false; +export const iterate_metadata_intersection = ( + props: IMetadataIteratorProps, +): boolean => { + if (props.intersected === true) return false; + else if (props.type.isIntersection() === false) return false; + + // COSTRUCT FAKE METADATA LIST + const commit: MetadataCollection = props.collection.clone(); + props.collection["options"] = undefined; + + const fakeErrors: MetadataFactory.IError[] = []; + const children: Metadata[] = props.type.types.map((t) => + explore_metadata({ + ...props, + options: { + ...props.options, + absorb: true, + functional: false, + }, + collection: props.collection, + errors: fakeErrors, + type: t, + explore: { + ...props.explore, + aliased: false, + }, + intersected: false, + }), + ); + + // ERROR OR ANY TYPE CASE + const escape = (out: boolean) => { + Object.assign(props.collection, commit); + return out; + }; + if (fakeErrors.length) { + props.errors.push(...fakeErrors); + return escape(true); + } else if (children.length === 0) return escape(false); + else if (children.some((m) => m.any === true || m.size() === 0)) + return escape(false); + + // PREPARE MEATDATAS AND TAGS + const indexes: number[] = []; + const metadatas: Metadata[] = []; + const tagObjects: MetadataObjectType[] = []; + children.forEach((child, i) => { if ( - // ONLY OBJECT TYPED INTERSECTION - type.types.every( - (child) => - (child.getFlags() & ts.TypeFlags.Object) !== 0 && - !checker.isArrayType(child) && - !checker.isTupleType(child), - ) + child.size() === 1 && + child.objects.length === 1 && + MetadataTypeTagFactory.is(child.objects[0]!.type) ) - return false; - - // COSTRUCT FAKE METADATA LIST - const fakeCollection: MetadataCollection = collection.clone(); - const fakeErrors: MetadataFactory.IError[] = []; - const children: Metadata[] = [ - ...new Map( - type.types.map((t) => { - const m: Metadata = explore_metadata(checker)({ - ...options, - absorb: true, - })(fakeCollection)(fakeErrors)(t, { - ...explore, - aliased: false, - }); - return [m.getName(), m] as const; - }), - ).values(), - ]; - if (fakeErrors.length) { - errors.push(...fakeErrors); - return true; + tagObjects.push(child.objects[0]!.type); + else { + indexes.push(i); + metadatas.push(child); } + }); - // ONLY ONE CHILD AFTER REMOVING DUPLICATES - if (children.length === 1) { - iterate_metadata(checker)(options)(collection)(errors)( - meta, - type.types[0]!, - explore, - ); - return true; - } else if (children.every((c) => c.objects.length === c.size())) - // ONLY OBJECT TYPED INTERSECTION (DETAILED) - return false; + const nonsensible = () => { + props.errors.push({ + name: children.map((c) => c.getName()).join(" & "), + explore: { ...props.explore }, + messages: ["nonsensible intersection"], + }); + return escape(true); + }; - // VALIDATE EACH TYPES - const nonsensible = () => { - errors.push({ + // NO METADATA CASE + if (metadatas.length === 0) + if (tagObjects.length !== 0) { + props.errors.push({ name: children.map((c) => c.getName()).join(" & "), - explore: { ...explore }, - messages: ["nonsensible intersection"], + explore: { ...props.explore }, + messages: ["type tag cannot be standalone"], }); - return true; - }; - const individuals: (readonly [Metadata, number])[] = children - .map((child, i) => [child, i] as const) - .filter( - ([c]) => - (c.size() === 1 && - (c.atomics.length === 1 || - (c.constants.length === 1 && - c.constants[0]!.values.length === 1) || - c.arrays.length === 1)) || - c.templates.length === 1, - ); - if (individuals.length !== 1) return nonsensible(); - - const objects: Metadata[] = children.filter( - (c) => - c.nullable === false && - c.isRequired() === true && - c.objects.length && - c.objects.length === c.size() && - c.objects.every((o) => o.properties.every((p) => p.value.optional)), - ); - const arrays: Set = new Set( - individuals.map(([c]) => c.arrays.map((a) => a.type.name)).flat(), - ); - const atomics: Set<"boolean" | "bigint" | "number" | "string"> = new Set( - individuals.map(([c]) => [...c.atomics.map((a) => a.type)]).flat(), - ); - const constants: Metadata[] = individuals - .filter((i) => i[0].constants.length === 1) - .map(([m]) => m); - const templates: Metadata[] = individuals - .filter((i) => i[0].templates.length === 1) - .map(([m]) => m); - - // ESCAPE WHEN ONLY CONSTANT TYPES EXIST - if ( - atomics.size + constants.length + arrays.size + templates.length > 1 || - individuals.length + objects.length !== children.length - ) - return nonsensible(); + return escape(true); + } else return escape(false); + // ONLY OBJECTS CASE + else if ( + metadatas.every((m) => m.objects.length === 1) && + tagObjects.length === 0 + ) + return escape(false); + else if (metadatas.length !== 1) { + const indexes: number[] = metadatas + .map((m, i) => + m.size() === 1 && + m.objects.length === 1 && + (m.objects[0]!.type.properties.length === 0 || + m.objects[0]!.type.properties.every((p) => p.value.optional === true)) + ? i + : null, + ) + .filter((i) => i !== null); + if (indexes.length && metadatas.length !== indexes.length) + for (const i of indexes.reverse()) metadatas.splice(i, 1); + else return nonsensible(); + } else if (metadatas.some((m) => m.size() !== 1)) return nonsensible(); - // RE-GENERATE TYPE - const target: "boolean" | "bigint" | "number" | "string" | "array" = - arrays.size - ? "array" - : atomics.size - ? atomics.values().next().value! - : constants.length - ? constants[0]!.constants[0]!.type - : "string"; - if (target === "array") { - const name: string = arrays.values().next().value!; - if (!meta.arrays.some((a) => a.type.name === name)) { - iterate_metadata_array(checker)(options)(collection)(errors)( - meta, - type.types[individuals.find((i) => i[0].arrays.length === 1)![1]]!, - { - ...explore, - aliased: false, - escaped: false, - }, + const candidates: Map = new Map(); + const assigners: Array<(tags: IMetadataTypeTag[]) => void> = []; + for (const meta of metadatas) { + for (const a of meta.atomics) { + candidates.set(a.type, a.type); + assigners.push((tags) => + props.metadata.atomics + .find((atom) => atom.type === a.type) + ?.tags.push(tags), + ); + } + for (const c of meta.constants) + for (const v of c.values) { + candidates.set(c.type, c.type); + assigners.push((tags) => + props.metadata.constants + .find((constant) => constant.type === c.type) + ?.values.find((value) => value === v) + ?.tags?.push(tags), ); } - } else if (atomics.size) - ArrayUtil.add( - meta.atomics, - MetadataAtomic.create({ - type: atomics.values().next().value as "string", - tags: [], - }), - (a, b) => a.type === b.type, + for (const t of meta.templates) { + candidates.set("string", "string"); + assigners.push((tags) => + props.metadata.templates + .find((tpl) => tpl.getBaseName() === t.getBaseName()) + ?.tags.push(tags), + ); + } + if (meta.objects.length) { + candidates.set("object", "object"); + assigners.push((tags) => props.metadata.objects.at(-1)?.tags.push(tags)); + } + if (meta.arrays.length) { + candidates.set("array", "array"); + assigners.push((tags) => props.metadata.arrays.at(-1)?.tags.push(tags)); + } + if (meta.tuples.length) candidates.set("invalid", "tuple"); + for (const n of meta.natives) { + candidates.set(`native::${n.name}`, "object"); + assigners.push((tags) => + props.metadata.natives + .find((native) => native.name === n.name) + ?.tags.push(tags), ); - else if (constants.length) - ArrayUtil.take( - ArrayUtil.take( - meta.constants, - (o) => o.type === target, - () => - MetadataConstant.create({ - type: target, - values: [], - }), - ).values, - (o) => o.value === constants[0]!.constants[0]!.values[0]!.value, - () => - MetadataConstantValue.create({ - value: constants[0]!.constants[0]!.values[0]!.value, - tags: [], - }), + } + for (const s of meta.sets) { + candidates.set(`set::${s.value.getName()}`, "object"); + assigners.push((tags) => + props.metadata.sets + .find((set) => set.value.getName() === s.value.getName()) + ?.tags.push(tags), ); - else if (templates.length) - ArrayUtil.take( - meta.templates, - (o) => o.getBaseName() === templates[0]!.templates[0]!.getBaseName(), - () => - MetadataTemplate.create({ - row: templates[0]!.templates[0]!.row, - tags: [], - }), + } + for (const e of meta.maps) { + candidates.set(`map::${e.key.getName()}::${e.value.getName()}`, "object"); + assigners.push((tags) => + props.metadata.maps + .find( + (map) => + map.key.getName() === e.key.getName() && + map.value.getName() === e.value.getName(), + ) + ?.tags.push(tags), ); - - // ASSIGN TAGS - if (objects.length) { - const tags: IMetadataTypeTag[] = MetadataTypeTagFactory.analyze(errors)( - target, - )(objects.map((om) => om.objects).flat(), explore); - if (tags.length) - if (target === "array") meta.arrays.at(-1)!.tags.push(tags); - else if (atomics.size) - meta.atomics.find((a) => a.type === target)!.tags.push(tags); - else if (constants.length) { - const constant: MetadataConstant = meta.constants.find( - (c) => c.type === target, - )!; - const value: MetadataConstantValue = constant.values.find( - (v) => v.value === constants[0]!.constants[0]!.values[0]!.value, - )!; - value.tags ??= []; - value.tags.push(tags); - } else if (templates.length) { - const template: MetadataTemplate = meta.templates.find( - (t) => - t.getBaseName() === templates[0]!.templates[0]!.getBaseName(), - )!; - template.tags ??= []; - template.tags.push(tags); - } } - return true; - }; + } + if ( + candidates.size !== 1 || + candidates.has("nonsensible") + // || + // (candidates.size !== 1 && + // Array.from(candidates.keys()).some((v) => v !== "object")) + ) + return nonsensible(); + + const tags: IMetadataTypeTag[] = MetadataTypeTagFactory.analyze({ + errors: props.errors, + type: candidates.values().next().value as "string", + objects: tagObjects, + explore: props.explore, + }); + + Object.assign(props.collection, commit); + iterate_metadata({ + ...props, + type: props.type.types[indexes[0]!]!, + options: { + ...props.options, + functional: false, + }, + explore: { + ...props.explore, + aliased: false, + escaped: false, + }, + intersected: true, + }); + if (tags.length) assigners.forEach((fn) => fn(tags)); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_map.ts b/src/factories/internal/metadata/iterate_metadata_map.ts index c73d276a93..c586a8a9a2 100644 --- a/src/factories/internal/metadata/iterate_metadata_map.ts +++ b/src/factories/internal/metadata/iterate_metadata_map.ts @@ -1,50 +1,57 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; +import { MetadataMap } from "../../../schemas/metadata/MetadataMap"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; import { TypeFactory } from "../../TypeFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; -export const iterate_metadata_map = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - type = checker.getApparentType(type); +export const iterate_metadata_map = ( + props: IMetadataIteratorProps, +): boolean => { + const type: ts.Type = props.checker.getApparentType(props.type); - const name = TypeFactory.getFullName(checker)(type, type.getSymbol()); - const generic = type.aliasSymbol - ? type.aliasTypeArguments - : checker.getTypeArguments(type as ts.TypeReference); - if (name.substring(0, 4) !== "Map<" || generic?.length !== 2) return false; + const name: string = TypeFactory.getFullName({ + checker: props.checker, + type, + symbol: type.getSymbol(), + }); + const generic: readonly ts.Type[] | undefined = type.aliasSymbol + ? type.aliasTypeArguments + : props.checker.getTypeArguments(type as ts.TypeReference); + if (name.substring(0, 4) !== "Map<" || generic?.length !== 2) return false; - const key: ts.Type = generic[0]!; - const value: ts.Type = generic[1]!; + const key: ts.Type = generic[0]!; + const value: ts.Type = generic[1]!; - ArrayUtil.set( - meta.maps, - { - key: explore_metadata(checker)(options)(collection)(errors)(key, { - ...explore, + ArrayUtil.set( + props.metadata.maps, + MetadataMap.create({ + key: explore_metadata({ + ...props, + type: key, + explore: { + ...props.explore, escaped: false, aliased: false, - }), - value: explore_metadata(checker)(options)(collection)(errors)(value, { - ...explore, + }, + intersected: false, + }), + value: explore_metadata({ + ...props, + type: value, + explore: { + ...props.explore, escaped: false, aliased: false, - }), - }, - (elem) => `Map<${elem.key.getName()}, ${elem.value.getName()}>`, - ); - return true; - }; + }, + intersected: false, + }), + tags: [], + }), + (elem) => `Map<${elem.key.getName()}, ${elem.value.getName()}>`, + ); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_native.ts b/src/factories/internal/metadata/iterate_metadata_native.ts index e792b8f811..43d516834a 100644 --- a/src/factories/internal/metadata/iterate_metadata_native.ts +++ b/src/factories/internal/metadata/iterate_metadata_native.ts @@ -1,56 +1,90 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; +import { MetadataNative } from "../../../schemas/metadata/MetadataNative"; import { ArrayUtil } from "../../../utils/ArrayUtil"; import { TypeFactory } from "../../TypeFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; -export const iterate_metadata_native = - (checker: ts.TypeChecker) => - (meta: Metadata, type: ts.Type): boolean => { - const validator = validate(checker)(type); - const name: string = TypeFactory.getFullName(checker)( - type, - type.getSymbol(), +export const iterate_metadata_native = ( + props: IMetadataIteratorProps, +): boolean => { + const name: string = TypeFactory.getFullName({ + checker: props.checker, + type: props.type, + symbol: props.type.getSymbol(), + }); + const simple: IClassInfo | undefined = SIMPLES.get(name); + if ( + simple !== undefined && + validate({ + checker: props.checker, + type: props.type, + info: simple, + }) + ) { + ArrayUtil.take( + props.metadata.natives, + (native) => native.name === name, + () => + MetadataNative.create({ + name, + tags: [], + }), ); + return true; + } - const simple = SIMPLES.get(name); - if (simple && validator(simple)) { - ArrayUtil.set(meta.natives, name, (str) => str); + for (const generic of GENERICS) + if ( + name.substring(0, generic.name.length) === generic.name && + validate({ + checker: props.checker, + type: props.type, + info: generic, + }) + ) { + ArrayUtil.take( + props.metadata.natives, + (native) => native.name === name, + () => + MetadataNative.create({ + name: generic.name ?? name, + tags: [], + }), + ); return true; } + return false; +}; - for (const generic of GENERICS) - if ( - name.substring(0, generic.name.length) === generic.name && - validator(generic) - ) { - ArrayUtil.set(meta.natives, generic.name ?? name, (str) => str); - return true; - } - return false; - }; - -const validate = - (checker: ts.TypeChecker) => (type: ts.Type) => (info: IClassInfo) => - (info.methods ?? []).every((method) => { - const returnType = TypeFactory.getReturnType(checker)(type)(method.name); - return ( - returnType !== null && - checker.typeToString(returnType) === method.return - ); - }) && - (info.properties ?? []).every((property) => { - const prop = checker.getPropertyOfType(type, property.name); - const propType = prop?.valueDeclaration - ? checker.getTypeAtLocation(prop?.valueDeclaration) - : undefined; - return ( - propType !== undefined && - checker.typeToString(propType) === property.type - ); +const validate = (props: { + checker: ts.TypeChecker; + type: ts.Type; + info: IClassInfo; +}) => + (props.info.methods ?? []).every((method) => { + const returnType = TypeFactory.getReturnTypeOfClassMethod({ + checker: props.checker, + class: props.type, + function: method.name, }); + return ( + returnType !== null && + props.checker.typeToString(returnType) === method.return + ); + }) && + (props.info.properties ?? []).every((property) => { + const prop = props.checker.getPropertyOfType(props.type, property.name); + const propType = prop?.valueDeclaration + ? props.checker.getTypeAtLocation(prop?.valueDeclaration) + : undefined; + return ( + propType !== undefined && + props.checker.typeToString(propType) === property.type + ); + }); const getBinaryProps = (className: string): IClassInfo => ({ name: className, diff --git a/src/factories/internal/metadata/iterate_metadata_object.ts b/src/factories/internal/metadata/iterate_metadata_object.ts index 19235e2e19..46919315cd 100644 --- a/src/factories/internal/metadata/iterate_metadata_object.ts +++ b/src/factories/internal/metadata/iterate_metadata_object.ts @@ -1,33 +1,35 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataObject } from "../../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../../schemas/metadata/MetadataObjectType"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { emplace_metadata_object } from "./emplace_metadata_object"; -export const iterate_metadata_object = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - (meta: Metadata, type: ts.Type, ensure: boolean = false): boolean => { - if (ensure === false) { - const filter = (flag: ts.TypeFlags) => (type.getFlags() & flag) !== 0; - if ( - !filter(ts.TypeFlags.Object) && - !type.isIntersection() && - (type as any).intrinsicName !== "object" - ) - return false; - } +export const iterate_metadata_object = ( + props: IMetadataIteratorProps, + ensure: boolean = false, +): boolean => { + if (ensure === false) { + const filter = (flag: ts.TypeFlags) => (props.type.getFlags() & flag) !== 0; + if ( + !filter(ts.TypeFlags.Object) && + !props.type.isIntersection() && + (props.type as any).intrinsicName !== "object" + ) + return false; + } - const obj: MetadataObject = emplace_metadata_object(checker)(options)( - collection, - )(errors)(type, meta.nullable); - ArrayUtil.add(meta.objects, obj, (elem) => elem.name === obj.name); - return true; - }; + const obj: MetadataObjectType = emplace_metadata_object(props); + ArrayUtil.add( + props.metadata.objects, + MetadataObject.create({ + type: obj, + tags: [], + }), + (elem) => elem.type.name === obj.name, + ); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_set.ts b/src/factories/internal/metadata/iterate_metadata_set.ts index 19f3de0a37..4801e20b92 100644 --- a/src/factories/internal/metadata/iterate_metadata_set.ts +++ b/src/factories/internal/metadata/iterate_metadata_set.ts @@ -1,41 +1,57 @@ import ts from "typescript"; import { Metadata } from "../../../schemas/metadata/Metadata"; +import { MetadataSet } from "../../../schemas/metadata/MetadataSet"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; import { TypeFactory } from "../../TypeFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { explore_metadata } from "./explore_metadata"; -export const iterate_metadata_set = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - type = checker.getApparentType(type); +export const iterate_metadata_set = ( + props: IMetadataIteratorProps, +): boolean => { + const type: ts.Type = props.checker.getApparentType(props.type); - const name = TypeFactory.getFullName(checker)(type, type.getSymbol()); - const generic = type.aliasSymbol - ? type.aliasTypeArguments - : checker.getTypeArguments(type as ts.TypeReference); - if (name.substring(0, 4) !== "Set<" || generic?.length !== 1) return false; + const name = TypeFactory.getFullName({ + checker: props.checker, + type: type, + symbol: type.getSymbol(), + }); + const generic = type.aliasSymbol + ? type.aliasTypeArguments + : props.checker.getTypeArguments(type as ts.TypeReference); + if (name.substring(0, 4) !== "Set<" || generic?.length !== 1) return false; - const key: ts.Type = generic[0]!; - ArrayUtil.set( - meta.sets, - explore_metadata(checker)(options)(collection)(errors)(key, { - ...explore, - escaped: false, - aliased: false, + const key: ts.Type = generic[0]!; + const value: Metadata = explore_metadata({ + ...props, + type: key, + explore: { + ...props.explore, + escaped: false, + aliased: false, + }, + intersected: false, + }); + ArrayUtil.take( + props.metadata.sets, + (elem) => elem.value.getName() === value.getName(), + () => + MetadataSet.create({ + value: explore_metadata({ + ...props, + type: key, + explore: { + ...props.explore, + escaped: false, + aliased: false, + }, + intersected: false, + }), + tags: [], }), - (elem) => elem.getName(), - ); - return true; - }; + ); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_sort.ts b/src/factories/internal/metadata/iterate_metadata_sort.ts index 270355c0cf..d774f133a1 100644 --- a/src/factories/internal/metadata/iterate_metadata_sort.ts +++ b/src/factories/internal/metadata/iterate_metadata_sort.ts @@ -1,74 +1,87 @@ import { Metadata } from "../../../schemas/metadata/Metadata"; -import { MetadataObject } from "../../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../../schemas/metadata/MetadataObjectType"; import { MetadataCollection } from "../../MetadataCollection"; -export const iterate_metadata_sort = - (collection: MetadataCollection) => (meta: Metadata) => { - const visited: Set = new Set(); - for (const array of collection.arrays()) - iterate(visited)(collection)(array.value); - for (const tuple of collection.tuples()) - for (const element of tuple.elements) - iterate(visited)(collection)(element); - for (const object of collection.objects()) - for (const property of object.properties) - iterate(visited)(collection)(property.value); - iterate(visited)(collection)(meta); - }; +export const iterate_metadata_sort = (props: { + collection: MetadataCollection; + metadata: Metadata; +}) => { + const visited: Set = new Set(); + const next = (metadata: Metadata) => + iterate({ + visited, + collection: props.collection, + metadata, + }); + for (const array of props.collection.arrays()) next(array.value); + for (const tuple of props.collection.tuples()) + for (const element of tuple.elements) next(element); + for (const object of props.collection.objects()) + for (const property of object.properties) next(property.value); + next(props.metadata); +}; -const iterate = - (visited: Set) => - (collection: MetadataCollection) => - (meta: Metadata) => { - if (visited.has(meta)) return; - visited.add(meta); +const iterate = (props: { + visited: Set; + collection: MetadataCollection; + metadata: Metadata; +}) => { + if (props.visited.has(props.metadata)) return; + props.visited.add(props.metadata); - // ITERATE CHILDREN - for (const map of meta.maps) iterate(visited)(collection)(map.value); - for (const set of meta.sets) iterate(visited)(collection)(set); - if (meta.escaped !== null) - iterate(visited)(collection)(meta.escaped.returns); - if (meta.rest !== null) iterate(visited)(collection)(meta.rest); + const next = (metadata: Metadata) => + iterate({ + ...props, + metadata, + }); - // SORT OBJECTS - if (meta.objects.length > 1) { - meta.objects.sort((x, y) => - MetadataObject.covers(x, y) ? -1 : MetadataObject.covers(y, x) ? 1 : 0, - ); - meta.union_index = collection.getUnionIndex(meta); - } + // ITERATE CHILDREN + for (const map of props.metadata.maps) next(map.value); + for (const set of props.metadata.sets) next(set.value); + if (props.metadata.escaped !== null) next(props.metadata.escaped.returns); + if (props.metadata.rest !== null) next(props.metadata.rest); - // SORT ARRAYS AND TUPLES - if (meta.arrays.length > 1) - meta.arrays.sort((x, y) => - Metadata.covers(x.type.value, y.type.value) - ? -1 - : Metadata.covers(y.type.value, x.type.value) - ? 1 - : 0, - ); - if (meta.tuples.length > 1) - meta.tuples.sort((x, y) => { - const xt = Metadata.initialize(); - const yt = Metadata.initialize(); + // SORT OBJECTS + if (props.metadata.objects.length > 1) { + props.metadata.objects.sort((x, y) => + MetadataObjectType.covers(x.type, y.type) + ? -1 + : MetadataObjectType.covers(y.type, x.type) + ? 1 + : 0, + ); + props.metadata.union_index = props.collection.getUnionIndex(props.metadata); + } - xt.tuples.push(x); - yt.tuples.push(y); + // SORT ARRAYS AND TUPLES + if (props.metadata.arrays.length > 1) + props.metadata.arrays.sort((x, y) => + Metadata.covers(x.type.value, y.type.value) + ? -1 + : Metadata.covers(y.type.value, x.type.value) + ? 1 + : 0, + ); + if (props.metadata.tuples.length > 1) + props.metadata.tuples.sort((x, y) => { + const xt = Metadata.initialize(); + const yt = Metadata.initialize(); - return Metadata.covers(xt, yt) ? -1 : Metadata.covers(yt, xt) ? 1 : 0; - }); + xt.tuples.push(x); + yt.tuples.push(y); - // SORT CONSTANT VALUES - for (const constant of meta.constants) - if (constant.type === "string") constant.values.sort(); - else if (constant.type === "number") - constant.values.sort( - (a, b) => (a.value as number) - (b.value as number), - ); - else if (constant.type === "bigint") - constant.values.sort((a, b) => - (a.value as bigint) < (b.value as bigint) ? -1 : 1, - ); - else constant.values.sort((a, _b) => (a.value === false ? -1 : 1)); - }; + return Metadata.covers(xt, yt) ? -1 : Metadata.covers(yt, xt) ? 1 : 0; + }); + + // SORT CONSTANT VALUES + for (const constant of props.metadata.constants) + if (constant.type === "string") constant.values.sort(); + else if (constant.type === "number") + constant.values.sort((a, b) => (a.value as number) - (b.value as number)); + else if (constant.type === "bigint") + constant.values.sort((a, b) => + (a.value as bigint) < (b.value as bigint) ? -1 : 1, + ); + else constant.values.sort((a, _b) => (a.value === false ? -1 : 1)); +}; diff --git a/src/factories/internal/metadata/iterate_metadata_template.ts b/src/factories/internal/metadata/iterate_metadata_template.ts index da682dc959..6c3ca266aa 100644 --- a/src/factories/internal/metadata/iterate_metadata_template.ts +++ b/src/factories/internal/metadata/iterate_metadata_template.ts @@ -3,42 +3,39 @@ import ts from "typescript"; import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataTemplate } from "../../../schemas/metadata/MetadataTemplate"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { MetadataHelper } from "./MetadataHelper"; import { explore_metadata } from "./explore_metadata"; -export const iterate_metadata_template = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - const filter = (flag: ts.TypeFlags) => (type.getFlags() & flag) !== 0; - if (!filter(ts.TypeFlags.TemplateLiteral)) return false; +export const iterate_metadata_template = ( + props: IMetadataIteratorProps, +): boolean => { + const filter = (flag: ts.TypeFlags) => (props.type.getFlags() & flag) !== 0; + if (!filter(ts.TypeFlags.TemplateLiteral)) return false; - const template: ts.TemplateLiteralType = type as ts.TemplateLiteralType; - const row: Metadata[] = []; + const template: ts.TemplateLiteralType = props.type as ts.TemplateLiteralType; + const row: Metadata[] = []; - template.texts.forEach((text, i) => { - // TEXT LITERAL TYPE - if (text !== "") row.push(MetadataHelper.literal_to_metadata(text)); + template.texts.forEach((text, i) => { + // TEXT LITERAL TYPE + if (text !== "") row.push(MetadataHelper.literal_to_metadata(text)); - // BINDED TEMPLATE TYPE - const binded: ts.Type | undefined = template.types[i]; - if (binded) - row.push( - explore_metadata(checker)(options)(collection)(errors)(binded, { - ...explore, + // BINDED TEMPLATE TYPE + const binded: ts.Type | undefined = template.types[i]; + if (binded) + row.push( + explore_metadata({ + ...props, + type: binded, + explore: { + ...props.explore, escaped: false, aliased: false, - }), - ); - }); - meta.templates.push(MetadataTemplate.create({ row, tags: undefined })); - return true; - }; + }, + intersected: false, + }), + ); + }); + props.metadata.templates.push(MetadataTemplate.create({ row, tags: [] })); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_tuple.ts b/src/factories/internal/metadata/iterate_metadata_tuple.ts index b5cdb940d4..2557eb4307 100644 --- a/src/factories/internal/metadata/iterate_metadata_tuple.ts +++ b/src/factories/internal/metadata/iterate_metadata_tuple.ts @@ -1,37 +1,26 @@ import ts from "typescript"; -import { Metadata } from "../../../schemas/metadata/Metadata"; import { MetadataTuple } from "../../../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../../../schemas/metadata/MetadataTupleType"; import { ArrayUtil } from "../../../utils/ArrayUtil"; -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { emplace_metadata_tuple } from "./emplace_metadata_tuple"; -export const iterate_metadata_tuple = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.TupleType, - explore: MetadataFactory.IExplore, - ): boolean => { - if (!checker.isTupleType(type)) return false; +export const iterate_metadata_tuple = ( + props: IMetadataIteratorProps, +): boolean => { + if (!props.checker.isTupleType(props.type)) return false; - const tupleType: MetadataTupleType = emplace_metadata_tuple(checker)( - options, - )(collection)(errors)(type, meta.nullable, explore); - ArrayUtil.add( - meta.tuples, - MetadataTuple.create({ - type: tupleType, - tags: [], - }), - (elem) => elem.type.name === tupleType.name, - ); - return true; - }; + const tupleType: MetadataTupleType = emplace_metadata_tuple(props); + ArrayUtil.add( + props.metadata.tuples, + MetadataTuple.create({ + type: tupleType, + tags: [], + }), + (elem) => elem.type.name === tupleType.name, + ); + return true; +}; diff --git a/src/factories/internal/metadata/iterate_metadata_union.ts b/src/factories/internal/metadata/iterate_metadata_union.ts index 11e45e234b..7944e6634f 100644 --- a/src/factories/internal/metadata/iterate_metadata_union.ts +++ b/src/factories/internal/metadata/iterate_metadata_union.ts @@ -1,27 +1,19 @@ -import ts from "typescript"; - -import { Metadata } from "../../../schemas/metadata/Metadata"; - -import { MetadataCollection } from "../../MetadataCollection"; -import { MetadataFactory } from "../../MetadataFactory"; +import { IMetadataIteratorProps } from "./IMetadataIteratorProps"; import { iterate_metadata } from "./iterate_metadata"; -export const iterate_metadata_union = - (checker: ts.TypeChecker) => - (options: MetadataFactory.IOptions) => - (collection: MetadataCollection) => - (errors: MetadataFactory.IError[]) => - ( - meta: Metadata, - type: ts.Type, - explore: MetadataFactory.IExplore, - ): boolean => { - if (!type.isUnion()) return false; - type.types.forEach((t) => - iterate_metadata(checker)(options)(collection)(errors)(meta, t, { - ...explore, +export const iterate_metadata_union = ( + props: IMetadataIteratorProps, +): boolean => { + if (!props.type.isUnion()) return false; + props.type.types.forEach((t) => + iterate_metadata({ + ...props, + type: t, + explore: { + ...props.explore, aliased: false, - }), - ); - return true; - }; + }, + }), + ); + return true; +}; diff --git a/src/functional.ts b/src/functional.ts index f43e7ce605..660caafe0b 100644 --- a/src/functional.ts +++ b/src/functional.ts @@ -1,5 +1,3 @@ -import * as Namespace from "./functional/Namespace"; - import { IValidation } from "./IValidation"; import { TypeGuardError } from "./TypeGuardError"; @@ -43,7 +41,7 @@ import { TypeGuardError } from "./TypeGuardError"; * * @author Jeongho Nam - https://github.com/samchon */ -function assertFunction any>( +export function assertFunction any>( func: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -51,19 +49,9 @@ function assertFunction any>( /** * @internal */ -function assertFunction(): never { +export function assertFunction(): never { halt("assertFunction"); } -const assertFunctionPure = /** @__PURE__ */ Object.assign< - typeof assertFunction, - {}, - {} ->( - assertFunction, - /** @__PURE__ */ Namespace.assert("functional.assertFunction"), - /** @__PURE__ */ Namespace.functional.functionalAssert(), -); -export { assertFunctionPure as assertFunction }; /** * Asserts parameters. @@ -93,7 +81,7 @@ export { assertFunctionPure as assertFunction }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertParameters any>( +export function assertParameters any>( func: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -101,19 +89,9 @@ function assertParameters any>( /** * @internal */ -function assertParameters(): never { +export function assertParameters(): never { halt("assertParameters"); } -const assertParametersPure = /** @__PURE__ */ Object.assign< - typeof assertParameters, - {}, - {} ->( - assertFunction, - /** @__PURE__ */ Namespace.assert("functional.assertFunction"), - /** @__PURE__ */ Namespace.functional.functionalAssert(), -); -export { assertParametersPure as assertParameters }; /** * Asserts return value. @@ -143,7 +121,7 @@ export { assertParametersPure as assertParameters }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertReturn any>( +export function assertReturn any>( func: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -151,19 +129,9 @@ function assertReturn any>( /** * @internal */ -function assertReturn(): never { +export function assertReturn(): never { halt("assertReturn"); } -const assertReturnPure = /** @__PURE__ */ Object.assign< - typeof assertReturn, - {}, - {} ->( - assertReturn, - /** @__PURE__ */ Namespace.assert("functional.assertReturn"), - /** @__PURE__ */ Namespace.functional.functionalAssert(), -); -export { assertReturnPure as assertReturn }; /** * Asserts a function with strict equality. @@ -198,7 +166,7 @@ export { assertReturnPure as assertReturn }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertEqualsFunction any>( +export function assertEqualsFunction any>( func: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -206,19 +174,9 @@ function assertEqualsFunction any>( /** * @internal */ -function assertEqualsFunction(): never { +export function assertEqualsFunction(): never { halt("assertEqualsFunction"); } -const assertEqualsFunctionPure = /** @__PURE__ */ Object.assign< - typeof assertEqualsFunction, - {}, - {} ->( - assertEqualsFunction, - /** @__PURE__ */ Namespace.assert("functional.assertEqualsFunction"), - /** @__PURE__ */ Namespace.functional.functionalAssert(), -); -export { assertEqualsFunctionPure as assertEqualsFunction }; /** * Asserts parameters with strict equality. @@ -249,7 +207,7 @@ export { assertEqualsFunctionPure as assertEqualsFunction }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertEqualsParameters any>( +export function assertEqualsParameters any>( func: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -257,19 +215,9 @@ function assertEqualsParameters any>( /** * @internal */ -function assertEqualsParameters(): never { +export function assertEqualsParameters(): never { halt("assertEqualsParameters"); } -const assertEqualsParametersPure = /** @__PURE__ */ Object.assign< - typeof assertEqualsParameters, - {}, - {} ->( - assertEqualsParameters, - /** @__PURE__ */ Namespace.assert("functional.assertEqualsParameters"), - /** @__PURE__ */ Namespace.functional.functionalAssert(), -); -export { assertEqualsParametersPure as assertEqualsParameters }; /** * Asserts return value with strict equality. @@ -299,7 +247,7 @@ export { assertEqualsParametersPure as assertEqualsParameters }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertEqualsReturn any>( +export function assertEqualsReturn any>( func: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -307,19 +255,9 @@ function assertEqualsReturn any>( /** * @internal */ -function assertEqualsReturn(): never { +export function assertEqualsReturn(): never { halt("assertEqualsReturn"); } -const assertEqualsReturnPure = /** @__PURE__ */ Object.assign< - typeof assertEqualsReturn, - {}, - {} ->( - assertEqualsReturn, - /** @__PURE__ */ Namespace.assert("functional.assertEqualsReturn"), - /** @__PURE__ */ Namespace.functional.functionalAssert(), -); -export { assertEqualsReturnPure as assertEqualsReturn }; /* ----------------------------------------------------------- IS @@ -346,7 +284,7 @@ export { assertEqualsReturnPure as assertEqualsReturn }; * * @author Jeongho Nam - https://github.com/samchon */ -function isFunction any>( +export function isFunction any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -357,14 +295,9 @@ function isFunction any>( /** * @internal */ -function isFunction(): never { +export function isFunction(): never { halt("isFunction"); } -const isFunctionPure = /** @__PURE__ */ Object.assign( - isFunction, - /** @__PURE__ */ Namespace.is(), -); -export { isFunctionPure as isFunction }; /** * Tests parameters. @@ -388,7 +321,7 @@ export { isFunctionPure as isFunction }; * * @author Jeongho Nam - https://github.com/samchon */ -function isParameters any>( +export function isParameters any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -399,14 +332,9 @@ function isParameters any>( /** * @internal */ -function isParameters(): never { +export function isParameters(): never { halt("isParameters"); } -const isParametersPure = /** @__PURE__ */ Object.assign< - typeof isParameters, - {} ->(isParameters, /** @__PURE__ */ Namespace.is()); -export { isParametersPure as isParameters }; /** * Tests return value. @@ -430,7 +358,7 @@ export { isParametersPure as isParameters }; * * @author Jeongho Nam - https://github.com/samchon */ -function isReturn any>( +export function isReturn any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -441,14 +369,9 @@ function isReturn any>( /** * @internal */ -function isReturn(): never { +export function isReturn(): never { halt("isReturn"); } -const isReturnPure = /** @__PURE__ */ Object.assign( - isReturn, - /** @__PURE__ */ Namespace.is(), -); -export { isReturnPure as isReturn }; /** * Tests a function with strict equality. @@ -471,7 +394,7 @@ export { isReturnPure as isReturn }; * * @author Jeongho Nam - https://github.com/samchon */ -function equalsFunction any>( +export function equalsFunction any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -482,14 +405,9 @@ function equalsFunction any>( /** * @internal */ -function equalsFunction(): never { +export function equalsFunction(): never { halt("equalsFunction"); } -const equalsFunctionPure = /** @__PURE__ */ Object.assign< - typeof equalsFunction, - {} ->(equalsFunction, /** @__PURE__ */ Namespace.is()); -export { equalsFunctionPure as equalsFunction }; /** * Tests parameters with strict equality. @@ -509,7 +427,7 @@ export { equalsFunctionPure as equalsFunction }; * * @author Jeongho Nam - https://github.com/samchon */ -function equalsParameters any>( +export function equalsParameters any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -520,14 +438,9 @@ function equalsParameters any>( /** * @internal */ -function equalsParameters(): never { +export function equalsParameters(): never { halt("equalsParameters"); } -const equalsParametersPure = /** @__PURE__ */ Object.assign< - typeof equalsParameters, - {} ->(equalsParameters, /** @__PURE__ */ Namespace.is()); -export { equalsParametersPure as equalsParameters }; /** * Tests return value with strict equality. @@ -550,7 +463,7 @@ export { equalsParametersPure as equalsParameters }; * * @author Jeongho Nam - https://github.com/samchon */ -function equalsReturn any>( +export function equalsReturn any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -561,14 +474,9 @@ function equalsReturn any>( /** * @internal */ -function equalsReturn(): never { +export function equalsReturn(): never { halt("equalsReturn"); } -const equalsReturnPure = /** @__PURE__ */ Object.assign< - typeof equalsReturn, - {} ->(equalsReturn, /** @__PURE__ */ Namespace.is()); -export { equalsReturnPure as equalsReturn }; /* ----------------------------------------------------------- VALIDATE @@ -604,7 +512,7 @@ export { equalsReturnPure as equalsReturn }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateFunction any>( +export function validateFunction any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -615,14 +523,9 @@ function validateFunction any>( /** * @internal */ -function validateFunction(): never { +export function validateFunction(): never { halt("validateFunction"); } -const validateFunctionPure = /** @__PURE__ */ Object.assign< - typeof validateFunction, - {} ->(validateFunction, /** @__PURE__ */ Namespace.validate()); -export { validateFunctionPure as validateFunction }; /** * Validates parameters. @@ -650,7 +553,7 @@ export { validateFunctionPure as validateFunction }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateParameters any>( +export function validateParameters any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -661,14 +564,9 @@ function validateParameters any>( /** * @internal */ -function validateParameters(): never { +export function validateParameters(): never { halt("validateReturn"); } -const validateParametersPure = /** @__PURE__ */ Object.assign< - typeof validateParameters, - {} ->(validateParameters, /** @__PURE__ */ Namespace.validate()); -export { validateParametersPure as validateParameters }; /** * Validates return value. @@ -696,7 +594,7 @@ export { validateParametersPure as validateParameters }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateReturn any>( +export function validateReturn any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -707,14 +605,9 @@ function validateReturn any>( /** * @internal */ -function validateReturn(): never { +export function validateReturn(): never { halt("validateReturn"); } -const validateReturnPure = /** @__PURE__ */ Object.assign< - typeof validateReturn, - {} ->(validateReturn, /** @__PURE__ */ Namespace.validate()); -export { validateReturnPure as validateReturn }; /** * Validates a function with strict equality. @@ -747,7 +640,7 @@ export { validateReturnPure as validateReturn }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEqualsFunction any>( +export function validateEqualsFunction any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -758,14 +651,9 @@ function validateEqualsFunction any>( /** * @internal */ -function validateEqualsFunction(): never { +export function validateEqualsFunction(): never { halt("validateEqualsFunction"); } -const validateEqualsFunctionPure = /** @__PURE__ */ Object.assign< - typeof validateEqualsFunction, - {} ->(validateEqualsFunction, /** @__PURE__ */ Namespace.validate()); -export { validateEqualsFunctionPure as validateEqualsFunction }; /** * Validates parameters with strict equality. @@ -793,7 +681,7 @@ export { validateEqualsFunctionPure as validateEqualsFunction }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEqualsParameters any>( +export function validateEqualsParameters any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -804,14 +692,9 @@ function validateEqualsParameters any>( /** * @internal */ -function validateEqualsParameters(): never { +export function validateEqualsParameters(): never { halt("validateEqualsParameters"); } -const validateEqualsParametersPure = /** @__PURE__ */ Object.assign< - typeof validateEqualsParameters, - {} ->(validateEqualsParameters, /** @__PURE__ */ Namespace.validate()); -export { validateEqualsParametersPure as validateEqualsParameters }; /** * Validates return value with strict equality. @@ -839,7 +722,7 @@ export { validateEqualsParametersPure as validateEqualsParameters }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEqualsReturn any>( +export function validateEqualsReturn any>( func: T, ): T extends (...args: infer Arguments) => infer Output ? Output extends Promise @@ -850,14 +733,9 @@ function validateEqualsReturn any>( /** * @internal */ -function validateEqualsReturn(): never { +export function validateEqualsReturn(): never { halt("validateEqualsReturn"); } -const validateEqualsReturnPure = /** @__PURE__ */ Object.assign< - typeof validateEqualsReturn, - {} ->(validateEqualsReturn, /** @__PURE__ */ Namespace.validate()); -export { validateEqualsReturnPure as validateEqualsReturn }; /* ----------------------------------------------------------- HALTER diff --git a/src/functional/$FormDataReader/$FormDataReader.ts b/src/functional/$FormDataReader/$FormDataReader.ts deleted file mode 100644 index a4dc387558..0000000000 --- a/src/functional/$FormDataReader/$FormDataReader.ts +++ /dev/null @@ -1,83 +0,0 @@ -export const boolean = ( - input: string | File | null, -): boolean | null | undefined => - input instanceof File - ? (input as any) - : input === null - ? undefined - : input === "null" - ? null - : input.length === 0 - ? true - : input === "true" || input === "1" - ? true - : input === "false" || input === "0" - ? false - : (input as any); // wrong type - -export const number = ( - input: string | File | null, -): number | null | undefined => - input instanceof File - ? (input as any) - : !!input?.length - ? input === "null" - ? null - : (toNumber(input) as any) - : undefined; - -export const bigint = ( - input: string | File | null, -): bigint | null | undefined => - input instanceof File - ? (input as any) - : !!input?.length - ? input === "null" - ? null - : (toBigint(input) as any) - : undefined; - -export const string = ( - input: string | File | null, -): string | null | undefined => - input instanceof File - ? (input as any) - : input === null - ? undefined - : input === "null" - ? null - : input; - -export const array = (input: any[], alternative: null | undefined) => - input.length ? input : alternative; - -export const blob = (input: string | Blob | null): Blob | null | undefined => - input instanceof Blob - ? input - : input === null - ? undefined - : input === "null" - ? null - : (input as any); - -export const file = (input: string | File | null): File | null | undefined => - input instanceof File - ? input - : input === null - ? undefined - : input === "null" - ? null - : (input as any); - -const toNumber = (str: string): number | string => { - const value: number = Number(str); - return isNaN(value) ? str : value; -}; - -const toBigint = (str: string): bigint | string => { - try { - return BigInt(str); - } catch { - return str; - } -}; diff --git a/src/functional/$FormDataReader/index.ts b/src/functional/$FormDataReader/index.ts deleted file mode 100644 index 94ac492189..0000000000 --- a/src/functional/$FormDataReader/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as $FormDataReader from "./$FormDataReader"; diff --git a/src/functional/$HeadersReader/$HeadersReader.ts b/src/functional/$HeadersReader/$HeadersReader.ts deleted file mode 100644 index fcb653f389..0000000000 --- a/src/functional/$HeadersReader/$HeadersReader.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const boolean = (value: string | undefined) => - value !== undefined - ? value === "true" - ? true - : value === "false" - ? false - : value - : undefined; -export const bigint = (value: string | undefined) => - value !== undefined ? toBigint(value) : undefined; -export const number = (value: string | undefined) => - value !== undefined ? toNumber(value) : undefined; -export const string = (value: string | undefined) => value; - -const toBigint = (str: string): bigint | string => { - try { - return BigInt(str); - } catch { - return str; - } -}; - -const toNumber = (str: string): number | string => { - const value: number = Number(str); - return isNaN(value) ? str : value; -}; diff --git a/src/functional/$HeadersReader/index.ts b/src/functional/$HeadersReader/index.ts deleted file mode 100644 index d1d6fdad9f..0000000000 --- a/src/functional/$HeadersReader/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as $HeadersReader from "./$HeadersReader"; diff --git a/src/functional/$ParameterReader/$ParameterReader.ts b/src/functional/$ParameterReader/$ParameterReader.ts deleted file mode 100644 index e835b61648..0000000000 --- a/src/functional/$ParameterReader/$ParameterReader.ts +++ /dev/null @@ -1,29 +0,0 @@ -export const boolean = (value: string) => - value !== "null" - ? value === "true" || value === "1" - ? true - : value === "false" || value === "0" - ? false - : value - : null; - -export const bigint = (value: string) => - value !== "null" ? toBigint(value) : null; - -export const number = (value: string) => - value !== "null" ? toNumber(value) : null; - -export const string = (value: string) => (value !== "null" ? value : null); - -const toNumber = (str: string): number | string => { - const value: number = Number(str); - return isNaN(value) ? str : value; -}; - -const toBigint = (str: string): bigint | string => { - try { - return BigInt(str); - } catch { - return str; - } -}; diff --git a/src/functional/$ParameterReader/index.ts b/src/functional/$ParameterReader/index.ts deleted file mode 100644 index 3e3aee0220..0000000000 --- a/src/functional/$ParameterReader/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as $ParameterReader from "./$ParameterReader"; diff --git a/src/functional/$ProtobufReader.ts b/src/functional/$ProtobufReader.ts deleted file mode 100644 index fee1014195..0000000000 --- a/src/functional/$ProtobufReader.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { ProtobufWire } from "../programmers/helpers/ProtobufWire"; - -import { Singleton } from "../utils/Singleton"; - -/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedReader.ts -export class $ProtobufReader { - /** - * Read buffer - */ - private buf: Uint8Array; - - /** - * Read buffer pointer. - */ - private ptr: number; - - /** - * DataView for buffer. - */ - private view: DataView; - - public constructor(buf: Uint8Array) { - this.buf = buf; - this.ptr = 0; - this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); - } - - public index(): number { - return this.ptr; - } - - public size(): number { - return this.buf.length; - } - - public uint32(): number { - return this.varint32(); - } - - public int32(): number { - return this.varint32(); - } - - public sint32(): number { - const value: number = this.varint32(); - return (value >>> 1) ^ -(value & 1); - } - - public uint64(): bigint { - return this.varint64(); - } - - public int64(): bigint { - return this.varint64(); - } - - public sint64(): bigint { - const value = this.varint64(); - return (value >> BigInt(0x01)) ^ -(value & BigInt(0x01)); - } - - public bool(): boolean { - return this.varint32() !== 0; - } - - public float(): number { - const value: number = this.view.getFloat32(this.ptr, true); - this.ptr += 4; - return value; - } - - public double(): number { - const value: number = this.view.getFloat64(this.ptr, true); - this.ptr += 8; - return value; - } - - public bytes(): Uint8Array { - const length: number = this.uint32(); - const from: number = this.ptr; - this.ptr += length; - return this.buf.subarray(from, from + length); - } - - public string(): string { - return utf8.get().decode(this.bytes()); - } - - public skip(length: number): void { - if (length === 0) while (this.u8() & 0x80); - else { - if (this.index() + length > this.size()) - throw new Error("Error on typia.protobuf.decode(): buffer overflow."); - this.ptr += length; - } - } - - public skipType(wireType: ProtobufWire): void { - switch (wireType) { - case ProtobufWire.VARIANT: - this.skip(0); - break; - case ProtobufWire.I64: - this.skip(8); - break; - case ProtobufWire.LEN: - this.skip(this.uint32()); - break; - case ProtobufWire.START_GROUP: - while ((wireType = this.uint32() & 0x07) !== ProtobufWire.END_GROUP) - this.skipType(wireType); - break; - case ProtobufWire.I32: - this.skip(4); - break; - default: - throw new Error(`Invalid wire type ${wireType} at offset ${this.ptr}.`); - } - } - - private varint32(): number { - let loaded: number; - let value: number; - - value = (loaded = this.u8()) & 0x7f; - if (loaded < 0x80) return value; - - value |= ((loaded = this.u8()) & 0x7f) << 7; - if (loaded < 0x80) return value; - - value |= ((loaded = this.u8()) & 0x7f) << 14; - if (loaded < 0x80) return value; - - value |= ((loaded = this.u8()) & 0x7f) << 21; - if (loaded < 0x80) return value; - - value |= ((loaded = this.u8()) & 0xf) << 28; - if (loaded < 0x80) return value; - - // increment position until there is no continuation bit or until we read 10 bytes - if (this.u8() < 0x80) return value; - if (this.u8() < 0x80) return value; - if (this.u8() < 0x80) return value; - if (this.u8() < 0x80) return value; - if (this.u8() < 0x80) return value; - - return value; - } - - private varint64(): bigint { - let loaded: bigint; - let value: bigint; - - value = (loaded = this.u8n()) & BigInt(0x7f); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(7); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(14); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(21); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(28); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(35); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(42); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(49); - if (loaded < BigInt(0x80)) return value; - - value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(56); - if (loaded < BigInt(0x80)) return value; - - value |= (this.u8n() & BigInt(0x01)) << BigInt(63); - return BigInt.asIntN(64, value); - } - - private u8(): number { - return this.view.getUint8(this.ptr++); - } - - private u8n(): bigint { - return BigInt(this.u8()); - } -} - -const utf8 = /** @__PURE__ */ new Singleton(() => new TextDecoder("utf-8")); diff --git a/src/functional/$ProtobufSizer.ts b/src/functional/$ProtobufSizer.ts deleted file mode 100644 index 9571ce49c3..0000000000 --- a/src/functional/$ProtobufSizer.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { $strlen } from "./$strlen"; -import { IProtobufWriter } from "./IProtobufWriter"; - -/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedSizer.ts -export class $ProtobufSizer implements IProtobufWriter { - /** - * Total length. - */ - public len: number; - - /** - * Position stack. - */ - public readonly pos: Array; - - /** - * Variable length list. - */ - public readonly varlen: Array; - - /** - * Variable length index stack. - */ - public readonly varlenidx: Array; - - public constructor(length: number = 0) { - this.len = length; - this.pos = []; - this.varlen = []; - this.varlenidx = []; - } - - public bool(): void { - this.len += 1; - } - public int32(value: number): void { - if (value < 0) { - // 10 bytes to encode negative number - this.len += 10; - } else { - this.varint32(value); - } - } - public sint32(value: number): void { - this.varint32((value << 1) ^ (value >> 31)); - } - public uint32(value: number): void { - this.varint32(value); - } - - public int64(value: bigint | number): void { - this.varint64(typeof value === "number" ? BigInt(value) : value); - } - public sint64(value: bigint | number): void { - if (typeof value === "number") value = BigInt(value); - this.varint64((value << BigInt(1)) ^ (value >> BigInt(63))); - } - public uint64(value: bigint | number): void { - this.varint64(typeof value === "number" ? BigInt(value) : value); - } - - // public fixed32(_value: number): void { - // this.len += 4; - // } - // public sfixed32(_value: number): void { - // this.len += 4; - // } - // public fixed64(_value: number | bigint): void { - // this.len += 8; - // } - // public sfixed64(_value: number | bigint): void { - // this.len += 8; - // } - public float(_value: number): void { - this.len += 4; - } - public double(_value: number): void { - this.len += 8; - } - - public bytes(value: Uint8Array): void { - this.uint32(value.byteLength); - this.len += value.byteLength; - } - public string(value: string): void { - const len: number = $strlen(value); - this.varlen.push(len); - this.uint32(len); - this.len += len; - } - - public fork(): void { - this.pos.push(this.len); // save current position - this.varlenidx.push(this.varlen.length); // save current index in varlen array - this.varlen.push(0); // add 0 length to varlen array (to be updated in ldelim()) - } - - public ldelim(): void { - if (!(this.pos.length && this.varlenidx.length)) - throw new Error( - "Error on typia.protobuf.encode(): missing fork() before ldelim() call.", - ); - - const endPos = this.len; // current position is end position - const startPos = this.pos.pop()!; // get start position from stack - const idx = this.varlenidx.pop()!; // get varlen index from stack - const len = endPos - startPos; // calculate length - - this.varlen[idx] = len; // update variable length - this.uint32(len); // add uint32 that should be called in fork() - } - - public reset(): void { - this.len = 0; - // re-use arrays - this.pos.length = 0; - this.varlen.length = 0; - this.varlenidx.length = 0; - } - - private varint32(value: number): void { - this.len += - value < 0 - ? 10 // 10 bits with leading 1's - : value < 0x80 - ? 1 - : value < 0x4000 - ? 2 - : value < 0x200000 - ? 3 - : value < 0x10000000 - ? 4 - : 5; - } - - private varint64(val: bigint): void { - val = BigInt.asUintN(64, val); - while (val > BigInt(0x7f)) { - ++this.len; - val = val >> BigInt(0x07); - } - ++this.len; - } -} diff --git a/src/functional/$ProtobufWriter.ts b/src/functional/$ProtobufWriter.ts deleted file mode 100644 index 31f0622eb6..0000000000 --- a/src/functional/$ProtobufWriter.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { Singleton } from "../utils/Singleton"; - -import { $ProtobufSizer } from "./$ProtobufSizer"; -import { IProtobufWriter } from "./IProtobufWriter"; - -/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedWriter.ts -export class $ProtobufWriter implements IProtobufWriter { - /** - * Related sizer - */ - private readonly sizer: $ProtobufSizer; - - /** - * Current pointer. - */ - private ptr: number; - - /** - * Protobuf buffer. - */ - private buf: Uint8Array; - - /** - * DataView for buffer. - */ - private view: DataView; - - /** - * Index in varlen array from sizer. - */ - private varlenidx: number; - - constructor(sizer: $ProtobufSizer) { - this.sizer = sizer; - this.buf = new Uint8Array(sizer.len); - this.view = new DataView(this.buf.buffer); - this.ptr = 0; - this.varlenidx = 0; - } - - buffer(): Uint8Array { - return this.buf; - } - - bool(value: boolean): void { - this.byte(value ? 1 : 0); - } - - byte(value: number): void { - this.buf[this.ptr++] = value & 255; - } - - int32(value: number): void { - if (value < 0) this.int64(value); - else this.variant32(value >>> 0); - } - - sint32(value: number): void { - this.variant32((value << 1) ^ (value >> 31)); - } - - uint32(value: number): void { - this.variant32(value); - } - - sint64(value: number | bigint): void { - value = BigInt(value); - this.variant64((value << BigInt(0x01)) ^ (value >> BigInt(0x3f))); - } - - int64(value: number | bigint): void { - this.variant64(BigInt(value)); - } - - uint64(value: number | bigint): void { - this.variant64(BigInt(value)); - } - - float(val: number): void { - this.view.setFloat32(this.ptr, val, true); - this.ptr += 4; - } - - double(val: number): void { - this.view.setFloat64(this.ptr, val, true); - this.ptr += 8; - } - - bytes(value: Uint8Array): void { - this.uint32(value.byteLength); - for (let i = 0; i < value.byteLength; i++) this.buf[this.ptr++] = value[i]!; - } - - string(value: string): void { - const len: number = this.varlen(); // use precomputed length - this.uint32(len); - - const binary: Uint8Array = utf8.get().encode(value); - for (let i = 0; i < binary.byteLength; i++) - this.buf[this.ptr++] = binary[i]!; - } - - fork(): void { - this.uint32(this.varlen()); // use precomputed length - } - - ldelim(): void { - // nothing to do - all dirty work done by sizer - } - - finish(): Uint8Array { - return this.buf; - } - - reset(): void { - this.buf = new Uint8Array(this.sizer.len); - this.view = new DataView(this.buf.buffer); - this.ptr = 0; - this.varlenidx = 0; - } - - private variant32(val: number): void { - while (val > 0x7f) { - this.buf[this.ptr++] = (val & 0x7f) | 0x80; - val = val >>> 7; - } - this.buf[this.ptr++] = val; - } - - private variant64(val: bigint): void { - val = BigInt.asUintN(64, val); - while (val > BigInt(0x7f)) { - this.buf[this.ptr++] = Number((val & BigInt(0x7f)) | BigInt(0x80)); - val = val >> BigInt(0x07); - } - this.buf[this.ptr++] = Number(val); - } - - private varlen(): number { - return this.varlenidx >= this.sizer.varlen.length - ? 0 - : this.sizer.varlen[this.varlenidx++]!; - } -} -const utf8 = /** @__PURE__ */ new Singleton(() => new TextEncoder()); diff --git a/src/functional/$QueryReader/$QueryReader.ts b/src/functional/$QueryReader/$QueryReader.ts deleted file mode 100644 index b47c312514..0000000000 --- a/src/functional/$QueryReader/$QueryReader.ts +++ /dev/null @@ -1,46 +0,0 @@ -export const boolean = (str: string | null): boolean | null | undefined => - str === null - ? undefined - : str === "null" - ? null - : str.length === 0 - ? true - : str === "true" || str === "1" - ? true - : str === "false" || str === "0" - ? false - : (str as any); // wrong type - -export const number = (str: string | null): number | null | undefined => - !!str?.length ? (str === "null" ? null : (toNumber(str) as any)) : undefined; - -export const bigint = (str: string | null): bigint | null | undefined => - !!str?.length ? (str === "null" ? null : (toBigint(str) as any)) : undefined; - -export const string = (str: string | null): string | null | undefined => - str === null ? undefined : str === "null" ? null : str; - -export const params = (input: string | URLSearchParams) => { - if (typeof input === "string") { - const index: number = input.indexOf("?"); - input = index === -1 ? "" : input.substring(index + 1); - return new URLSearchParams(input); - } - return input; -}; - -export const array = (input: any[], alternative: null | undefined) => - input.length ? input : alternative; - -const toNumber = (str: string): number | string => { - const value: number = Number(str); - return isNaN(value) ? str : value; -}; - -const toBigint = (str: string): bigint | string => { - try { - return BigInt(str); - } catch { - return str; - } -}; diff --git a/src/functional/$QueryReader/index.ts b/src/functional/$QueryReader/index.ts deleted file mode 100644 index 00c2c16116..0000000000 --- a/src/functional/$QueryReader/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as $QueryReader from "./$QueryReader"; diff --git a/src/functional/$any.ts b/src/functional/$any.ts deleted file mode 100644 index 8c9247a88c..0000000000 --- a/src/functional/$any.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $clone } from "./$clone"; - -export const $any = (val: any): any => $clone(val); diff --git a/src/functional/$clone.ts b/src/functional/$clone.ts deleted file mode 100644 index 334aaa3765..0000000000 --- a/src/functional/$clone.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Resolved } from "../Resolved"; - -export const $clone = (value: T): Resolved => - $cloneMain(value) as Resolved; - -const $cloneMain = (value: any): any => { - if (value === undefined) return undefined; - else if (typeof value === "object") - if (value === null) return null; - else if (Array.isArray(value)) return value.map($cloneMain); - else if (value instanceof Date) return new Date(value); - else if (value instanceof Uint8Array) return new Uint8Array(value); - else if (value instanceof Uint8ClampedArray) - return new Uint8ClampedArray(value); - else if (value instanceof Uint16Array) return new Uint16Array(value); - else if (value instanceof Uint32Array) return new Uint32Array(value); - else if (value instanceof BigUint64Array) return new BigUint64Array(value); - else if (value instanceof Int8Array) return new Int8Array(value); - else if (value instanceof Int16Array) return new Int16Array(value); - else if (value instanceof Int32Array) return new Int32Array(value); - else if (value instanceof BigInt64Array) return new BigInt64Array(value); - else if (value instanceof Float32Array) return new Float32Array(value); - else if (value instanceof Float64Array) return new Float64Array(value); - else if (value instanceof ArrayBuffer) return value.slice(0); - else if (value instanceof SharedArrayBuffer) return value.slice(0); - else if (value instanceof DataView) - return new DataView(value.buffer.slice(0)); - else if (typeof File !== "undefined" && value instanceof File) - return new File([value], value.name, { type: value.type }); - else if (typeof Blob !== "undefined" && value instanceof Blob) - return new Blob([value], { type: value.type }); - else if (value instanceof Set) return new Set([...value].map($cloneMain)); - else if (value instanceof Map) - return new Map( - [...value].map(([k, v]) => [$cloneMain(k), $cloneMain(v)]), - ); - else if (value instanceof WeakSet || value instanceof WeakMap) - throw new Error("WeakSet and WeakMap are not supported"); - else if (value.valueOf() !== value) return $cloneMain(value.valueOf()); - else - return Object.fromEntries( - Object.entries(value) - .map(([k, v]) => [k, $cloneMain(v)]) - .filter(([, v]) => v !== undefined), - ); - else if (typeof value === "function") return undefined; - return value; -}; diff --git a/src/functional/$convention.ts b/src/functional/$convention.ts deleted file mode 100644 index b3f048fa6a..0000000000 --- a/src/functional/$convention.ts +++ /dev/null @@ -1,37 +0,0 @@ -export const $convention = (rename: (str: string) => string) => { - const main = (input: any): any => { - if (typeof input === "object") - if (input === null) return null; - else if (Array.isArray(input)) return input.map(main); - else if ( - input instanceof Boolean || - input instanceof BigInt || - input instanceof Number || - input instanceof String - ) - return input.valueOf(); - else if (input instanceof Date) return new Date(input); - else if ( - input instanceof Uint8Array || - input instanceof Uint8ClampedArray || - input instanceof Uint16Array || - input instanceof Uint32Array || - input instanceof BigUint64Array || - input instanceof Int8Array || - input instanceof Int16Array || - input instanceof Int32Array || - input instanceof BigInt64Array || - input instanceof Float32Array || - input instanceof Float64Array || - input instanceof DataView - ) - return input; - else return object(input); - return input; - }; - const object = (input: Record) => - Object.fromEntries( - Object.entries(input).map(([key, value]) => [rename(key), main(value)]), - ); - return main; -}; diff --git a/src/functional/$dictionary.ts b/src/functional/$dictionary.ts deleted file mode 100644 index 526cc18f3a..0000000000 --- a/src/functional/$dictionary.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Customizable } from "../typings/Customizable"; - -/** - * @internal - */ -const blackhole: any = {}; - -export const $dictionary = (() => { - const glob: { - __typia_custom_validator: Map< - `${string}`, - Map (value: any) => boolean> - >; - } = - typeof global === "object" && - typeof global.process === "object" && - typeof global.process.versions === "object" && - typeof global.process.versions.node !== "undefined" - ? ((global ?? blackhole) as any) - : ((self ?? blackhole) as any); - return (glob.__typia_custom_validator ??= new Map()); -})(); diff --git a/src/functional/$every.ts b/src/functional/$every.ts deleted file mode 100644 index 137a28b5b1..0000000000 --- a/src/functional/$every.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { TypeGuardError } from "../TypeGuardError"; - -export const $every = ( - array: T[], - pred: (value: T, i: number) => null | Omit, -): null | Omit => { - let error: null | Omit = null; - for (let i: number = 0; i < array.length; ++i) - if (null !== (error = pred(array[i]!, i))) return error; - return null; -}; diff --git a/src/functional/$guard.ts b/src/functional/$guard.ts deleted file mode 100644 index c4b9eeaa39..0000000000 --- a/src/functional/$guard.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { TypeGuardError } from "../TypeGuardError"; - -/** - * @internal - */ -export const $guard = - (method: string) => - ( - exceptionable: boolean, - props: Omit, - factory?: (props: TypeGuardError.IProps) => Error, - ): boolean => { - if (exceptionable === true) - throw (factory ?? ((props) => new TypeGuardError(props)))({ - method, - path: props.path, - expected: props.expected, - value: props.value, - }); - return false; - }; diff --git a/src/functional/$is_between.ts b/src/functional/$is_between.ts deleted file mode 100644 index 0d422fbe5f..0000000000 --- a/src/functional/$is_between.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const $is_between = (value: number, minimum: number, maximum: number) => - minimum <= value && value <= maximum; diff --git a/src/functional/$join.ts b/src/functional/$join.ts deleted file mode 100644 index ccdfda1ec2..0000000000 --- a/src/functional/$join.ts +++ /dev/null @@ -1,46 +0,0 @@ -export const $join = (str: string): string => - variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`; - -const variable = (str: string): boolean => - reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str); - -const reserved = (str: string): boolean => RESERVED.has(str); - -const RESERVED: Set = new Set([ - "break", - "case", - "catch", - "class", - "const", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "enum", - "export", - "extends", - "false", - "finally", - "for", - "function", - "if", - "import", - "in", - "instanceof", - "new", - "null", - "return", - "super", - "switch", - "this", - "throw", - "true", - "try", - "typeof", - "var", - "void", - "while", - "with", -]); diff --git a/src/functional/$number.ts b/src/functional/$number.ts deleted file mode 100644 index 0af7432be4..0000000000 --- a/src/functional/$number.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TypeGuardError } from "../TypeGuardError"; - -export const $number = (value: number): number => { - if (isFinite(value) === false) - throw new TypeGuardError({ - method: "typia.json.stringify", - expected: "number", - value, - message: "Error on typia.json.stringify(): infinite or not a number.", - }); - return value; -}; diff --git a/src/functional/$report.ts b/src/functional/$report.ts deleted file mode 100644 index 0ccdd5ff08..0000000000 --- a/src/functional/$report.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IValidation } from "../IValidation"; - -export const $report = (array: IValidation.IError[]) => { - const reportable = (path: string): boolean => { - if (array.length === 0) return true; - const last: string = array[array.length - 1]!.path; - return path.length > last.length || last.substring(0, path.length) !== path; - }; - return (exceptable: boolean, error: IValidation.IError): false => { - if (exceptable && reportable(error.path)) array.push(error); - return false; - }; -}; diff --git a/src/functional/$rest.ts b/src/functional/$rest.ts deleted file mode 100644 index 2c02fb6a04..0000000000 --- a/src/functional/$rest.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const $rest = (str: string): string => { - return str.length === 2 ? "" : "," + str.substring(1, str.length - 1); -}; diff --git a/src/functional/$stoll.ts b/src/functional/$stoll.ts deleted file mode 100644 index a3fdc9945b..0000000000 --- a/src/functional/$stoll.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const $is_bigint_string = (str: string): boolean => { - try { - BigInt(str); - return true; - } catch { - return false; - } -}; diff --git a/src/functional/$string.ts b/src/functional/$string.ts deleted file mode 100644 index 712a1aaac8..0000000000 --- a/src/functional/$string.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * In the past, name of `typia` was `typescript-json`, and supported - * JSON serialization by wrapping `fast-json-stringify. `typescript-json` was - * a helper library of `fast-json-stringify`, which can skip manual JSON schema - * definition just by putting pure TypeScript type. - * - * This `$string` function is a part of `fast-json-stringify` at that time, and - * still being used in `typia` for the string serialization. - * - * @internal - * @reference https://github.com/fastify/fast-json-stringify/blob/master/lib/serializer.js - * @blog https://dev.to/samchon/good-bye-typescript-is-ancestor-of-typia-20000x-faster-validator-49fi - */ -export const $string = (str: string): string => { - const len = str.length; - let result = ""; - let last = -1; - let point = 255; - - // eslint-disable-next-line - for (var i = 0; i < len; i++) { - point = str.charCodeAt(i); - if (point < 32) { - return JSON.stringify(str); - } - if (point >= 0xd800 && point <= 0xdfff) { - // The current character is a surrogate. - return JSON.stringify(str); - } - if ( - point === 0x22 || // '"' - point === 0x5c // '\' - ) { - last === -1 && (last = 0); - result += str.slice(last, i) + "\\"; - last = i; - } - } - - return ( - (last === -1 && '"' + str + '"') || '"' + result + str.slice(last) + '"' - ); -}; diff --git a/src/functional/$strlen.ts b/src/functional/$strlen.ts deleted file mode 100644 index 3a940f9542..0000000000 --- a/src/functional/$strlen.ts +++ /dev/null @@ -1 +0,0 @@ -export const $strlen = (str: string): number => new Blob([str]).size; diff --git a/src/functional/$tail.ts b/src/functional/$tail.ts deleted file mode 100644 index e442d66e2a..0000000000 --- a/src/functional/$tail.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @internal - */ -export const $tail = (str: string): string => - str[str.length - 1] === "," ? str.substring(0, str.length - 1) : str; diff --git a/src/functional/$throws.ts b/src/functional/$throws.ts deleted file mode 100644 index a6b8c28531..0000000000 --- a/src/functional/$throws.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { TypeGuardError } from "../TypeGuardError"; - -export const $throws = - (method: string) => - (props: Pick) => { - throw new TypeGuardError({ - ...props, - method: `typia.${method}`, - }); - }; diff --git a/src/functional/$varint.ts b/src/functional/$varint.ts deleted file mode 100644 index c7f08cad11..0000000000 --- a/src/functional/$varint.ts +++ /dev/null @@ -1,130 +0,0 @@ -function EncodeVarNumber( - dst: Uint8Array, - offset: number, - value: number, -): number { - value = (value | 0) >>> 0; // 32-bit integer - - while (value > 127) { - dst[offset++] = (value & 0b01111111) | 0b10000000; - value >>>= 7; - } - dst[offset++] = value; - - return offset; -} - -function DecodeVarNumber( - buf: Uint8Array, - offset: number, -): [value: number, offset: number] { - let value = 0; - let shift = 0; - - while (true) { - const byte = buf[offset++]!; - value |= (byte & 0b01111111) << shift; - if (byte < 128) { - break; - } - shift += 7; - } - - return [value | 0, offset]; -} - -function DecodeVarBigInt( - buf: Uint8Array, - offset: number, -): [value: bigint, offset: number] { - let value = BigInt(0); - let shift = BigInt(0); - - while (true) { - const byte = buf[offset++]!; - value |= BigInt(byte & 0b01111111) << shift; - if (byte < 128) { - break; - } - shift += BigInt(7); - } - - return [BigInt.asIntN(64, value), offset]; -} - -export function $varint_decode_i32( - buf: Uint8Array, - offset: number, -): [value: number, offset: number] { - const [v, o] = DecodeVarNumber(buf, offset); - return [v, o]; -} - -export function $varint_decode_u32( - buf: Uint8Array, - offset: number, -): [value: number, offset: number] { - const [v, o] = DecodeVarNumber(buf, offset); - return [v >>> 0, o]; -} - -export function $varint_decode_i64( - buf: Uint8Array, - offset: number, -): [value: bigint, offset: number] { - const [v, o] = DecodeVarBigInt(buf, offset); - return [v, o]; -} - -export function $varint_decode_u64( - buf: Uint8Array, - offset: number, -): [value: bigint, offset: number] { - const [v, o] = DecodeVarBigInt(buf, offset); - return [BigInt.asUintN(64, v), o]; -} - -function EncodeVarBigInt( - dst: Uint8Array, - offset: number, - value: bigint, -): number { - value = BigInt.asUintN(64, value); - - while (value > BigInt(127)) { - dst[offset++] = Number(value & BigInt(0b01111111)) | 0b10000000; - value >>= BigInt(7); - } - dst[offset++] = Number(value); - - return offset; -} - -export function $varint_encode( - dst: Uint8Array, - offset: number, - value: number, -): number; -export function $varint_encode( - dst: Uint8Array, - offset: number, - value: bigint, -): number; - -export function $varint_encode( - dst: Uint8Array, - offset: number, - value: number | bigint, -): number { - if (typeof value === "bigint") { - offset = EncodeVarBigInt(dst, offset, value); - } else { - if (value < 0) { - // NOTE: Protocol Buffers signed varint encoding uses two's complement of 64-bit unsigned integers. - offset = EncodeVarBigInt(dst, offset, BigInt(value)); - } else { - offset = EncodeVarNumber(dst, offset, value); - } - } - return offset; -} diff --git a/src/functional/$zigzag.ts b/src/functional/$zigzag.ts deleted file mode 100644 index 3cc1678b0c..0000000000 --- a/src/functional/$zigzag.ts +++ /dev/null @@ -1,39 +0,0 @@ -export function $zigzag_encode(value: number): number; -export function $zigzag_encode(value: bigint): bigint; -export function $zigzag_encode(value: number | bigint): any { - // TODO: optimize (branchless solution exists) - - if (typeof value === "bigint") { - if (value < BigInt(0)) { - value = -value; - return value * BigInt(2) - BigInt(1); - } - return value * BigInt(2); - } - - if (value < 0) { - value = -value; - return value * 2 - 1; - } - return value * 2; -} - -export function $zigzag_decode(value: number): number; -export function $zigzag_decode(value: bigint): bigint; -export function $zigzag_decode(value: number | bigint): any { - // TODO: optimize (branchless solution exists) - - if (typeof value === "bigint") { - value = BigInt.asUintN(64, value); - if (value & BigInt(1)) { - return -(value + BigInt(1)) / BigInt(2); - } - return value / BigInt(2); - } - - value = value >>> 0; - if (value & 1) { - return -(value + 1) / 2; - } - return value / 2; -} diff --git a/src/functional/IProtobufWriter.ts b/src/functional/IProtobufWriter.ts deleted file mode 100644 index b300cd5eff..0000000000 --- a/src/functional/IProtobufWriter.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IProtobufWriter { - bool(value: boolean): void; - int32(value: number): void; - sint32(value: number): void; - uint32(value: number): void; - - int64(value: bigint | number): void; - sint64(value: bigint | number): void; - uint64(value: bigint | number): void; - - float(value: number): void; - double(value: number): void; - bytes(value: Uint8Array): void; - string(value: string): void; - - fork(): void; - ldelim(): void; -} diff --git a/src/functional/Namespace/functional.ts b/src/functional/Namespace/functional.ts deleted file mode 100644 index 06646034a0..0000000000 --- a/src/functional/Namespace/functional.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { TypeGuardError } from "../../TypeGuardError"; - -export const functionalAssert = () => ({ - errorFactory: (p: TypeGuardError.IProps) => new TypeGuardError(p), -}); diff --git a/src/functional/Namespace/http.ts b/src/functional/Namespace/http.ts deleted file mode 100644 index 21c4e33464..0000000000 --- a/src/functional/Namespace/http.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { $FormDataReader } from "../$FormDataReader"; -import { $HeadersReader } from "../$HeadersReader"; -import { $ParameterReader } from "../$ParameterReader"; -import { $QueryReader } from "../$QueryReader"; - -export const formData = () => $FormDataReader; -export const headers = () => $HeadersReader; -export const parameter = () => $ParameterReader; -export const query = () => $QueryReader; diff --git a/src/functional/Namespace/index.ts b/src/functional/Namespace/index.ts deleted file mode 100644 index 11553f4888..0000000000 --- a/src/functional/Namespace/index.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { RandomGenerator } from "../../utils/RandomGenerator"; - -import { $every } from "../$every"; -import { $guard } from "../$guard"; -import { $join } from "../$join"; -import { $report } from "../$report"; -import { IValidation } from "../../IValidation"; -import { TypeGuardError } from "../../TypeGuardError"; -import { is } from "../is"; - -export * as functional from "./functional"; -export * as json from "./json"; -export * as http from "./http"; -export * as notations from "./notations"; -export * as misc from "./misc"; -export * as protobuf from "./protobuf"; -export * as llm from "./llm"; - -export { is }; - -export const assert = (method: string) => ({ - ...is(), - join: $join, - every: $every, - guard: $guard(`typia.${method}`), - predicate: ( - matched: boolean, - exceptionable: boolean, - closure: () => Omit, - ): boolean => { - if (matched === false && exceptionable === true) - throw new TypeGuardError({ - ...closure(), - method: `typia.${method}`, - }); - return matched; - }, -}); - -export const validate = () => ({ - ...is(), - join: $join, - report: $report, - predicate: - (res: IValidation) => - ( - matched: boolean, - exceptionable: boolean, - closure: () => IValidation.IError, - ) => { - // CHECK FAILURE - if (matched === false && exceptionable === true) - (() => { - res.success &&= false; - const errorList = (res as IValidation.IFailure).errors; - - // TRACE ERROR - const error = closure(); - if (errorList.length) { - const last = errorList[errorList.length - 1]!.path; - if ( - last.length >= error.path.length && - last.substring(0, error.path.length) === error.path - ) - return; - } - errorList.push(error); - return; - })(); - return matched; - }, -}); - -export const random = () => ({ - generator: RandomGenerator, - pick: RandomGenerator.pick, -}); diff --git a/src/functional/Namespace/json.ts b/src/functional/Namespace/json.ts deleted file mode 100644 index 7f30a2d74f..0000000000 --- a/src/functional/Namespace/json.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { $number } from "../$number"; -import { $rest } from "../$rest"; -import { $string } from "../$string"; -import { $tail } from "../$tail"; -import { $throws } from "../$throws"; -import { is } from "../is"; - -export const stringify = (method: string) => ({ - ...is(), - number: $number, - string: $string, - tail: $tail, - rest: $rest, - throws: $throws(`json.${method}`), -}); diff --git a/src/functional/Namespace/llm.ts b/src/functional/Namespace/llm.ts deleted file mode 100644 index 657d257228..0000000000 --- a/src/functional/Namespace/llm.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ILlmApplication } from "@samchon/openapi"; - -import { LlmSchemaSeparator } from "@samchon/openapi/lib/utils/LlmSchemaSeparator"; - -export const application = () => ({ - finalize: ( - app: ILlmApplication, - options?: Omit, - ): void => { - app.options = { - separate: options?.separate ?? null, - recursive: 3, - }; - if (app.options.separate === null) return; - for (const func of app.functions) - func.separated = LlmSchemaSeparator.parameters({ - parameters: func.parameters, - predicator: app.options.separate, - }); - }, -}); diff --git a/src/functional/Namespace/misc.ts b/src/functional/Namespace/misc.ts deleted file mode 100644 index 04201361ce..0000000000 --- a/src/functional/Namespace/misc.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { $any } from "../$any"; -import { $throws } from "../$throws"; -import { is } from "../is"; - -export const clone = (method: string) => ({ - ...is(), - throws: $throws(`misc.${method}`), - any: $any, -}); - -export const prune = (method: string) => ({ - ...is(), - throws: $throws(`misc.${method}`), -}); diff --git a/src/functional/Namespace/notations.ts b/src/functional/Namespace/notations.ts deleted file mode 100644 index eb014d3910..0000000000 --- a/src/functional/Namespace/notations.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NamingConvention } from "../../utils/NamingConvention"; - -import { $convention } from "../$convention"; -import { $throws } from "../$throws"; -import { is } from "../is"; - -export const camel = (method: string) => ({ - ...base(method), - any: $convention(NamingConvention.camel), -}); -export const pascal = (method: string) => ({ - ...base(method), - any: $convention(NamingConvention.pascal), -}); -export const snake = (method: string) => ({ - ...base(method), - any: $convention(NamingConvention.snake), -}); - -const base = (method: string) => ({ - ...is(), - throws: $throws(`notations.${method}`), -}); diff --git a/src/functional/Namespace/protobuf.ts b/src/functional/Namespace/protobuf.ts deleted file mode 100644 index 8ba4350819..0000000000 --- a/src/functional/Namespace/protobuf.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { $ProtobufReader } from "../$ProtobufReader"; -import { $ProtobufSizer } from "../$ProtobufSizer"; -import { $ProtobufWriter } from "../$ProtobufWriter"; -import { $strlen } from "../$strlen"; -import { $throws } from "../$throws"; -import { is } from "../is"; - -export const decode = (method: string) => ({ - ...is(), - Reader: $ProtobufReader, - throws: $throws(`protobuf.${method}`), -}); - -export const encode = (method: string) => ({ - ...is(), - Sizer: $ProtobufSizer, - Writer: $ProtobufWriter, - strlen: $strlen, - throws: $throws(method), -}); diff --git a/src/functional/is.ts b/src/functional/is.ts deleted file mode 100644 index 8856db4bf5..0000000000 --- a/src/functional/is.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { $is_between } from "./$is_between"; -import { $is_bigint_string } from "./$stoll"; - -/** - * @internal - */ -export const is = () => ({ - is_between: $is_between, - is_bigint_string: $is_bigint_string, -}); diff --git a/src/http.ts b/src/http.ts index 007930b955..fcd307bc3b 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1,7 +1,6 @@ -import * as Namespace from "./functional/Namespace"; - import { Atomic } from "./typings/Atomic"; +import { IReadableURLSearchParams } from "./IReadableURLSearchParams"; import { IValidation } from "./IValidation"; import { Resolved } from "./Resolved"; import { TypeGuardError } from "./TypeGuardError"; @@ -43,19 +42,14 @@ import { TypeGuardError } from "./TypeGuardError"; * * @author Jeongho Nam - https://github.com/samchon */ -function formData(input: FormData): Resolved; +export function formData(input: FormData): Resolved; /** * @internal */ -function formData(): never { +export function formData(): never { halt("formData"); } -const formDataPure = /** @__PURE__ */ Object.assign( - formData, - /** @__PURE__ */ Namespace.http.formData(), -); -export { formDataPure as formData }; /** * Form data decoder with type assertion. @@ -86,7 +80,7 @@ export { formDataPure as formData }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertFormData( +export function assertFormData( input: FormData, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Resolved; @@ -94,19 +88,9 @@ function assertFormData( /** * @internal */ -function assertFormData(): never { +export function assertFormData(): never { halt("assertFormData"); } -const assertFormDataPure = /** @__PURE__ */ Object.assign< - typeof assertFormData, - {}, - {} ->( - assertFormData, - /** @__PURE__ */ Namespace.http.formData(), - /** @__PURE__ */ Namespace.assert("http.assertFormData"), -); -export { assertFormDataPure as assertFormData }; /** * Form data decoder with type checking. @@ -135,24 +119,16 @@ export { assertFormDataPure as assertFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function isFormData(input: FormData): Resolved | null; +export function isFormData( + input: FormData, +): Resolved | null; /** * @internal */ -function isFormData(): never { +export function isFormData(): never { halt("isFormData"); } -const isFormDataPure = /** @__PURE__ */ Object.assign< - typeof isFormData, - {}, - {} ->( - isFormData, - /** @__PURE__ */ Namespace.http.formData(), - /** @__PURE__ */ Namespace.is(), -); -export { isFormDataPure as isFormData }; /** * Form data decoder with type validation. @@ -183,26 +159,16 @@ export { isFormDataPure as isFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateFormData( +export function validateFormData( input: FormData, ): IValidation>; /** * @internal */ -function validateFormData(): never { +export function validateFormData(): never { halt("validateFormData"); } -const validateFormDataPure = /** @__PURE__ */ Object.assign< - typeof validateFormData, - {}, - {} ->( - validateFormData, - /** @__PURE__ */ Namespace.http.formData(), - /** @__PURE__ */ Namespace.validate(), -); -export { validateFormDataPure as validateFormData }; /* ----------------------------------------------------------- QUERY @@ -238,19 +204,16 @@ export { validateFormDataPure as validateFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function query(input: string | URLSearchParams): Resolved; +export function query( + input: string | IReadableURLSearchParams, +): Resolved; /** * @internal */ -function query(): never { +export function query(): never { halt("query"); } -const queryPure = /** @__PURE__ */ Object.assign( - query, - /** @__PURE__ */ Namespace.http.query(), -); -export { queryPure as query }; /** * URL query decoder with type assertion. @@ -281,27 +244,17 @@ export { queryPure as query }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertQuery( - input: string | URLSearchParams, +export function assertQuery( + input: string | IReadableURLSearchParams, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Resolved; /** * @internal */ -function assertQuery(): never { +export function assertQuery(): never { halt("assertQuery"); } -const assertQueryPure = /** @__PURE__ */ Object.assign< - typeof assertQuery, - {}, - {} ->( - assertQuery, - /** @__PURE__ */ Namespace.http.query(), - /** @__PURE__ */ Namespace.assert("http.assertQuery"), -); -export { assertQueryPure as assertQuery }; /** * URL query decoder with type checking. @@ -330,24 +283,17 @@ export { assertQueryPure as assertQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function isQuery( - input: string | URLSearchParams, +export function isQuery( + input: string | IReadableURLSearchParams, ): Resolved | null; /** * @internal */ -function isQuery(): never { +export function isQuery(): never { halt("isQuery"); } -const isQueryPure = /** @__PURE__ */ Object.assign( - isQuery, - /** @__PURE__ */ Namespace.http.query(), - /** @__PURE__ */ Namespace.is(), -); -export { isQueryPure as isQuery }; - /** * URL query decoder with type validation. * @@ -376,26 +322,16 @@ export { isQueryPure as isQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateQuery( - input: string | URLSearchParams, +export function validateQuery( + input: string | IReadableURLSearchParams, ): IValidation>; /** * @internal */ -function validateQuery(): never { +export function validateQuery(): never { halt("validateQuery"); } -const validateQueryPure = /** @__PURE__ */ Object.assign< - typeof validateQuery, - {}, - {} ->( - validateQuery, - /** @__PURE__ */ Namespace.http.query(), - /** @__PURE__ */ Namespace.validate(), -); -export { validateQueryPure as validateQuery }; /* ----------------------------------------------------------- HEADERS @@ -452,23 +388,17 @@ export { validateQueryPure as validateQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function headers( +export function headers( input: Record, ): Resolved; /** * @internal */ -function headers(): never { +export function headers(): never { halt("headers"); } -const headersPure = /** @__PURE__ */ Object.assign( - headers, - /** @__PURE__ */ Namespace.http.headers(), -); -export { headersPure as headers }; - /** * Headers decoder with type assertion (for express and fastify). * @@ -520,7 +450,7 @@ export { headersPure as headers }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertHeaders( +export function assertHeaders( input: Record, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Resolved; @@ -528,21 +458,10 @@ function assertHeaders( /** * @internal */ -function assertHeaders(): never { +export function assertHeaders(): never { halt("assertHeaders"); } -const assertHeadersPure = /** @__PURE__ */ Object.assign< - typeof assertHeaders, - {}, - {} ->( - assertHeaders, - /** @__PURE__ */ Namespace.http.headers(), - /** @__PURE__ */ Namespace.assert("http.assertHeaders"), -); -export { assertHeadersPure as assertHeaders }; - /** * > You must configure the generic argument `T`. * @@ -594,22 +513,16 @@ export { assertHeadersPure as assertHeaders }; * * @author Jeongho Nam - https://github.com/samchon */ -function isHeaders( +export function isHeaders( input: Record, ): Resolved | null; /** * @internal */ -function isHeaders(): never { +export function isHeaders(): never { halt("isHeaders"); } -const isHeadersPure = /** @__PURE__ */ Object.assign( - isHeaders, - /** @__PURE__ */ Namespace.http.headers(), - /** @__PURE__ */ Namespace.is(), -); -export { isHeadersPure as isHeaders }; /** * Headers decoder with type validation (for express and fastify). @@ -661,28 +574,17 @@ export { isHeadersPure as isHeaders }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateHeaders( +export function validateHeaders( input: Record, ): IValidation>; /** * @internal */ -function validateHeaders(): never { +export function validateHeaders(): never { halt("validateHeaders"); } -const validateHeadersPure = /** @__PURE__ */ Object.assign< - typeof validateHeaders, - {}, - {} ->( - validateHeaders, - /** @__PURE__ */ Namespace.http.headers(), - /** @__PURE__ */ Namespace.validate(), -); -export { validateHeadersPure as validateHeaders }; - /* ----------------------------------------------------------- PARAMETER ----------------------------------------------------------- */ @@ -701,22 +603,17 @@ export { validateHeadersPure as validateHeaders }; * @param input Path parameter string * @returns Decoded path parameter value */ -function parameter(input: string): Resolved; +export function parameter( + input: string, +): Resolved; /** * @internal */ -function parameter(): never { +export function parameter(): never { halt("parameter"); } -const parameterPure = /** @__PURE__ */ Object.assign( - parameter, - /** @__PURE__ */ Namespace.http.parameter(), - /** @__PURE__ */ Namespace.assert("http.parameter"), -); -export { parameterPure as parameter }; - /* ----------------------------------------------------------- FACTORY FUNCTIONS ----------------------------------------------------------- */ @@ -729,7 +626,7 @@ export { parameterPure as parameter }; * * @author Jeongho Nam - https://github.com/samchon */ -function createFormData(): never; +export function createFormData(): never; /** * Creates a reusable {@link formdata} function. @@ -739,21 +636,15 @@ function createFormData(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createFormData(): (input: FormData) => T; +export function createFormData(): (input: FormData) => T; /** * @internal */ -function createFormData(): (input: FormData) => T { +export function createFormData(): (input: FormData) => T { halt("createFormData"); } -const createFormDataPure = /** @__PURE__ */ Object.assign< - typeof createFormData, - {} ->(createFormData, /** @__PURE__ */ Namespace.http.formData()); -export { createFormDataPure as createFormData }; - /** * Creates a reusable {@link assertFormData} function. * @@ -764,7 +655,7 @@ export { createFormDataPure as createFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertFormData( +export function createAssertFormData( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -777,28 +668,17 @@ function createAssertFormData( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertFormData( +export function createAssertFormData( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: FormData) => T; /** * @internal */ -function createAssertFormData(): (input: FormData) => T { +export function createAssertFormData(): (input: FormData) => T { halt("createAssertFormData"); } -const createAssertFormDataPure = /** @__PURE__ */ Object.assign< - typeof createAssertFormData, - {}, - {} ->( - createAssertFormData, - /** @__PURE__ */ Namespace.http.formData(), - /** @__PURE__ */ Namespace.assert("http.createAssertFormData"), -); -export { createAssertFormDataPure as createAssertFormData }; - /** * Creates a reusable {@link isFormData} function. * @@ -808,7 +688,7 @@ export { createAssertFormDataPure as createAssertFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsFormData(): never; +export function createIsFormData(): never; /** * Creates a reusable {@link isFormData} function. @@ -818,26 +698,17 @@ function createIsFormData(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsFormData(): (input: FormData) => T | null; +export function createIsFormData(): ( + input: FormData, +) => T | null; /** * @internal */ -function createIsFormData(): (input: FormData) => T | null { +export function createIsFormData(): (input: FormData) => T | null { halt("createIsFormData"); } -const createIsFormDataPure = /** @__PURE__ */ Object.assign< - typeof createIsFormData, - {}, - {} ->( - createIsFormData, - /** @__PURE__ */ Namespace.http.formData(), - /** @__PURE__ */ Namespace.is(), -); -export { createIsFormDataPure as createIsFormData }; - /** * Creates a reusable {@link validateFormData} function. * @@ -847,7 +718,7 @@ export { createIsFormDataPure as createIsFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateFormData(): never; +export function createValidateFormData(): never; /** * Creates a reusable {@link validateFormData} function. @@ -857,30 +728,19 @@ function createValidateFormData(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateFormData(): ( +export function createValidateFormData(): ( input: FormData, ) => IValidation>; /** * @internal */ -function createValidateFormData(): ( +export function createValidateFormData(): ( input: FormData, ) => IValidation> { halt("createValidateFormData"); } -const createValidateFormDataPure = /** @__PURE__ */ Object.assign< - typeof createValidateFormData, - {}, - {} ->( - createValidateFormData, - /** @__PURE__ */ Namespace.http.formData(), - /** @__PURE__ */ Namespace.validate(), -); -export { createValidateFormDataPure as createValidateFormData }; - /** * Creates a reusable {@link query} function. * @@ -890,7 +750,7 @@ export { createValidateFormDataPure as createValidateFormData }; * * @author Jeongho Nam - https://github.com/samchon */ -function createQuery(): never; +export function createQuery(): never; /** * Creates a reusable {@link query} function. @@ -900,23 +760,19 @@ function createQuery(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createQuery(): ( - input: string | URLSearchParams, +export function createQuery(): ( + input: string | IReadableURLSearchParams, ) => T; /** * @internal */ -function createQuery(): (input: string | URLSearchParams) => T { +export function createQuery(): ( + input: string | IReadableURLSearchParams, +) => T { halt("createQuery"); } -const createQueryPure = /** @__PURE__ */ Object.assign( - createQuery, - /** @__PURE__ */ Namespace.http.query(), -); -export { createQueryPure as createQuery }; - /** * Creates a reusable {@link assertQuery} function. * @@ -927,7 +783,7 @@ export { createQueryPure as createQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertQuery( +export function createAssertQuery( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -940,28 +796,19 @@ function createAssertQuery( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertQuery( +export function createAssertQuery( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), -): (input: string | URLSearchParams) => T; +): (input: string | IReadableURLSearchParams) => T; /** * @internal */ -function createAssertQuery(): (input: string | URLSearchParams) => T { +export function createAssertQuery(): ( + input: string | IReadableURLSearchParams, +) => T { halt("createAssertQuery"); } -const createAssertQueryPure = /** @__PURE__ */ Object.assign< - typeof createAssertQuery, - {}, - {} ->( - createAssertQuery, - /** @__PURE__ */ Namespace.http.query(), - /** @__PURE__ */ Namespace.assert("http.createAssertQuery"), -); -export { createAssertQueryPure as createAssertQuery }; - /** * Creates a reusable {@link isQuery} function. * @@ -971,7 +818,7 @@ export { createAssertQueryPure as createAssertQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsQuery(): never; +export function createIsQuery(): never; /** * Creates a reusable {@link isQuery} function. @@ -981,28 +828,19 @@ function createIsQuery(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsQuery(): ( - input: string | URLSearchParams, +export function createIsQuery(): ( + input: string | IReadableURLSearchParams, ) => T | null; /** * @internal */ -function createIsQuery(): (input: string | URLSearchParams) => T | null { +export function createIsQuery(): ( + input: string | IReadableURLSearchParams, +) => T | null { halt("createIsQuery"); } -const createIsQueryPure = /** @__PURE__ */ Object.assign< - typeof createIsQuery, - {}, - {} ->( - createIsQuery, - /** @__PURE__ */ Namespace.http.query(), - /** @__PURE__ */ Namespace.is(), -); -export { createIsQueryPure as createIsQuery }; - /** * Creates a reusable {@link validateQuery} function. * @@ -1012,7 +850,7 @@ export { createIsQueryPure as createIsQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateQuery(): never; +export function createValidateQuery(): never; /** * Creates a reusable {@link validateQuery} function. @@ -1022,30 +860,19 @@ function createValidateQuery(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateQuery(): ( - input: string | URLSearchParams, +export function createValidateQuery(): ( + input: string | IReadableURLSearchParams, ) => IValidation>; /** * @internal */ -function createValidateQuery(): ( - input: string | URLSearchParams, +export function createValidateQuery(): ( + input: string | IReadableURLSearchParams, ) => IValidation> { halt("createValidateQuery"); } -const createValidateQueryPure = /** @__PURE__ */ Object.assign< - typeof createValidateQuery, - {}, - {} ->( - createValidateQuery, - /** @__PURE__ */ Namespace.http.query(), - /** @__PURE__ */ Namespace.validate(), -); -export { createValidateQueryPure as createValidateQuery }; - /** * Creates a reusable {@link headers} function. * @@ -1055,7 +882,7 @@ export { createValidateQueryPure as createValidateQuery }; * * @author Jeongho Nam - https://github.com/samchon */ -function createHeaders(): never; +export function createHeaders(): never; /** * Creates a reusable {@link headers} function. @@ -1065,25 +892,19 @@ function createHeaders(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createHeaders(): ( +export function createHeaders(): ( input: Record, ) => T; /** * @internal */ -function createHeaders(): ( +export function createHeaders(): ( input: Record, ) => T { halt("createHeaders"); } -const createHeadersPure = /** @__PURE__ */ Object.assign< - typeof createHeaders, - {} ->(createHeaders, /** @__PURE__ */ Namespace.http.headers()); -export { createHeadersPure as createHeaders }; - /** * Creates a reusable {@link assertHeaders} function. * @@ -1094,7 +915,7 @@ export { createHeadersPure as createHeaders }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertHeaders( +export function createAssertHeaders( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -1107,30 +928,19 @@ function createAssertHeaders( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertHeaders( +export function createAssertHeaders( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: Record) => T; /** * @internal */ -function createAssertHeaders(): ( +export function createAssertHeaders(): ( input: Record, ) => T { halt("createAssertHeaders"); } -const createAssertHeadersPure = /** @__PURE__ */ Object.assign< - typeof createAssertHeaders, - {}, - {} ->( - createAssertHeaders, - /** @__PURE__ */ Namespace.http.headers(), - /** @__PURE__ */ Namespace.assert("http.createAssertHeaders"), -); -export { createAssertHeadersPure as createAssertHeaders }; - /** * Creates a reusable {@link isHeaders} function. * @@ -1140,7 +950,7 @@ export { createAssertHeadersPure as createAssertHeaders }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsHeaders(): never; +export function createIsHeaders(): never; /** * Creates a reusable {@link isHeaders} function. @@ -1150,30 +960,19 @@ function createIsHeaders(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsHeaders(): ( +export function createIsHeaders(): ( input: Record, ) => T | null; /** * @internal */ -function createIsHeaders(): ( +export function createIsHeaders(): ( input: Record, ) => T | null { halt("createIsHeaders"); } -const createIsHeadersPure = /** @__PURE__ */ Object.assign< - typeof createIsHeaders, - {}, - {} ->( - createIsHeaders, - /** @__PURE__ */ Namespace.http.headers(), - /** @__PURE__ */ Namespace.is(), -); -export { createIsHeadersPure as createIsHeaders }; - /** * Creates a reusable {@link validateHeaders} function. * @@ -1183,7 +982,7 @@ export { createIsHeadersPure as createIsHeaders }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateHeaders(): never; +export function createValidateHeaders(): never; /** * Creates a reusable {@link validateHeaders} function. @@ -1193,30 +992,19 @@ function createValidateHeaders(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateHeaders(): ( +export function createValidateHeaders(): ( input: Record, ) => IValidation>; /** * @internal */ -function createValidateHeaders(): ( +export function createValidateHeaders(): ( input: Record, ) => IValidation> { halt("createValidateHeaders"); } -const createValidateHeadersPure = /** @__PURE__ */ Object.assign< - typeof createValidateHeaders, - {}, - {} ->( - createValidateHeaders, - /** @__PURE__ */ Namespace.http.headers(), - /** @__PURE__ */ Namespace.validate(), -); -export { createValidateHeadersPure as createValidateHeaders }; - /** * Creates a reusable {@link parameter} function. * @@ -1226,7 +1014,7 @@ export { createValidateHeadersPure as createValidateHeaders }; * * @author Jeongho Nam - https://github.com/samchon */ -function createParameter(): never; +export function createParameter(): never; /** * Creates a reusable {@link parameter} function. @@ -1236,26 +1024,19 @@ function createParameter(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createParameter(): (input: string) => T; +export function createParameter(): ( + input: string, +) => T; /** * @internal */ -function createParameter(): (input: string) => T { +export function createParameter(): ( + input: string, +) => T { halt("createParameter"); } -const createParameterPure = /** @__PURE__ */ Object.assign< - typeof createParameter, - {}, - {} ->( - createParameter, - /** @__PURE__ */ Namespace.http.parameter(), - /** @__PURE__ */ Namespace.assert("http.createParameter"), -); -export { createParameterPure as createParameter }; - /** * @internal */ diff --git a/src/internal/_IProtobufWriter.ts b/src/internal/_IProtobufWriter.ts new file mode 100644 index 0000000000..3e61581859 --- /dev/null +++ b/src/internal/_IProtobufWriter.ts @@ -0,0 +1,18 @@ +export interface _IProtobufWriter { + bool(value: boolean): void; + int32(value: number): void; + sint32(value: number): void; + uint32(value: number): void; + + int64(value: bigint | number): void; + sint64(value: bigint | number): void; + uint64(value: bigint | number): void; + + float(value: number): void; + double(value: number): void; + bytes(value: Uint8Array): void; + string(value: string): void; + + fork(): void; + ldelim(): void; +} diff --git a/src/internal/_ProtobufReader.ts b/src/internal/_ProtobufReader.ts new file mode 100644 index 0000000000..5622bbde99 --- /dev/null +++ b/src/internal/_ProtobufReader.ts @@ -0,0 +1,194 @@ +import { ProtobufWire } from "../programmers/helpers/ProtobufWire"; + +import { Singleton } from "../utils/Singleton"; + +/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedReader.ts +export class _ProtobufReader { + /** + * Read buffer + */ + private buf: Uint8Array; + + /** + * Read buffer pointer. + */ + private ptr: number; + + /** + * DataView for buffer. + */ + private view: DataView; + + public constructor(buf: Uint8Array) { + this.buf = buf; + this.ptr = 0; + this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + } + + public index(): number { + return this.ptr; + } + + public size(): number { + return this.buf.length; + } + + public uint32(): number { + return this.varint32(); + } + + public int32(): number { + return this.varint32(); + } + + public sint32(): number { + const value: number = this.varint32(); + return (value >>> 1) ^ -(value & 1); + } + + public uint64(): bigint { + return this.varint64(); + } + + public int64(): bigint { + return this.varint64(); + } + + public sint64(): bigint { + const value = this.varint64(); + return (value >> BigInt(0x01)) ^ -(value & BigInt(0x01)); + } + + public bool(): boolean { + return this.varint32() !== 0; + } + + public float(): number { + const value: number = this.view.getFloat32(this.ptr, true); + this.ptr += 4; + return value; + } + + public double(): number { + const value: number = this.view.getFloat64(this.ptr, true); + this.ptr += 8; + return value; + } + + public bytes(): Uint8Array { + const length: number = this.uint32(); + const from: number = this.ptr; + this.ptr += length; + return this.buf.subarray(from, from + length); + } + + public string(): string { + return utf8.get().decode(this.bytes()); + } + + public skip(length: number): void { + if (length === 0) while (this.u8() & 0x80); + else { + if (this.index() + length > this.size()) + throw new Error("Error on typia.protobuf.decode(): buffer overflow."); + this.ptr += length; + } + } + + public skipType(wireType: ProtobufWire): void { + switch (wireType) { + case ProtobufWire.VARIANT: + this.skip(0); + break; + case ProtobufWire.I64: + this.skip(8); + break; + case ProtobufWire.LEN: + this.skip(this.uint32()); + break; + case ProtobufWire.START_GROUP: + while ((wireType = this.uint32() & 0x07) !== ProtobufWire.END_GROUP) + this.skipType(wireType); + break; + case ProtobufWire.I32: + this.skip(4); + break; + default: + throw new Error(`Invalid wire type ${wireType} at offset ${this.ptr}.`); + } + } + + private varint32(): number { + let loaded: number; + let value: number; + + value = (loaded = this.u8()) & 0x7f; + if (loaded < 0x80) return value; + + value |= ((loaded = this.u8()) & 0x7f) << 7; + if (loaded < 0x80) return value; + + value |= ((loaded = this.u8()) & 0x7f) << 14; + if (loaded < 0x80) return value; + + value |= ((loaded = this.u8()) & 0x7f) << 21; + if (loaded < 0x80) return value; + + value |= ((loaded = this.u8()) & 0xf) << 28; + if (loaded < 0x80) return value; + + // increment position until there is no continuation bit or until we read 10 bytes + if (this.u8() < 0x80) return value; + if (this.u8() < 0x80) return value; + if (this.u8() < 0x80) return value; + if (this.u8() < 0x80) return value; + if (this.u8() < 0x80) return value; + + return value; + } + + private varint64(): bigint { + let loaded: bigint; + let value: bigint; + + value = (loaded = this.u8n()) & BigInt(0x7f); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(7); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(14); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(21); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(28); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(35); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(42); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(49); + if (loaded < BigInt(0x80)) return value; + + value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(56); + if (loaded < BigInt(0x80)) return value; + + value |= (this.u8n() & BigInt(0x01)) << BigInt(63); + return BigInt.asIntN(64, value); + } + + private u8(): number { + return this.view.getUint8(this.ptr++); + } + + private u8n(): bigint { + return BigInt(this.u8()); + } +} + +const utf8 = /** @__PURE__ */ new Singleton(() => new TextDecoder("utf-8")); diff --git a/src/internal/_ProtobufSizer.ts b/src/internal/_ProtobufSizer.ts new file mode 100644 index 0000000000..1a4c914734 --- /dev/null +++ b/src/internal/_ProtobufSizer.ts @@ -0,0 +1,145 @@ +import { _IProtobufWriter } from "./_IProtobufWriter"; + +/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedSizer.ts +export class _ProtobufSizer implements _IProtobufWriter { + /** + * Total length. + */ + public len: number; + + /** + * Position stack. + */ + public readonly pos: Array; + + /** + * Variable length list. + */ + public readonly varlen: Array; + + /** + * Variable length index stack. + */ + public readonly varlenidx: Array; + + public constructor(length: number = 0) { + this.len = length; + this.pos = []; + this.varlen = []; + this.varlenidx = []; + } + + public bool(): void { + this.len += 1; + } + public int32(value: number): void { + if (value < 0) { + // 10 bytes to encode negative number + this.len += 10; + } else { + this.varint32(value); + } + } + public sint32(value: number): void { + this.varint32((value << 1) ^ (value >> 31)); + } + public uint32(value: number): void { + this.varint32(value); + } + + public int64(value: bigint | number): void { + this.varint64(typeof value === "number" ? BigInt(value) : value); + } + public sint64(value: bigint | number): void { + if (typeof value === "number") value = BigInt(value); + this.varint64((value << BigInt(1)) ^ (value >> BigInt(63))); + } + public uint64(value: bigint | number): void { + this.varint64(typeof value === "number" ? BigInt(value) : value); + } + + // public fixed32(_value: number): void { + // this.len += 4; + // } + // public sfixed32(_value: number): void { + // this.len += 4; + // } + // public fixed64(_value: number | bigint): void { + // this.len += 8; + // } + // public sfixed64(_value: number | bigint): void { + // this.len += 8; + // } + public float(_value: number): void { + this.len += 4; + } + public double(_value: number): void { + this.len += 8; + } + + public bytes(value: Uint8Array): void { + this.uint32(value.byteLength); + this.len += value.byteLength; + } + public string(value: string): void { + const len: number = strlen(value); + this.varlen.push(len); + this.uint32(len); + this.len += len; + } + + public fork(): void { + this.pos.push(this.len); // save current position + this.varlenidx.push(this.varlen.length); // save current index in varlen array + this.varlen.push(0); // add 0 length to varlen array (to be updated in ldelim()) + } + + public ldelim(): void { + if (!(this.pos.length && this.varlenidx.length)) + throw new Error( + "Error on typia.protobuf.encode(): missing fork() before ldelim() call.", + ); + + const endPos = this.len; // current position is end position + const startPos = this.pos.pop()!; // get start position from stack + const idx = this.varlenidx.pop()!; // get varlen index from stack + const len = endPos - startPos; // calculate length + + this.varlen[idx] = len; // update variable length + this.uint32(len); // add uint32 that should be called in fork() + } + + public reset(): void { + this.len = 0; + // re-use arrays + this.pos.length = 0; + this.varlen.length = 0; + this.varlenidx.length = 0; + } + + private varint32(value: number): void { + this.len += + value < 0 + ? 10 // 10 bits with leading 1's + : value < 0x80 + ? 1 + : value < 0x4000 + ? 2 + : value < 0x200000 + ? 3 + : value < 0x10000000 + ? 4 + : 5; + } + + private varint64(val: bigint): void { + val = BigInt.asUintN(64, val); + while (val > BigInt(0x7f)) { + ++this.len; + val = val >> BigInt(0x07); + } + ++this.len; + } +} + +const strlen = (str: string): number => new Blob([str]).size; diff --git a/src/internal/_ProtobufWriter.ts b/src/internal/_ProtobufWriter.ts new file mode 100644 index 0000000000..c7f2284926 --- /dev/null +++ b/src/internal/_ProtobufWriter.ts @@ -0,0 +1,145 @@ +import { Singleton } from "../utils/Singleton"; + +import { _IProtobufWriter } from "./_IProtobufWriter"; +import { _ProtobufSizer } from "./_ProtobufSizer"; + +/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedWriter.ts +export class _ProtobufWriter implements _IProtobufWriter { + /** + * Related sizer + */ + private readonly sizer: _ProtobufSizer; + + /** + * Current pointer. + */ + private ptr: number; + + /** + * Protobuf buffer. + */ + private buf: Uint8Array; + + /** + * DataView for buffer. + */ + private view: DataView; + + /** + * Index in varlen array from sizer. + */ + private varlenidx: number; + + constructor(sizer: _ProtobufSizer) { + this.sizer = sizer; + this.buf = new Uint8Array(sizer.len); + this.view = new DataView(this.buf.buffer); + this.ptr = 0; + this.varlenidx = 0; + } + + buffer(): Uint8Array { + return this.buf; + } + + bool(value: boolean): void { + this.byte(value ? 1 : 0); + } + + byte(value: number): void { + this.buf[this.ptr++] = value & 255; + } + + int32(value: number): void { + if (value < 0) this.int64(value); + else this.variant32(value >>> 0); + } + + sint32(value: number): void { + this.variant32((value << 1) ^ (value >> 31)); + } + + uint32(value: number): void { + this.variant32(value); + } + + sint64(value: number | bigint): void { + value = BigInt(value); + this.variant64((value << BigInt(0x01)) ^ (value >> BigInt(0x3f))); + } + + int64(value: number | bigint): void { + this.variant64(BigInt(value)); + } + + uint64(value: number | bigint): void { + this.variant64(BigInt(value)); + } + + float(val: number): void { + this.view.setFloat32(this.ptr, val, true); + this.ptr += 4; + } + + double(val: number): void { + this.view.setFloat64(this.ptr, val, true); + this.ptr += 8; + } + + bytes(value: Uint8Array): void { + this.uint32(value.byteLength); + for (let i = 0; i < value.byteLength; i++) this.buf[this.ptr++] = value[i]!; + } + + string(value: string): void { + const len: number = this.varlen(); // use precomputed length + this.uint32(len); + + const binary: Uint8Array = utf8.get().encode(value); + for (let i = 0; i < binary.byteLength; i++) + this.buf[this.ptr++] = binary[i]!; + } + + fork(): void { + this.uint32(this.varlen()); // use precomputed length + } + + ldelim(): void { + // nothing to do - all dirty work done by sizer + } + + finish(): Uint8Array { + return this.buf; + } + + reset(): void { + this.buf = new Uint8Array(this.sizer.len); + this.view = new DataView(this.buf.buffer); + this.ptr = 0; + this.varlenidx = 0; + } + + private variant32(val: number): void { + while (val > 0x7f) { + this.buf[this.ptr++] = (val & 0x7f) | 0x80; + val = val >>> 7; + } + this.buf[this.ptr++] = val; + } + + private variant64(val: bigint): void { + val = BigInt.asUintN(64, val); + while (val > BigInt(0x7f)) { + this.buf[this.ptr++] = Number((val & BigInt(0x7f)) | BigInt(0x80)); + val = val >> BigInt(0x07); + } + this.buf[this.ptr++] = Number(val); + } + + private varlen(): number { + return this.varlenidx >= this.sizer.varlen.length + ? 0 + : this.sizer.varlen[this.varlenidx++]!; + } +} +const utf8 = /** @__PURE__ */ new Singleton(() => new TextEncoder()); diff --git a/src/internal/_accessExpressionAsString.ts b/src/internal/_accessExpressionAsString.ts new file mode 100644 index 0000000000..8ffe398c7f --- /dev/null +++ b/src/internal/_accessExpressionAsString.ts @@ -0,0 +1,46 @@ +export const _accessExpressionAsString = (str: string): string => + variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`; + +const variable = (str: string): boolean => + reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str); + +const reserved = (str: string): boolean => RESERVED.has(str); + +const RESERVED: Set = new Set([ + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "enum", + "export", + "extends", + "false", + "finally", + "for", + "function", + "if", + "import", + "in", + "instanceof", + "new", + "null", + "return", + "super", + "switch", + "this", + "throw", + "true", + "try", + "typeof", + "var", + "void", + "while", + "with", +]); diff --git a/src/internal/_assertGuard.ts b/src/internal/_assertGuard.ts new file mode 100644 index 0000000000..6625b6b00d --- /dev/null +++ b/src/internal/_assertGuard.ts @@ -0,0 +1,13 @@ +import { TypeGuardError } from "../TypeGuardError"; + +export const _assertGuard = ( + exceptionable: boolean, + props: TypeGuardError.IProps, + factory?: (props: TypeGuardError.IProps) => Error, +): false => { + if (exceptionable === true) { + if (factory) throw factory(props); + else throw new TypeGuardError(props); + } + return false; +}; diff --git a/src/internal/_functionalTypeGuardErrorFactory.ts b/src/internal/_functionalTypeGuardErrorFactory.ts new file mode 100644 index 0000000000..bdd59b0cbb --- /dev/null +++ b/src/internal/_functionalTypeGuardErrorFactory.ts @@ -0,0 +1,4 @@ +import { TypeGuardError } from "../TypeGuardError"; + +export const _functionalTypeGuardErrorFactory = (p: TypeGuardError.IProps) => + new TypeGuardError(p); diff --git a/src/internal/_httpFormDataReadArray.ts b/src/internal/_httpFormDataReadArray.ts new file mode 100644 index 0000000000..3f416c9b55 --- /dev/null +++ b/src/internal/_httpFormDataReadArray.ts @@ -0,0 +1,4 @@ +export const _httpFormDataReadArray = ( + input: any[], + alternative: null | undefined, +) => (input.length ? input : alternative); diff --git a/src/internal/_httpFormDataReadBigint.ts b/src/internal/_httpFormDataReadBigint.ts new file mode 100644 index 0000000000..55e7ad3294 --- /dev/null +++ b/src/internal/_httpFormDataReadBigint.ts @@ -0,0 +1,18 @@ +export const _httpFormDataReadBigint = ( + input: string | File | null, +): bigint | null | undefined => + input instanceof File + ? (input as any) + : !!input?.length + ? input === "null" + ? null + : (toBigint(input) as any) + : undefined; + +const toBigint = (str: string): bigint | string => { + try { + return BigInt(str); + } catch { + return str; + } +}; diff --git a/src/internal/_httpFormDataReadBlob.ts b/src/internal/_httpFormDataReadBlob.ts new file mode 100644 index 0000000000..3957f5c7e5 --- /dev/null +++ b/src/internal/_httpFormDataReadBlob.ts @@ -0,0 +1,10 @@ +export const _httpFormDataReadBlob = ( + input: string | Blob | null, +): Blob | null | undefined => + input instanceof Blob + ? input + : input === null + ? undefined + : input === "null" + ? null + : (input as any); diff --git a/src/internal/_httpFormDataReadBoolean.ts b/src/internal/_httpFormDataReadBoolean.ts new file mode 100644 index 0000000000..964f5cdf10 --- /dev/null +++ b/src/internal/_httpFormDataReadBoolean.ts @@ -0,0 +1,16 @@ +export const _httpFormDataReadBoolean = ( + input: string | File | null, +): boolean | null | undefined => + input instanceof File + ? (input as any) + : input === null + ? undefined + : input === "null" + ? null + : input.length === 0 + ? true + : input === "true" || input === "1" + ? true + : input === "false" || input === "0" + ? false + : (input as any); // wrong type diff --git a/src/internal/_httpFormDataReadFile.ts b/src/internal/_httpFormDataReadFile.ts new file mode 100644 index 0000000000..540134b356 --- /dev/null +++ b/src/internal/_httpFormDataReadFile.ts @@ -0,0 +1,10 @@ +export const _httpFormDataReadFile = ( + input: string | File | null, +): File | null | undefined => + input instanceof File + ? input + : input === null + ? undefined + : input === "null" + ? null + : (input as any); diff --git a/src/internal/_httpFormDataReadNumber.ts b/src/internal/_httpFormDataReadNumber.ts new file mode 100644 index 0000000000..b0c0ac1f11 --- /dev/null +++ b/src/internal/_httpFormDataReadNumber.ts @@ -0,0 +1,15 @@ +export const _httpFormDataReadNumber = ( + input: string | File | null, +): number | null | undefined => + input instanceof File + ? (input as any) + : !!input?.length + ? input === "null" + ? null + : (toNumber(input) as any) + : undefined; + +const toNumber = (str: string): number | string => { + const value: number = Number(str); + return isNaN(value) ? str : value; +}; diff --git a/src/internal/_httpFormDataReadString.ts b/src/internal/_httpFormDataReadString.ts new file mode 100644 index 0000000000..3f62cb5f82 --- /dev/null +++ b/src/internal/_httpFormDataReadString.ts @@ -0,0 +1,10 @@ +export const _httpFormDataReadString = ( + input: string | File | null, +): string | null | undefined => + input instanceof File + ? (input as any) + : input === null + ? undefined + : input === "null" + ? null + : input; diff --git a/src/internal/_httpHeaderReadBigint.ts b/src/internal/_httpHeaderReadBigint.ts new file mode 100644 index 0000000000..cbf7d333cd --- /dev/null +++ b/src/internal/_httpHeaderReadBigint.ts @@ -0,0 +1,10 @@ +export const _httpHeaderReadBigint = (value: string | undefined) => + value !== undefined ? toBigint(value) : undefined; + +const toBigint = (str: string): bigint | string => { + try { + return BigInt(str); + } catch { + return str; + } +}; diff --git a/src/internal/_httpHeaderReadBoolean.ts b/src/internal/_httpHeaderReadBoolean.ts new file mode 100644 index 0000000000..0e84694466 --- /dev/null +++ b/src/internal/_httpHeaderReadBoolean.ts @@ -0,0 +1,8 @@ +export const _httpHeaderReadBoolean = (value: string | undefined) => + value !== undefined + ? value === "true" + ? true + : value === "false" + ? false + : value + : undefined; diff --git a/src/internal/_httpHeaderReadNumber.ts b/src/internal/_httpHeaderReadNumber.ts new file mode 100644 index 0000000000..55a285213e --- /dev/null +++ b/src/internal/_httpHeaderReadNumber.ts @@ -0,0 +1,7 @@ +export const _httpHeaderReadNumber = (value: string | undefined) => + value !== undefined ? toNumber(value) : undefined; + +const toNumber = (str: string): number | string => { + const value: number = Number(str); + return isNaN(value) ? str : value; +}; diff --git a/src/internal/_httpParameterReadBigint.ts b/src/internal/_httpParameterReadBigint.ts new file mode 100644 index 0000000000..f494841b04 --- /dev/null +++ b/src/internal/_httpParameterReadBigint.ts @@ -0,0 +1,10 @@ +export const _httpParameterReadBigint = (value: string) => + value !== "null" ? toBigint(value) : null; + +const toBigint = (str: string): bigint | string => { + try { + return BigInt(str); + } catch { + return str; + } +}; diff --git a/src/internal/_httpParameterReadBoolean.ts b/src/internal/_httpParameterReadBoolean.ts new file mode 100644 index 0000000000..71abc97c1a --- /dev/null +++ b/src/internal/_httpParameterReadBoolean.ts @@ -0,0 +1,8 @@ +export const _httpParameterReadBoolean = (value: string) => + value !== "null" + ? value === "true" || value === "1" + ? true + : value === "false" || value === "0" + ? false + : value + : null; diff --git a/src/internal/_httpParameterReadNumber.ts b/src/internal/_httpParameterReadNumber.ts new file mode 100644 index 0000000000..3981876bf1 --- /dev/null +++ b/src/internal/_httpParameterReadNumber.ts @@ -0,0 +1,7 @@ +export const _httpParameterReadNumber = (value: string) => + value !== "null" ? toNumber(value) : null; + +const toNumber = (str: string): number | string => { + const value: number = Number(str); + return isNaN(value) ? str : value; +}; diff --git a/src/internal/_httpParameterReadString.ts b/src/internal/_httpParameterReadString.ts new file mode 100644 index 0000000000..55e07622fd --- /dev/null +++ b/src/internal/_httpParameterReadString.ts @@ -0,0 +1,2 @@ +export const _httpParameterReadString = (value: string) => + value !== "null" ? value : null; diff --git a/src/internal/_httpQueryParseURLSearchParams.ts b/src/internal/_httpQueryParseURLSearchParams.ts new file mode 100644 index 0000000000..43e8cec4dc --- /dev/null +++ b/src/internal/_httpQueryParseURLSearchParams.ts @@ -0,0 +1,12 @@ +import { IReadableURLSearchParams } from "../IReadableURLSearchParams"; + +export const _httpQueryParseURLSearchParams = ( + input: string | IReadableURLSearchParams, +): IReadableURLSearchParams => { + if (typeof input === "string") { + const index: number = input.indexOf("?"); + input = index === -1 ? "" : input.substring(index + 1); + return new URLSearchParams(input); + } + return input; +}; diff --git a/src/internal/_httpQueryReadArray.ts b/src/internal/_httpQueryReadArray.ts new file mode 100644 index 0000000000..0904fe15e0 --- /dev/null +++ b/src/internal/_httpQueryReadArray.ts @@ -0,0 +1,4 @@ +export const _httpQueryReadArray = ( + input: any[], + alternative: null | undefined, +) => (input.length ? input : alternative); diff --git a/src/internal/_httpQueryReadBigint.ts b/src/internal/_httpQueryReadBigint.ts new file mode 100644 index 0000000000..15ee63b296 --- /dev/null +++ b/src/internal/_httpQueryReadBigint.ts @@ -0,0 +1,12 @@ +export const _httpQueryReadBigint = ( + str: string | null, +): bigint | null | undefined => + !!str?.length ? (str === "null" ? null : (toBigint(str) as any)) : undefined; + +const toBigint = (str: string): bigint | string => { + try { + return BigInt(str); + } catch { + return str; + } +}; diff --git a/src/internal/_httpQueryReadBoolean.ts b/src/internal/_httpQueryReadBoolean.ts new file mode 100644 index 0000000000..e8cd40c1e8 --- /dev/null +++ b/src/internal/_httpQueryReadBoolean.ts @@ -0,0 +1,14 @@ +export const _httpQueryReadBoolean = ( + str: string | null, +): boolean | null | undefined => + str === null + ? undefined + : str === "null" + ? null + : str.length === 0 + ? true + : str === "true" || str === "1" + ? true + : str === "false" || str === "0" + ? false + : (str as any); // wrong type diff --git a/src/internal/_httpQueryReadNumber.ts b/src/internal/_httpQueryReadNumber.ts new file mode 100644 index 0000000000..248056bb3d --- /dev/null +++ b/src/internal/_httpQueryReadNumber.ts @@ -0,0 +1,9 @@ +export const _httpQueryReadNumber = ( + str: string | null, +): number | null | undefined => + !!str?.length ? (str === "null" ? null : (toNumber(str) as any)) : undefined; + +const toNumber = (str: string): number | string => { + const value: number = Number(str); + return isNaN(value) ? str : value; +}; diff --git a/src/internal/_httpQueryReadString.ts b/src/internal/_httpQueryReadString.ts new file mode 100644 index 0000000000..175bcf9a86 --- /dev/null +++ b/src/internal/_httpQueryReadString.ts @@ -0,0 +1,4 @@ +export const _httpQueryReadString = ( + str: string | null, +): string | null | undefined => + str === null ? undefined : str === "null" ? null : str; diff --git a/src/internal/_isBetween.ts b/src/internal/_isBetween.ts new file mode 100644 index 0000000000..ea74634a5d --- /dev/null +++ b/src/internal/_isBetween.ts @@ -0,0 +1,2 @@ +export const _isBetween = (value: number, minimum: number, maximum: number) => + minimum <= value && value <= maximum; diff --git a/src/internal/_isBigintString.ts b/src/internal/_isBigintString.ts new file mode 100644 index 0000000000..4db4cfd310 --- /dev/null +++ b/src/internal/_isBigintString.ts @@ -0,0 +1,8 @@ +export const _isBigintString = (str: string): boolean => { + try { + BigInt(str); + return true; + } catch { + return false; + } +}; diff --git a/src/internal/_isFormatByte.ts b/src/internal/_isFormatByte.ts new file mode 100644 index 0000000000..807f6b67eb --- /dev/null +++ b/src/internal/_isFormatByte.ts @@ -0,0 +1,7 @@ +export const _isFormatByte = (str: string): boolean => { + PATTERN.lastIndex = 0; + return PATTERN.test(str); +}; + +const PATTERN = + /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; diff --git a/src/internal/_isFormatDate.ts b/src/internal/_isFormatDate.ts new file mode 100644 index 0000000000..abd17036e8 --- /dev/null +++ b/src/internal/_isFormatDate.ts @@ -0,0 +1,3 @@ +export const _isFormatDate = (str: string): boolean => FORMAT.test(str); + +const FORMAT = /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/; diff --git a/src/internal/_isFormatDateTime.ts b/src/internal/_isFormatDateTime.ts new file mode 100644 index 0000000000..8836480bd5 --- /dev/null +++ b/src/internal/_isFormatDateTime.ts @@ -0,0 +1,4 @@ +export const _isFormatDateTime = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i; diff --git a/src/internal/_isFormatDuration.ts b/src/internal/_isFormatDuration.ts new file mode 100644 index 0000000000..8d11b6849a --- /dev/null +++ b/src/internal/_isFormatDuration.ts @@ -0,0 +1,4 @@ +export const _isFormatDuration = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/; diff --git a/src/internal/_isFormatEmail.ts b/src/internal/_isFormatEmail.ts new file mode 100644 index 0000000000..b0d8924afd --- /dev/null +++ b/src/internal/_isFormatEmail.ts @@ -0,0 +1,4 @@ +export const _isFormatEmail = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i; diff --git a/src/internal/_isFormatHostname.ts b/src/internal/_isFormatHostname.ts new file mode 100644 index 0000000000..4a723fc85d --- /dev/null +++ b/src/internal/_isFormatHostname.ts @@ -0,0 +1,4 @@ +export const _isFormatHostname = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; diff --git a/src/internal/_isFormatIdnEmail.ts b/src/internal/_isFormatIdnEmail.ts new file mode 100644 index 0000000000..4b4f4a837e --- /dev/null +++ b/src/internal/_isFormatIdnEmail.ts @@ -0,0 +1,4 @@ +export const _isFormatIdnEmail = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; diff --git a/src/internal/_isFormatIdnHostname.ts b/src/internal/_isFormatIdnHostname.ts new file mode 100644 index 0000000000..5f4ea6ac59 --- /dev/null +++ b/src/internal/_isFormatIdnHostname.ts @@ -0,0 +1,4 @@ +export const _isFormatIdnHostname = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^([a-z0-9\u00a1-\uffff0-9]+(-[a-z0-9\u00a1-\uffff0-9]+)*\.)+[a-z\u00a1-\uffff]{2,}$/i; diff --git a/src/internal/_isFormatIpv4.ts b/src/internal/_isFormatIpv4.ts new file mode 100644 index 0000000000..c732d75f70 --- /dev/null +++ b/src/internal/_isFormatIpv4.ts @@ -0,0 +1,4 @@ +export const _isFormatIpv4 = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/; diff --git a/src/internal/_isFormatIpv6.ts b/src/internal/_isFormatIpv6.ts new file mode 100644 index 0000000000..a017d1dac1 --- /dev/null +++ b/src/internal/_isFormatIpv6.ts @@ -0,0 +1,4 @@ +export const _isFormatIpv6 = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i; diff --git a/src/internal/_isFormatIri.ts b/src/internal/_isFormatIri.ts new file mode 100644 index 0000000000..414b48e5a8 --- /dev/null +++ b/src/internal/_isFormatIri.ts @@ -0,0 +1,3 @@ +export const _isFormatIri = (str: string): boolean => PATTERN.test(str); + +const PATTERN = /^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u; diff --git a/src/internal/_isFormatIriReference.ts b/src/internal/_isFormatIriReference.ts new file mode 100644 index 0000000000..5a7dc7618b --- /dev/null +++ b/src/internal/_isFormatIriReference.ts @@ -0,0 +1,4 @@ +export const _isFormatIriReference = (str: string): boolean => + PATTERN.test(str); + +const PATTERN = /^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u; diff --git a/src/internal/_isFormatJsonPointer.ts b/src/internal/_isFormatJsonPointer.ts new file mode 100644 index 0000000000..2c24a3ab73 --- /dev/null +++ b/src/internal/_isFormatJsonPointer.ts @@ -0,0 +1,3 @@ +export const _isFormatJsonPointer = (str: string): boolean => PATTERN.test(str); + +const PATTERN = /^(?:\/(?:[^~/]|~0|~1)*)*$/; diff --git a/src/internal/_isFormatPassword.ts b/src/internal/_isFormatPassword.ts new file mode 100644 index 0000000000..787ce5ae34 --- /dev/null +++ b/src/internal/_isFormatPassword.ts @@ -0,0 +1 @@ +export const _isFormatPassword = (): boolean => true; diff --git a/src/internal/_isFormatRegex.ts b/src/internal/_isFormatRegex.ts new file mode 100644 index 0000000000..e92d04c322 --- /dev/null +++ b/src/internal/_isFormatRegex.ts @@ -0,0 +1,8 @@ +export const _isFormatRegex = (str: string): boolean => { + try { + new RegExp(str); + return true; + } catch { + return false; + } +}; diff --git a/src/internal/_isFormatRelativeJsonPointer.ts b/src/internal/_isFormatRelativeJsonPointer.ts new file mode 100644 index 0000000000..d0faf5f834 --- /dev/null +++ b/src/internal/_isFormatRelativeJsonPointer.ts @@ -0,0 +1,4 @@ +export const _isFormatRelativeJsonPointer = (str: string): boolean => + PATTERN.test(str); + +const PATTERN = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; diff --git a/src/internal/_isFormatTime.ts b/src/internal/_isFormatTime.ts new file mode 100644 index 0000000000..8dbc566742 --- /dev/null +++ b/src/internal/_isFormatTime.ts @@ -0,0 +1,4 @@ +export const _isFormatTime = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i; diff --git a/src/internal/_isFormatUri.ts b/src/internal/_isFormatUri.ts new file mode 100644 index 0000000000..d28fbc2355 --- /dev/null +++ b/src/internal/_isFormatUri.ts @@ -0,0 +1,6 @@ +export const _isFormatUri = (str: string): boolean => + NOT_URI_FRAGMENT.test(str) && URI.test(str); + +const NOT_URI_FRAGMENT = /\/|:/; +const URI = + /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; diff --git a/src/internal/_isFormatUriReference.ts b/src/internal/_isFormatUriReference.ts new file mode 100644 index 0000000000..c39296646d --- /dev/null +++ b/src/internal/_isFormatUriReference.ts @@ -0,0 +1,5 @@ +export const _isFormatUriReference = (str: string): boolean => + PATTERN.test(str); + +const PATTERN = + /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; diff --git a/src/internal/_isFormatUriTemplate.ts b/src/internal/_isFormatUriTemplate.ts new file mode 100644 index 0000000000..254dc35c37 --- /dev/null +++ b/src/internal/_isFormatUriTemplate.ts @@ -0,0 +1,4 @@ +export const _isFormatUriTemplate = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; diff --git a/src/internal/_isFormatUrl.ts b/src/internal/_isFormatUrl.ts new file mode 100644 index 0000000000..39eb65faa9 --- /dev/null +++ b/src/internal/_isFormatUrl.ts @@ -0,0 +1,4 @@ +export const _isFormatUrl = (str: string): boolean => PATTERN.test(str); + +const PATTERN = + /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; diff --git a/src/internal/_isFormatUuid.ts b/src/internal/_isFormatUuid.ts new file mode 100644 index 0000000000..faa18eaed1 --- /dev/null +++ b/src/internal/_isFormatUuid.ts @@ -0,0 +1,3 @@ +export const _isFormatUuid = (str: string): boolean => PATTERN.test(str); + +const PATTERN = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; diff --git a/src/internal/_isTypeFloat.ts b/src/internal/_isTypeFloat.ts new file mode 100644 index 0000000000..6a0f0392e9 --- /dev/null +++ b/src/internal/_isTypeFloat.ts @@ -0,0 +1,5 @@ +export const _isTypeFloat = (value: number): boolean => + MINIMUM <= value && value <= MAXIMUM; + +const MINIMUM = -1.175494351e38; +const MAXIMUM = 3.4028235e38; diff --git a/src/internal/_isTypeInt32.ts b/src/internal/_isTypeInt32.ts new file mode 100644 index 0000000000..0454b080fb --- /dev/null +++ b/src/internal/_isTypeInt32.ts @@ -0,0 +1,5 @@ +export const _isTypeInt32 = (value: number): boolean => + Math.floor(value) === value && MINIMUM <= value && value <= MAXIMUM; + +const MINIMUM = -(2 ** 31); +const MAXIMUM = 2 ** 31 - 1; diff --git a/src/internal/_isTypeInt64.ts b/src/internal/_isTypeInt64.ts new file mode 100644 index 0000000000..baa473e04b --- /dev/null +++ b/src/internal/_isTypeInt64.ts @@ -0,0 +1,5 @@ +export const _isTypeInt64 = (value: number): boolean => + Math.floor(value) === value && MINIMUM <= value && value <= MAXIMUM; + +const MINIMUM = -(2 ** 63); +const MAXIMUM = 2 ** 63 - 1; diff --git a/src/internal/_isTypeUint32.ts b/src/internal/_isTypeUint32.ts new file mode 100644 index 0000000000..dafa9ddf4a --- /dev/null +++ b/src/internal/_isTypeUint32.ts @@ -0,0 +1,5 @@ +export const _isTypeUint32 = (value: number): boolean => + Math.floor(value) === value && MINIMUM <= value && value <= MAXIMUM; + +const MINIMUM = 0; +const MAXIMUM = 2 ** 32 - 1; diff --git a/src/internal/_isTypeUint64.ts b/src/internal/_isTypeUint64.ts new file mode 100644 index 0000000000..d21024091f --- /dev/null +++ b/src/internal/_isTypeUint64.ts @@ -0,0 +1,5 @@ +export const _isTypeUint64 = (value: number): boolean => + Math.floor(value) === value && MINIMUM <= value && value <= MAXIMUM; + +const MINIMUM = 0; +const MAXIMUM = 2 ** 64 - 1; diff --git a/src/internal/_isUniqueItems.ts b/src/internal/_isUniqueItems.ts new file mode 100644 index 0000000000..c221fb85fd --- /dev/null +++ b/src/internal/_isUniqueItems.ts @@ -0,0 +1,159 @@ +export const _isUniqueItems = (elements: any[]): boolean => { + // EMTPY OR ONLY ONE + if (elements.length < 2) return true; + + // SHALLOW COMPARISON + if (["boolean", "bigint", "number", "string"].includes(typeof elements[0])) + return new Set(elements).size === elements.length; + + // DEEP COMPARISON + for (let i = 0; i < elements.length; i++) + for (let j = i + 1; j < elements.length; j++) + if (equals(new WeakMap())(elements[i], elements[j])) return false; + return true; +}; + +const equals = (visited: WeakMap>) => { + const next = (a: any, b: any): boolean => { + // SHALLOW EQUAL + if (a === b) return true; + else if (typeof a !== typeof b || typeof a !== "object") return false; + // COMPARE CONTAINERS + else if (Array.isArray(a)) + return Array.isArray(b) && a.map((x, i) => next(x, b[i])).every((x) => x); + else if (a instanceof Set) + return ( + b instanceof Set && a.size === b.size && [...a].every((x) => b.has(x)) + ); + else if (a instanceof Map) + return ( + b instanceof Map && + a.size === b.size && + [...a].every(([k, v]) => b.has(k) && next(v, b.get(k))) + ); + // ATOMIC CLASSES + else if (a instanceof Boolean) + return b instanceof Boolean + ? a.valueOf() === b.valueOf() + : a.valueOf() === b; + else if (a instanceof BigInt) + return b instanceof BigInt ? a === b : a === BigInt(b); + else if (a instanceof Number) + return b instanceof Number + ? a.valueOf() === b.valueOf() + : a.valueOf() === b; + else if (a instanceof String) + return b instanceof String + ? a.valueOf() === b.valueOf() + : a.valueOf() === b; + else if (a instanceof Date) + return b instanceof Date && a.getTime() === b.getTime(); + // BINARY DATA + else if (a instanceof Uint8Array) + return ( + b instanceof Uint8Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Uint8ClampedArray) + return ( + b instanceof Uint8ClampedArray && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Uint16Array) + return ( + b instanceof Uint16Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Uint32Array) + return ( + b instanceof Uint32Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof BigUint64Array) + return ( + b instanceof BigUint64Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Int8Array) + return ( + b instanceof Int8Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Int16Array) + return ( + b instanceof Int16Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Int32Array) + return ( + b instanceof Int32Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof BigInt64Array) + return ( + b instanceof BigInt64Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Float32Array) + return ( + b instanceof Float32Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof Float64Array) + return ( + b instanceof Float64Array && + a.length === b.length && + a.every((x, i) => x === b[i]) + ); + else if (a instanceof ArrayBuffer) { + if (!(b instanceof ArrayBuffer) || a.byteLength !== b.byteLength) + return false; + const x: Uint8Array = new Uint8Array(a); + const y: Uint8Array = new Uint8Array(b); + return x.every((v, i) => v === y[i]); + } else if (a instanceof SharedArrayBuffer) { + if (!(b instanceof SharedArrayBuffer) || a.byteLength !== b.byteLength) + return false; + const x: Uint8Array = new Uint8Array(a); + const y: Uint8Array = new Uint8Array(b); + return x.every((v, i) => v === y[i]); + } else if (a instanceof DataView) { + if (!(b instanceof DataView) || a.byteLength !== b.byteLength) + return false; + const x: Uint8Array = new Uint8Array(a.buffer); + const y: Uint8Array = new Uint8Array(b.buffer); + return x.every((v, i) => v === y[i]); + } else if (a instanceof File) + return ( + b instanceof File && + a.name === b.name && + a.size === b.size && + a.type === b.type && + next(a.slice(), b.slice()) + ); + // JUST PLAIN OBJECTS + else if (a !== null && b !== null) { + if (visited.has(a) && visited.get(a)!.has(b)) + return visited.get(a)!.get(b)!; + if (!visited.has(a)) visited.set(a, new WeakMap()); + visited.get(a)!.set(b, true); + const res: boolean = + Object.keys(a).length === Object.keys(b).length && + Object.keys(a).every((x) => next(a[x], b[x])); + visited.get(a)!.set(b, res); + return res; + } + return false; + }; + return next; +}; diff --git a/src/internal/_jsonStringifyNumber.ts b/src/internal/_jsonStringifyNumber.ts new file mode 100644 index 0000000000..77b58721d7 --- /dev/null +++ b/src/internal/_jsonStringifyNumber.ts @@ -0,0 +1,12 @@ +import { TypeGuardError } from "../TypeGuardError"; + +export const _jsonStringifyNumber = (value: number): number => { + if (isFinite(value) === false) + throw new TypeGuardError({ + method: "typia.json.stringify", + expected: "number", + value, + message: "Error on typia.json.stringify(): infinite or not a number.", + }); + return value; +}; diff --git a/src/internal/_jsonStringifyRest.ts b/src/internal/_jsonStringifyRest.ts new file mode 100644 index 0000000000..94302a28cc --- /dev/null +++ b/src/internal/_jsonStringifyRest.ts @@ -0,0 +1,3 @@ +export const _jsonStringifyRest = (str: string): string => { + return str.length === 2 ? "" : "," + str.substring(1, str.length - 1); +}; diff --git a/src/internal/_jsonStringifyString.ts b/src/internal/_jsonStringifyString.ts new file mode 100644 index 0000000000..e747d632cb --- /dev/null +++ b/src/internal/_jsonStringifyString.ts @@ -0,0 +1,42 @@ +/** + * In the past, name of `typia` was `typescript-json`, and supported + * JSON serialization by wrapping `fast-json-stringify. `typescript-json` was + * a helper library of `fast-json-stringify`, which can skip manual JSON schema + * definition just by putting pure TypeScript type. + * + * This `$string` function is a part of `fast-json-stringify` at that time, and + * still being used in `typia` for the string serialization. + * + * @reference https://github.com/fastify/fast-json-stringify/blob/master/lib/serializer.js + * @blog https://dev.to/samchon/good-bye-typescript-is-ancestor-of-typia-20000x-faster-validator-49fi + */ +export const _jsonStringifyString = (str: string): string => { + const len = str.length; + let result = ""; + let last = -1; + let point = 255; + + // eslint-disable-next-line + for (var i = 0; i < len; i++) { + point = str.charCodeAt(i); + if (point < 32) { + return JSON.stringify(str); + } + if (point >= 0xd800 && point <= 0xdfff) { + // The current character is a surrogate. + return JSON.stringify(str); + } + if ( + point === 0x22 || // '"' + point === 0x5c // '\' + ) { + last === -1 && (last = 0); + result += str.slice(last, i) + "\\"; + last = i; + } + } + + return ( + (last === -1 && '"' + str + '"') || '"' + result + str.slice(last) + '"' + ); +}; diff --git a/src/internal/_jsonStringifyTail.ts b/src/internal/_jsonStringifyTail.ts new file mode 100644 index 0000000000..cbdabf2a2b --- /dev/null +++ b/src/internal/_jsonStringifyTail.ts @@ -0,0 +1,2 @@ +export const _jsonStringifyTail = (str: string): string => + str[str.length - 1] === "," ? str.substring(0, str.length - 1) : str; diff --git a/src/internal/_llmApplicationFinalize.ts b/src/internal/_llmApplicationFinalize.ts new file mode 100644 index 0000000000..207725c597 --- /dev/null +++ b/src/internal/_llmApplicationFinalize.ts @@ -0,0 +1,20 @@ +import { ILlmApplication, ILlmFunction, ILlmSchema } from "@samchon/openapi"; +import { LlmSchemaComposer } from "@samchon/openapi/lib/composers/LlmSchemaComposer"; + +export const _llmApplicationFinalize = ( + app: ILlmApplication, + options?: Partial, "separate">>, +): void => { + app.options = { + ...LlmSchemaComposer.defaultConfig(app.model), + separate: options?.separate ?? null, + }; + if (app.options.separate === null) return; + for (const func of app.functions) + func.separated = LlmSchemaComposer.separateParameters(app.model)({ + parameters: + func.parameters satisfies ILlmSchema.IParameters as any, + predicate: app.options + .separate as ILlmApplication.IOptions["separate"] as any, + }) as ILlmFunction.ISeparated; +}; diff --git a/src/internal/_miscCloneAny.ts b/src/internal/_miscCloneAny.ts new file mode 100644 index 0000000000..de5c00e779 --- /dev/null +++ b/src/internal/_miscCloneAny.ts @@ -0,0 +1,48 @@ +import { Resolved } from "../Resolved"; + +export const _miscCloneAny = (value: T): Resolved => + $cloneMain(value) as Resolved; + +const $cloneMain = (value: any): any => { + if (value === undefined) return undefined; + else if (typeof value === "object") + if (value === null) return null; + else if (Array.isArray(value)) return value.map($cloneMain); + else if (value instanceof Date) return new Date(value); + else if (value instanceof Uint8Array) return new Uint8Array(value); + else if (value instanceof Uint8ClampedArray) + return new Uint8ClampedArray(value); + else if (value instanceof Uint16Array) return new Uint16Array(value); + else if (value instanceof Uint32Array) return new Uint32Array(value); + else if (value instanceof BigUint64Array) return new BigUint64Array(value); + else if (value instanceof Int8Array) return new Int8Array(value); + else if (value instanceof Int16Array) return new Int16Array(value); + else if (value instanceof Int32Array) return new Int32Array(value); + else if (value instanceof BigInt64Array) return new BigInt64Array(value); + else if (value instanceof Float32Array) return new Float32Array(value); + else if (value instanceof Float64Array) return new Float64Array(value); + else if (value instanceof ArrayBuffer) return value.slice(0); + else if (value instanceof SharedArrayBuffer) return value.slice(0); + else if (value instanceof DataView) + return new DataView(value.buffer.slice(0)); + else if (typeof File !== "undefined" && value instanceof File) + return new File([value], value.name, { type: value.type }); + else if (typeof Blob !== "undefined" && value instanceof Blob) + return new Blob([value], { type: value.type }); + else if (value instanceof Set) return new Set([...value].map($cloneMain)); + else if (value instanceof Map) + return new Map( + [...value].map(([k, v]) => [$cloneMain(k), $cloneMain(v)]), + ); + else if (value instanceof WeakSet || value instanceof WeakMap) + throw new Error("WeakSet and WeakMap are not supported"); + else if (value.valueOf() !== value) return $cloneMain(value.valueOf()); + else + return Object.fromEntries( + Object.entries(value) + .map(([k, v]) => [k, $cloneMain(v)]) + .filter(([, v]) => v !== undefined), + ); + else if (typeof value === "function") return undefined; + return value; +}; diff --git a/src/internal/_notationAny.ts b/src/internal/_notationAny.ts new file mode 100644 index 0000000000..409b3972ca --- /dev/null +++ b/src/internal/_notationAny.ts @@ -0,0 +1,37 @@ +export const _notationAny = (rename: (str: string) => string) => { + const main = (input: any): any => { + if (typeof input === "object") + if (input === null) return null; + else if (Array.isArray(input)) return input.map(main); + else if ( + input instanceof Boolean || + input instanceof BigInt || + input instanceof Number || + input instanceof String + ) + return input.valueOf(); + else if (input instanceof Date) return new Date(input); + else if ( + input instanceof Uint8Array || + input instanceof Uint8ClampedArray || + input instanceof Uint16Array || + input instanceof Uint32Array || + input instanceof BigUint64Array || + input instanceof Int8Array || + input instanceof Int16Array || + input instanceof Int32Array || + input instanceof BigInt64Array || + input instanceof Float32Array || + input instanceof Float64Array || + input instanceof DataView + ) + return input; + else return object(input); + return input; + }; + const object = (input: Record) => + Object.fromEntries( + Object.entries(input).map(([key, value]) => [rename(key), main(value)]), + ); + return main; +}; diff --git a/src/internal/_notationCamel.ts b/src/internal/_notationCamel.ts new file mode 100644 index 0000000000..4fa301c5e9 --- /dev/null +++ b/src/internal/_notationCamel.ts @@ -0,0 +1,13 @@ +import { __notationCapitalize } from "./private/__notationCapitalize"; +import { __notationUnsnake } from "./private/__notationUnsnake"; + +export const _notationCamel = __notationUnsnake({ + plain: (str) => + str.length + ? str === str.toUpperCase() + ? str.toLocaleLowerCase() + : `${str[0]!.toLowerCase()}${str.substring(1)}` + : str, + snake: (str, i) => + i === 0 ? str.toLowerCase() : __notationCapitalize(str.toLowerCase()), +}); diff --git a/src/internal/_notationPascal.ts b/src/internal/_notationPascal.ts new file mode 100644 index 0000000000..f79c0887fa --- /dev/null +++ b/src/internal/_notationPascal.ts @@ -0,0 +1,8 @@ +import { __notationCapitalize } from "./private/__notationCapitalize"; +import { __notationUnsnake } from "./private/__notationUnsnake"; + +export const _notationPascal = __notationUnsnake({ + plain: (str) => + str.length ? `${str[0]!.toUpperCase()}${str.substring(1)}` : str, + snake: __notationCapitalize, +}); diff --git a/src/internal/_notationSnake.ts b/src/internal/_notationSnake.ts new file mode 100644 index 0000000000..ce924d5103 --- /dev/null +++ b/src/internal/_notationSnake.ts @@ -0,0 +1,43 @@ +export const _notationSnake = (str: string): string => { + if (str.length === 0) return str; + + // PREFIX + // eslint-disable-next-line @typescript-eslint/no-unused-vars + let prefix: string = ""; + for (let i: number = 0; i < str.length; i++) { + if (str[i] === "_") prefix += "_"; + else break; + } + if (prefix.length !== 0) str = str.substring(prefix.length); + + const out = (s: string) => `${prefix}${s}`; + + // SNAKE CASE + const items: string[] = str.split("_"); + if (items.length > 1) return out(items.map((s) => s.toLowerCase()).join("_")); + + // CAMEL OR PASCAL CASE + const indexes: number[] = []; + for (let i: number = 0; i < str.length; i++) { + const code: number = str.charCodeAt(i); + if (65 <= code && code <= 90) indexes.push(i); + } + for (let i: number = indexes.length - 1; i > 0; --i) { + const now: number = indexes[i]!; + const prev: number = indexes[i - 1]!; + if (now - prev === 1) indexes.splice(i, 1); + } + if (indexes.length !== 0 && indexes[0] === 0) indexes.splice(0, 1); + if (indexes.length === 0) return str.toLowerCase(); + + let ret: string = ""; + for (let i: number = 0; i < indexes.length; i++) { + const first: number = i === 0 ? 0 : indexes[i - 1]!; + const last: number = indexes[i]!; + + ret += str.substring(first, last).toLowerCase(); + ret += "_"; + } + ret += str.substring(indexes[indexes.length - 1]!).toLowerCase(); + return out(ret); +}; diff --git a/src/internal/_randomArray.ts b/src/internal/_randomArray.ts new file mode 100644 index 0000000000..cc6597edc5 --- /dev/null +++ b/src/internal/_randomArray.ts @@ -0,0 +1,21 @@ +import { OpenApi } from "@samchon/openapi"; + +import { _randomInteger } from "./_randomInteger"; + +export const _randomArray = ( + props: Omit & { + element: (index: number, count: number) => T; + }, +) => { + const count: number = _randomInteger({ + type: "integer", + minimum: props.minItems ?? 0, + maximum: props.maxItems ?? (props.minItems ?? 0) + 5, + }); + if (props.uniqueItems !== true) + return new Array(count).fill(null).map((_, i) => props.element(i, count)); + const elements: Set = new Set(); + while (elements.size !== count) + elements.add(props.element(elements.size, count)); + return Array.from(elements); +}; diff --git a/src/internal/_randomBigint.ts b/src/internal/_randomBigint.ts new file mode 100644 index 0000000000..80f69c4706 --- /dev/null +++ b/src/internal/_randomBigint.ts @@ -0,0 +1,6 @@ +import { OpenApi } from "@samchon/openapi"; + +import { _randomInteger } from "./_randomInteger"; + +export const _randomBigint = (props: OpenApi.IJsonSchema.IInteger): bigint => + BigInt(_randomInteger(props)); diff --git a/src/internal/_randomBoolean.ts b/src/internal/_randomBoolean.ts new file mode 100644 index 0000000000..7d549997fe --- /dev/null +++ b/src/internal/_randomBoolean.ts @@ -0,0 +1 @@ +export const _randomBoolean = (): boolean => Math.random() < 0.5; diff --git a/src/internal/_randomFormatByte.ts b/src/internal/_randomFormatByte.ts new file mode 100644 index 0000000000..314fe464df --- /dev/null +++ b/src/internal/_randomFormatByte.ts @@ -0,0 +1,3 @@ +export const _randomFormatByte = (): string => FIXED; + +const FIXED = "vt7ekz4lIoNTTS9sDQYdWKharxIFAR54+z/umIxSgUM="; diff --git a/src/internal/_randomFormatDate.ts b/src/internal/_randomFormatDate.ts new file mode 100644 index 0000000000..b2de9d6a60 --- /dev/null +++ b/src/internal/_randomFormatDate.ts @@ -0,0 +1,18 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatDate = (props?: { + minimum?: number; + maximum?: number; +}) => + new Date( + _randomInteger({ + type: "integer", + minimum: props?.minimum ?? 0, + maximum: + (props?.maximum ?? props?.minimum === undefined) + ? Date.now() + : props.minimum + 365 * 24 * 60 * 60 * 1_000, + }), + ) + .toISOString() + .substring(0, 10); diff --git a/src/internal/_randomFormatDatetime.ts b/src/internal/_randomFormatDatetime.ts new file mode 100644 index 0000000000..9e036f1f3f --- /dev/null +++ b/src/internal/_randomFormatDatetime.ts @@ -0,0 +1,16 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatDatetime = (props?: { + minimum?: number; + maximum?: number; +}) => + new Date( + _randomInteger({ + type: "integer", + minimum: props?.minimum ?? 0, + maximum: + (props?.maximum ?? props?.minimum === undefined) + ? Date.now() + : props.minimum + 365 * 24 * 60 * 60 * 1_000, + }), + ).toISOString(); diff --git a/src/internal/_randomFormatDuration.ts b/src/internal/_randomFormatDuration.ts new file mode 100644 index 0000000000..530b40f536 --- /dev/null +++ b/src/internal/_randomFormatDuration.ts @@ -0,0 +1,27 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatDuration = (): string => { + const period: string = durate([ + ["Y", random(0, 100)], + ["M", random(0, 12)], + ["D", random(0, 31)], + ]); + const time: string = durate([ + ["H", random(0, 24)], + ["M", random(0, 60)], + ["S", random(0, 60)], + ]); + if (period.length + time.length === 0) return "PT0S"; + return `P${period}${time.length ? "T" : ""}${time}`; +}; +const durate = (elements: [string, number][]) => + elements + .filter(([_unit, value]) => value !== 0) + .map(([unit, value]) => `${value}${unit}`) + .join(""); +const random = (minimum: number, maximum: number) => + _randomInteger({ + type: "integer", + minimum, + maximum, + }); diff --git a/src/internal/_randomFormatEmail.ts b/src/internal/_randomFormatEmail.ts new file mode 100644 index 0000000000..8ae3a608ae --- /dev/null +++ b/src/internal/_randomFormatEmail.ts @@ -0,0 +1,11 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatEmail = (): string => + `${random(10)}@${random(10)}.${random(3)}`; + +const random = (length: number) => + _randomString({ + type: "string", + minLength: length, + maxLength: length, + }); diff --git a/src/internal/_randomFormatHostname.ts b/src/internal/_randomFormatHostname.ts new file mode 100644 index 0000000000..3e475f347d --- /dev/null +++ b/src/internal/_randomFormatHostname.ts @@ -0,0 +1,6 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatHostname = (): string => `${random(10)}.${random(3)}`; + +const random = (length: number) => + _randomString({ type: "string", minLength: length, maxLength: length }); diff --git a/src/internal/_randomFormatIdnEmail.ts b/src/internal/_randomFormatIdnEmail.ts new file mode 100644 index 0000000000..21dfef7eb3 --- /dev/null +++ b/src/internal/_randomFormatIdnEmail.ts @@ -0,0 +1,3 @@ +import { _randomFormatEmail } from "./_randomFormatEmail"; + +export const _randomFormatIdnEmail = (): string => _randomFormatEmail(); diff --git a/src/internal/_randomFormatIdnHostname.ts b/src/internal/_randomFormatIdnHostname.ts new file mode 100644 index 0000000000..6fe2b669d9 --- /dev/null +++ b/src/internal/_randomFormatIdnHostname.ts @@ -0,0 +1,3 @@ +import { _randomFormatHostname } from "./_randomFormatHostname"; + +export const _randomFormatIdnHostname = (): string => _randomFormatHostname(); diff --git a/src/internal/_randomFormatIpv4.ts b/src/internal/_randomFormatIpv4.ts new file mode 100644 index 0000000000..a855b5366a --- /dev/null +++ b/src/internal/_randomFormatIpv4.ts @@ -0,0 +1,11 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatIpv4 = (): string => + new Array(4).fill(0).map(random).join("."); + +const random = () => + _randomInteger({ + type: "integer", + minimum: 0, + maximum: 255, + }); diff --git a/src/internal/_randomFormatIpv6.ts b/src/internal/_randomFormatIpv6.ts new file mode 100644 index 0000000000..6c3009465e --- /dev/null +++ b/src/internal/_randomFormatIpv6.ts @@ -0,0 +1,11 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatIpv6 = (): string => + new Array(8).fill(0).map(random).join(":"); + +const random = () => + _randomInteger({ + type: "integer", + minimum: 0, + maximum: 65_535, + }).toString(16); diff --git a/src/internal/_randomFormatIri.ts b/src/internal/_randomFormatIri.ts new file mode 100644 index 0000000000..212931a75e --- /dev/null +++ b/src/internal/_randomFormatIri.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatIri = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatIriReference.ts b/src/internal/_randomFormatIriReference.ts new file mode 100644 index 0000000000..bea74bf5ba --- /dev/null +++ b/src/internal/_randomFormatIriReference.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatIriReference = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatJsonPointer.ts b/src/internal/_randomFormatJsonPointer.ts new file mode 100644 index 0000000000..1fd251f438 --- /dev/null +++ b/src/internal/_randomFormatJsonPointer.ts @@ -0,0 +1,7 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatJsonPointer = (): string => + `/components/schemas/${random()}`; + +const random = () => + _randomString({ type: "string", minLength: 10, maxLength: 10 }); diff --git a/src/internal/_randomFormatPassword.ts b/src/internal/_randomFormatPassword.ts new file mode 100644 index 0000000000..17dbf8d8d5 --- /dev/null +++ b/src/internal/_randomFormatPassword.ts @@ -0,0 +1,8 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatPassword = (): string => + _randomString({ + type: "string", + minLength: 4, + maxLength: 16, + }); diff --git a/src/internal/_randomFormatRegex.ts b/src/internal/_randomFormatRegex.ts new file mode 100644 index 0000000000..fa58962821 --- /dev/null +++ b/src/internal/_randomFormatRegex.ts @@ -0,0 +1,4 @@ +export const _randomFormatRegex = (): string => FIXED; + +const FIXED = + "/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/"; diff --git a/src/internal/_randomFormatRelativeJsonPointer.ts b/src/internal/_randomFormatRelativeJsonPointer.ts new file mode 100644 index 0000000000..46cfbe446d --- /dev/null +++ b/src/internal/_randomFormatRelativeJsonPointer.ts @@ -0,0 +1,8 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatRelativeJsonPointer = (): string => + `${_randomInteger({ + type: "integer", + minimum: 0, + maximum: 10, + })}#`; diff --git a/src/internal/_randomFormatTime.ts b/src/internal/_randomFormatTime.ts new file mode 100644 index 0000000000..80d80798e8 --- /dev/null +++ b/src/internal/_randomFormatTime.ts @@ -0,0 +1,14 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatTime = (): string => + new Date( + _randomInteger({ + type: "integer", + minimum: 0, + maximum: DAY, + }), + ) + .toISOString() + .substring(11); + +const DAY = 86_400_000; diff --git a/src/internal/_randomFormatUri.ts b/src/internal/_randomFormatUri.ts new file mode 100644 index 0000000000..4c7959eb44 --- /dev/null +++ b/src/internal/_randomFormatUri.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatUri = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatUriReference.ts b/src/internal/_randomFormatUriReference.ts new file mode 100644 index 0000000000..a4a27ed42c --- /dev/null +++ b/src/internal/_randomFormatUriReference.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatUriReference = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatUriTemplate.ts b/src/internal/_randomFormatUriTemplate.ts new file mode 100644 index 0000000000..8976ddc58d --- /dev/null +++ b/src/internal/_randomFormatUriTemplate.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatUriTemplate = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatUrl.ts b/src/internal/_randomFormatUrl.ts new file mode 100644 index 0000000000..870042205a --- /dev/null +++ b/src/internal/_randomFormatUrl.ts @@ -0,0 +1,11 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatUrl = (): string => + `https://${random(10)}.${random(3)}`; + +const random = (length: number) => + _randomString({ + type: "string", + minLength: length, + maxLength: length, + }); diff --git a/src/internal/_randomFormatUuid.ts b/src/internal/_randomFormatUuid.ts new file mode 100644 index 0000000000..5d8655d38c --- /dev/null +++ b/src/internal/_randomFormatUuid.ts @@ -0,0 +1,6 @@ +export const _randomFormatUuid = (): string => + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { + const r = (Math.random() * 16) | 0; + const v = c === "x" ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); diff --git a/src/internal/_randomInteger.ts b/src/internal/_randomInteger.ts new file mode 100644 index 0000000000..af68eee279 --- /dev/null +++ b/src/internal/_randomInteger.ts @@ -0,0 +1,47 @@ +import { OpenApi } from "@samchon/openapi"; + +export const _randomInteger = (props: OpenApi.IJsonSchema.IInteger) => { + let minimum: number = + props.minimum ?? + (props.multipleOf ?? 1) * + (props.maximum === undefined ? 0 : props.maximum - 100); + if (props.minimum !== undefined && props.exclusiveMinimum === true) minimum++; + let maximum: number = + props.maximum ?? + (props.multipleOf ?? 1) * + (props.minimum === undefined ? 100 : props.minimum + 100); + if (props.maximum !== undefined && props.exclusiveMaximum === true) maximum--; + if (minimum > maximum) + throw new Error("Minimum value is greater than maximum value."); + return props.multipleOf === undefined + ? scalar({ + minimum, + maximum, + }) + : multiple({ + minimum, + maximum, + multipleOf: props.multipleOf, + }); +}; + +const scalar = (p: { minimum: number; maximum: number }): number => + Math.floor(Math.random() * (p.maximum - p.minimum + 1)) + p.minimum; + +const multiple = (p: { + minimum: number; + maximum: number; + multipleOf: number; +}): number => { + const minimum = Math.ceil(p.minimum / p.multipleOf) * p.multipleOf; + const maximum = Math.floor(p.maximum / p.multipleOf) * p.multipleOf; + if (minimum > maximum) + throw new Error( + "The range of the integer is smaller than the multipleOf value.", + ); + const value: number = scalar({ + minimum, + maximum, + }); + return value - (value % p.multipleOf); +}; diff --git a/src/internal/_randomNumber.ts b/src/internal/_randomNumber.ts new file mode 100644 index 0000000000..75b3a792aa --- /dev/null +++ b/src/internal/_randomNumber.ts @@ -0,0 +1,74 @@ +import { OpenApi } from "@samchon/openapi"; + +export const _randomNumber = (schema: OpenApi.IJsonSchema.INumber): number => { + const minimum: number = + schema.minimum ?? + (schema.multipleOf ?? 1) * + (schema.maximum === undefined ? 0 : schema.maximum - 100); + const maximum: number = + schema.maximum ?? + (schema.multipleOf ?? 1) * + (schema.minimum === undefined ? 100 : schema.minimum + 100); + if (minimum > maximum) + throw new Error("Minimum value is greater than maximum value."); + return schema.multipleOf === undefined + ? scalar({ + minimum, + maximum, + exclusiveMinimum: schema.exclusiveMinimum, + exclusiveMaximum: schema.exclusiveMaximum, + }) + : multiple({ + minimum, + maximum, + multipleOf: schema.multipleOf, + exclusiveMinimum: schema.exclusiveMinimum, + exclusiveMaximum: schema.exclusiveMaximum, + }); +}; + +const scalar = (p: { + minimum: number; + maximum: number; + exclusiveMinimum?: boolean; + exclusiveMaximum?: boolean; +}): number => { + if (p.minimum === p.maximum && (p.exclusiveMinimum || p.exclusiveMaximum)) + throw new Error( + p.exclusiveMinimum + ? "Exclusive minimum value equals maximum value." + : "Exclusive maximum value equals minimum value.", + ); + while (true) { + const value: number = Math.random() * (p.maximum - p.minimum) + p.minimum; + if (p.exclusiveMinimum && value === p.minimum) continue; + else if (p.exclusiveMaximum && value === p.maximum) continue; + return value; + } +}; + +const multiple = (p: { + minimum: number; + maximum: number; + multipleOf: number; + exclusiveMinimum?: boolean; + exclusiveMaximum?: boolean; +}): number => { + let minimum = Math.ceil(p.minimum / p.multipleOf) * p.multipleOf; + let maximum = Math.floor(p.maximum / p.multipleOf) * p.multipleOf; + if (p.exclusiveMinimum === true && minimum % p.multipleOf === 0) + minimum += p.multipleOf; + if (p.exclusiveMaximum === true && maximum % p.multipleOf === 0) + maximum -= p.multipleOf; + if (minimum > maximum) + throw new Error( + "The range of the integer is smaller than the multipleOf value.", + ); + const value: number = scalar({ + minimum, + maximum, + exclusiveMinimum: p.exclusiveMinimum, + exclusiveMaximum: p.exclusiveMaximum, + }); + return value - (value % p.multipleOf); +}; diff --git a/src/internal/_randomPattern.ts b/src/internal/_randomPattern.ts new file mode 100644 index 0000000000..0355ca7f56 --- /dev/null +++ b/src/internal/_randomPattern.ts @@ -0,0 +1,10 @@ +import RandExp from "randexp"; + +export const _randomPattern = (regex: RegExp): string => { + const r: RandExp = new RandExp(regex); + for (let i: number = 0; i < 10; ++i) { + const str: string = r.gen(); + if (regex.test(str)) return str; + } + return r.gen(); +}; diff --git a/src/internal/_randomPick.ts b/src/internal/_randomPick.ts new file mode 100644 index 0000000000..497eb46d0c --- /dev/null +++ b/src/internal/_randomPick.ts @@ -0,0 +1,9 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomPick = (array: T[]): T => array[random(array)]!; +const random = (array: T[]) => + _randomInteger({ + type: "integer", + minimum: 0, + maximum: array.length - 1, + }); diff --git a/src/internal/_randomString.ts b/src/internal/_randomString.ts new file mode 100644 index 0000000000..e87176c326 --- /dev/null +++ b/src/internal/_randomString.ts @@ -0,0 +1,24 @@ +import { OpenApi } from "@samchon/openapi"; + +import { _randomInteger } from "./_randomInteger"; + +export const _randomString = (props: OpenApi.IJsonSchema.IString) => { + const length: number = _randomInteger({ + type: "integer", + minimum: props.minLength ?? 0, + maximum: props.maxLength, + }); + return new Array(length) + .fill(0) + .map(() => ALPHABETS[random()]) + .join(""); +}; + +const ALPHABETS = "abcdefghijklmnopqrstuvwxyz"; + +const random = () => + _randomInteger({ + type: "integer", + minimum: 0, + maximum: ALPHABETS.length - 1, + }); diff --git a/src/internal/_throwTypeGuardError.ts b/src/internal/_throwTypeGuardError.ts new file mode 100644 index 0000000000..3785b93058 --- /dev/null +++ b/src/internal/_throwTypeGuardError.ts @@ -0,0 +1,5 @@ +import { TypeGuardError } from "../TypeGuardError"; + +export const _throwTypeGuardError = (props: TypeGuardError.IProps) => { + throw new TypeGuardError(props); +}; diff --git a/src/internal/_validateReport.ts b/src/internal/_validateReport.ts new file mode 100644 index 0000000000..c25b2e6a37 --- /dev/null +++ b/src/internal/_validateReport.ts @@ -0,0 +1,13 @@ +import { IValidation } from "../IValidation"; + +export const _validateReport = (array: IValidation.IError[]) => { + const reportable = (path: string): boolean => { + if (array.length === 0) return true; + const last: string = array[array.length - 1]!.path; + return path.length > last.length || last.substring(0, path.length) !== path; + }; + return (exceptable: boolean, error: IValidation.IError): false => { + if (exceptable && reportable(error.path)) array.push(error); + return false; + }; +}; diff --git a/src/internal/private/__notationCapitalize.ts b/src/internal/private/__notationCapitalize.ts new file mode 100644 index 0000000000..c6c88a6a35 --- /dev/null +++ b/src/internal/private/__notationCapitalize.ts @@ -0,0 +1,2 @@ +export const __notationCapitalize = (str: string) => + str.length ? str[0]!.toUpperCase() + str.slice(1).toLowerCase() : str; diff --git a/src/internal/private/__notationUnsnake.ts b/src/internal/private/__notationUnsnake.ts new file mode 100644 index 0000000000..bc0aa01acf --- /dev/null +++ b/src/internal/private/__notationUnsnake.ts @@ -0,0 +1,24 @@ +export const __notationUnsnake = + (props: { + plain: (str: string) => string; + snake: (str: string, index: number) => string; + }) => + (str: string): string => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + let prefix: string = ""; + for (let i: number = 0; i < str.length; i++) { + if (str[i] === "_") prefix += "_"; + else break; + } + if (prefix.length !== 0) str = str.substring(prefix.length); + + const out = (s: string) => `${prefix}${s}`; + if (str.length === 0) return out(""); + + const items: string[] = str.split("_").filter((s) => s.length !== 0); + return items.length === 0 + ? out("") + : items.length === 1 + ? out(props.plain(items[0]!)) + : out(items.map(props.snake).join("")); + }; diff --git a/src/json.ts b/src/json.ts index aa33988537..4fe5079542 100644 --- a/src/json.ts +++ b/src/json.ts @@ -1,6 +1,4 @@ -import * as Namespace from "./functional/Namespace"; - -import { IJsonApplication } from "./schemas/json/IJsonApplication"; +import { IJsonSchemaCollection } from "./schemas/json/IJsonSchemaCollection"; import { IValidation } from "./IValidation"; import { Primitive } from "./Primitive"; @@ -8,41 +6,93 @@ import { TypeGuardError } from "./TypeGuardError"; /* =========================================================== JSON - - SCHEMA + - METADATA - PARSE - STRINGIFY - FACTORY FUNCTIONS ============================================================== - SCHEMA + METADATA ----------------------------------------------------------- */ /** * > You must configure the generic argument `Types`. * - * JSON Schema Application. + * JSON Schemas generator. * - * Creates a JSON schema application which contains both main JSON schemas and - * components. Note that, all of the named types are stored in the - * {@link IJsonApplication.components} property for the `$ref` referencing. + * Creates a JSON schema list which contains both main JSON schemas + * and components. Note that, all of the named types are stored in the + * {@link IJsonSchemaCollection.components} property for the `$ref` referencing. * * Also, you can specify the OpenAPI version by configuring the second generic * argument `Version`. For reference, the default version is `"3.1"`, and key * different of `"3.0"` and `"3.1"` is whether supporting the tuple type or not. * * @template Types Tuple of target types - * @template Purpose Purpose of the JSON schema - * @template Surplus Allow surplus properties starting with `x-typia-` or not - * @return JSON schema application + * @template Version Version of OpenAPI specification. Default is 3.1 + * @return JSON schema list * * @author Jeongho Nam - https://github.com/samchon */ +export function schemas(): never; + +/** + * JSON Schemas generator. + * + * Creates a JSON schema list which contains both main JSON schemas + * and components. Note that, all of the named types are stored in the + * {@link IJsonSchemaCollection.components} property for the `$ref` referencing. + * + * Also, you can specify the OpenAPI version by configuring the second generic + * argument `Version`. For reference, the default version is `"3.1"`, and key + * different of `"3.0"` and `"3.1"` is whether supporting the tuple type or not. + * + * @template Types Tuple of target types + * @template Version Version of OpenAPI specification. Default is 3.1 + * @return JSON schema list + * + * @author Jeongho Nam - https://github.com/samchon + */ +export function schemas< + Types extends unknown[], + Version extends "3.0" | "3.1" = "3.1", +>(): IJsonSchemaCollection; + +/** + * @internal + */ +export function schemas(): never { + halt("schemas"); +} + +/** + * > You must configure the generic argument `Types`. + * + * JSON Schemas generator. + * + * Creates a JSON schema list which contains both main JSON schemas + * and components. Note that, all of the named types are stored in the + * {@link IJsonSchemaCollection.components} property for the `$ref` referencing. + * + * Also, you can specify the OpenAPI version by configuring the second generic + * argument `Version`. For reference, the default version is `"3.1"`, and key + * different of `"3.0"` and `"3.1"` is whether supporting the tuple type or not. + * + * @template Types Tuple of target types + * @template Version Version of OpenAPI specification. Default is 3.1 + * @return JSON schema list + * + * @deprcated Use {@link schemas} function instead please. + * This function would be changed to return {@linkk ILlmApplication} like + * structure in the future version (maybe next v8 major update). + * @author Jeongho Nam - https://github.com/samchon + */ export function application(): never; /** - * JSON Schema Application. + * JSON Schemas generator. * - * Creates a JSON schema application which contains both main JSON schemas and - * components. Note that, all of the named types are stored in the - * {@link IJsonApplication.components} property for the `$ref` referencing. + * Creates a JSON schema list which contains both main JSON schemas + * and components. Note that, all of the named types are stored in the + * {@link IJsonSchemaCollection.components} property for the `$ref` referencing. * * Also, you can specify the OpenAPI version by configuring the second generic * argument `Version`. For reference, the default version is `"3.1"`, and key @@ -50,14 +100,17 @@ export function application(): never; * * @template Types Tuple of target types * @template Version Version of OpenAPI specification. Default is 3.1 - * @return JSON schema application + * @return JSON schema list * + * @deprcated Use {@link schemas} function instead please. + * This function would be changed to return {@linkk ILlmApplication} like + * structure in the future version (maybe next v8 major update). * @author Jeongho Nam - https://github.com/samchon */ export function application< Types extends unknown[], Version extends "3.0" | "3.1" = "3.1", ->(): IJsonApplication; +>(): IJsonSchemaCollection; /** * @internal @@ -66,6 +119,52 @@ export function application(): never { halt("application"); } +// /** +// * > You must configure the generic argument `App`. +// * +// * TypeScript functions to JSON schema based application schema. +// * +// * Creates an application schema collecting the functions' schema based on the +// * JSON schema specification. +// * +// * The default version of the OpenAPI specification is `"3.1"`, but you can +// * specify the version by configuring the second generic argument `Version`. +// * +// * @template App Target class or interface type collecting the functions +// * @template Version Version of OpenAPI specification. Default is 3.1 +// * @returns Application schema of JSON schema based +// * +// * @author Jeongho Nam - https://github.com/samchon +// */ +// export function application(): never; + +// /** +// * TypeScript functions to JSON schema based application schema. +// * +// * Creates an application schema collecting the functions' schema based on the +// * JSON schema specification. +// * +// * The default version of the OpenAPI specification is `"3.1"`, but you can +// * specify the version by configuring the second generic argument `Version`. +// * +// * @template App Target class or interface type collecting the functions +// * @template Version Version of OpenAPI specification. Default is 3.1 +// * @returns Application schema of JSON schema based +// * +// * @author Jeongho Nam - https://github.com/samchon +// */ +// export function application< +// App extends object, +// Version extends "3.0" | "3.1" = "3.1", +// >(): IJsonApplication; + +// /** +// * @internal +// */ +// export function application(): never { +// halt("application"); +// } + /* ----------------------------------------------------------- PARSE ----------------------------------------------------------- */ @@ -89,7 +188,7 @@ export function application(): never { * * @author Jeongho Nam - https://github.com/samchon */ -function assertParse( +export function assertParse( input: string, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -113,7 +212,7 @@ function assertParse( * * @author Jeongho Nam - https://github.com/samchon */ -function assertParse( +export function assertParse( input: string, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Primitive; @@ -121,14 +220,9 @@ function assertParse( /** * @internal */ -function assertParse(): Primitive { +export function assertParse(): Primitive { halt("assertParse"); } -const assertParsePure = /** @__PURE__ */ Object.assign( - assertParse, - /** @__PURE__ */ Namespace.assert("json.assertParse"), -); -export { assertParsePure as assertParse }; /** * > You must configure the generic argument `T`. @@ -149,7 +243,7 @@ export { assertParsePure as assertParse }; * * @author Jeongho Nam - https://github.com/samchon */ -function isParse(input: string): never; +export function isParse(input: string): never; /** * Safe `JSON.parse()` function with type checking. @@ -168,19 +262,14 @@ function isParse(input: string): never; * * @author Jeongho Nam - https://github.com/samchon */ -function isParse(input: string): Primitive | null; +export function isParse(input: string): Primitive | null; /** * @internal */ -function isParse(): Primitive | null { +export function isParse(): Primitive | null { halt("isParse"); } -const isParsePure = /** @__PURE__ */ Object.assign( - isParse, - /** @__PURE__ */ Namespace.is(), -); -export { isParsePure as isParse }; /** * > You must configure the generic argument `T`. @@ -202,7 +291,7 @@ export { isParsePure as isParse }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateParse(input: string): never; +export function validateParse(input: string): never; /** * Safe `JSON.parse()` function with detailed type validation. @@ -222,19 +311,14 @@ function validateParse(input: string): never; * * @author Jeongho Nam - https://github.com/samchon */ -function validateParse(input: string): IValidation>; +export function validateParse(input: string): IValidation>; /** * @internal */ -function validateParse(): IValidation> { +export function validateParse(): IValidation> { halt("validateParse"); } -const validateParsePure = /** @__PURE__ */ Object.assign< - typeof validateParse, - {} ->(validateParse, /** @__PURE__ */ Namespace.validate()); -export { validateParsePure as validateParse }; /* ----------------------------------------------------------- STRINGIFY @@ -261,19 +345,14 @@ export { validateParsePure as validateParse }; * * @author Jeongho Nam - https://github.com/samchon */ -function stringify(input: T): string; +export function stringify(input: T): string; /** * @internal */ -function stringify(): never { +export function stringify(): never { halt("stringify"); } -const stringifyPure = /** @__PURE__ */ Object.assign( - stringify, - /** @__PURE__ */ Namespace.json.stringify("stringify"), -); -export { stringifyPure as stringify }; /** * 5x faster `JSON.stringify()` function with type assertion. @@ -297,7 +376,7 @@ export { stringifyPure as stringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertStringify( +export function assertStringify( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): string; @@ -324,7 +403,7 @@ function assertStringify( * * @author Jeongho Nam - https://github.com/samchon */ -function assertStringify( +export function assertStringify( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): unknown; @@ -332,19 +411,9 @@ function assertStringify( /** * @internal */ -function assertStringify(): string { +export function assertStringify(): string { halt("assertStringify"); } -const assertStringifyPure = /** @__PURE__ */ Object.assign< - typeof assertStringify, - {}, - {} ->( - assertStringify, - /** @__PURE__ */ Namespace.assert("json.assertStringify"), - /** @__PURE__ */ Namespace.json.stringify("assertStringify"), -); -export { assertStringifyPure as assertStringify }; /** * 7x faster `JSON.stringify()` function with type checking. @@ -367,7 +436,7 @@ export { assertStringifyPure as assertStringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function isStringify(input: T): string | null; +export function isStringify(input: T): string | null; /** * 7x faster `JSON.stringify()` function with type checking. @@ -390,26 +459,15 @@ function isStringify(input: T): string | null; * * @author Jeongho Nam - https://github.com/samchon */ -function isStringify(input: unknown): string | null; +export function isStringify(input: unknown): string | null; /** * @internal */ -function isStringify(): string | null { +export function isStringify(): string | null { halt("isStringify"); } -const isStringifyPure = /** @__PURE__ */ Object.assign< - typeof isStringify, - {}, - {} ->( - isStringify, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.json.stringify("isStringify"), -); -export { isStringifyPure as isStringify }; - /** * 5x faster `JSON.stringify()` function with detailed type validation. * @@ -432,7 +490,7 @@ export { isStringifyPure as isStringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateStringify(input: T): IValidation; +export function validateStringify(input: T): IValidation; /** * 5x faster `JSON.stringify()` function with detailed type validation. @@ -456,24 +514,14 @@ function validateStringify(input: T): IValidation; * * @author Jeongho Nam - https://github.com/samchon */ -function validateStringify(input: unknown): IValidation; +export function validateStringify(input: unknown): IValidation; /** * @internal */ -function validateStringify(): IValidation { +export function validateStringify(): IValidation { halt("validateStringify"); } -const validateStringifyPure = /** @__PURE__ */ Object.assign< - typeof validateStringify, - {}, - {} ->( - validateStringify, - /** @__PURE__ */ Namespace.validate(), - /** @__PURE__ */ Namespace.json.stringify("validateStringify"), -); -export { validateStringifyPure as validateStringify }; /* ----------------------------------------------------------- FACTORY FUNCTIONS @@ -487,7 +535,7 @@ export { validateStringifyPure as validateStringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsParse(): never; +export function createIsParse(): never; /** * Creates a reusable {@link isParse} function. @@ -497,19 +545,14 @@ function createIsParse(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsParse(): (input: string) => Primitive | null; +export function createIsParse(): (input: string) => Primitive | null; /** * @internal */ -function createIsParse(): (input: string) => Primitive | null { +export function createIsParse(): (input: string) => Primitive | null { halt("createIsParse"); } -const createIsParsePure = /** @__PURE__ */ Object.assign< - typeof createIsParse, - {} ->(createIsParse, isParsePure); -export { createIsParsePure as createIsParse }; /** * Creates a reusable {@link assertParse} function. @@ -521,7 +564,7 @@ export { createIsParsePure as createIsParse }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertParse( +export function createAssertParse( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -534,21 +577,16 @@ function createAssertParse( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertParse( +export function createAssertParse( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: string) => Primitive; /** * @internal */ -function createAssertParse(): (input: string) => Primitive { +export function createAssertParse(): (input: string) => Primitive { halt("createAssertParse"); } -const createAssertParsePure = /** @__PURE__ */ Object.assign< - typeof createAssertParse, - {} ->(createAssertParse, assertParsePure); -export { createAssertParsePure as createAssertParse }; /** * Creates a reusable {@link validateParse} function. @@ -559,7 +597,7 @@ export { createAssertParsePure as createAssertParse }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateParse(): never; +export function createValidateParse(): never; /** * Creates a reusable {@link validateParse} function. @@ -569,23 +607,19 @@ function createValidateParse(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateParse(): (input: string) => IValidation>; +export function createValidateParse(): ( + input: string, +) => IValidation>; /** * @internal */ -function createValidateParse(): ( +export function createValidateParse(): ( input: string, ) => IValidation> { halt("createValidateParse"); } -const createValidateParsePure = /** @__PURE__ */ Object.assign< - typeof createValidateParse, - {} ->(createValidateParse, validateParsePure); -export { createValidateParsePure as createValidateParse }; - /** * Creates a reusable {@link stringify} function. * @@ -595,7 +629,7 @@ export { createValidateParsePure as createValidateParse }; * * @author Jeongho Nam - https://github.com/samchon */ -function createStringify(): never; +export function createStringify(): never; /** * Creates a reusable {@link stringify} function. @@ -605,21 +639,15 @@ function createStringify(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createStringify(): (input: T) => string; +export function createStringify(): (input: T) => string; /** * @internal */ -function createStringify(): (input: T) => string { +export function createStringify(): (input: T) => string { halt("createStringify"); } -const createStringifyPure = /** @__PURE__ */ Object.assign< - typeof createStringify, - {} ->(createStringify, stringifyPure); -export { createStringifyPure as createStringify }; - /** * Creates a reusable {@link assertStringify} function. * @@ -630,7 +658,7 @@ export { createStringifyPure as createStringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertStringify( +export function createAssertStringify( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -643,23 +671,17 @@ function createAssertStringify( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertStringify( +export function createAssertStringify( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: unknown) => string; /** * @internal */ -function createAssertStringify(): (input: unknown) => string { +export function createAssertStringify(): (input: unknown) => string { halt("createAssertStringify"); } -const createAssertStringifyPure = /** @__PURE__ */ Object.assign< - typeof createAssertStringify, - {} ->(createAssertStringify, assertStringifyPure); -export { createAssertStringifyPure as createAssertStringify }; - /** * Creates a reusable {@link isStringify} function. * @@ -669,7 +691,7 @@ export { createAssertStringifyPure as createAssertStringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsStringify(): never; +export function createIsStringify(): never; /** * Creates a reusable {@link isStringify} function. @@ -679,21 +701,15 @@ function createIsStringify(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsStringify(): (input: unknown) => string | null; +export function createIsStringify(): (input: unknown) => string | null; /** * @internal */ -function createIsStringify(): (input: unknown) => string | null { +export function createIsStringify(): (input: unknown) => string | null { halt("createIsStringify"); } -const createIsStringifyPure = /** @__PURE__ */ Object.assign< - typeof createIsStringify, - {} ->(createIsStringify, isStringifyPure); -export { createIsStringifyPure as createIsStringify }; - /** * Creates a reusable {@link validateStringify} function. * @@ -703,7 +719,7 @@ export { createIsStringifyPure as createIsStringify }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateStringify(): never; +export function createValidateStringify(): never; /** * Creates a reusable {@link validateStringify} function. @@ -713,21 +729,19 @@ function createValidateStringify(): never; * @author Jeongho Nam - https://github.com/samchon */ -function createValidateStringify(): (input: unknown) => IValidation; +export function createValidateStringify(): ( + input: unknown, +) => IValidation; /** * @internal */ -function createValidateStringify(): (input: unknown) => IValidation { +export function createValidateStringify(): ( + input: unknown, +) => IValidation { halt("createValidateStringify"); } -const createValidateStringifyPure = /** @__PURE__ */ Object.assign< - typeof createValidateStringify, - {} ->(createValidateStringify, validateStringifyPure); -export { createValidateStringifyPure as createValidateStringify }; - /** * @internal */ diff --git a/src/llm.ts b/src/llm.ts index 989ceb2531..198017906d 100644 --- a/src/llm.ts +++ b/src/llm.ts @@ -1,7 +1,5 @@ import { ILlmApplication, ILlmSchema } from "@samchon/openapi"; -import * as Namespace from "./functional/Namespace"; - /** * > You must configure the generic argument `App`. * @@ -34,14 +32,29 @@ import * as Namespace from "./functional/Namespace"; * humand and LLM sides' parameters into one through {@link HttpLlm.mergeParameters} * before the actual LLM function call execution. * + * Here is the list of available `Model` types with their corresponding LLM schema. + * Reading the following list, and determine the `Model` type considering the + * characteristics of the target LLM provider. + * + * - LLM provider schemas + * - `chatgpt`: [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts) + * - `claude`: [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts) + * - `gemini`: [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) + * - `llama`: [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts) + * - Midldle layer schemas + * - `3.0`: [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts) + * - `3.1`: [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts) + * * @template App Target class or interface type collecting the functions to call + * @template Model LLM schema model + * @template Config Configuration of LLM schema composition * @param options Options for the LLM application construction * @returns Application of LLM function calling schemas * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -function application( - options?: Omit, +export function application( + options?: Partial, "separate">>, ): never; /** @@ -74,28 +87,134 @@ function application( * humand and LLM sides' parameters into one through {@link HttpLlm.mergeParameters} * before the actual LLM function call execution. * + * Here is the list of available `Model` types with their corresponding LLM schema. + * Reading the following list, and determine the `Model` type considering the + * characteristics of the target LLM provider. + * + * - LLM provider schemas + * - `chatgpt`: [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts) + * - `claude`: [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts) + * - `gemini`: [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) + * - `llama`: [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts) + * - Midldle layer schemas + * - `3.0`: [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts) + * - `3.1`: [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts) + * * @template App Target class or interface type collecting the functions to call + * @template Model LLM schema model + * @template Config Configuration of LLM schema composition * @param options Options for the LLM application construction * @returns Application of LLM function calling schemas * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -function application( - options?: Omit, -): ILlmApplication; +export function application< + App extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, +>( + options?: Partial, "separate">>, +): ILlmApplication; /** * @internal */ -function application(): never { +export function application(): never { halt("application"); } -const applicationPure = /** @__PURE__ */ Object.assign( - application, - /** @__PURE__ */ Namespace.llm.application(), -); -export { applicationPure as application }; +/** + * > You must configure the generic argument `Parameters`. + * + * TypeScript parameters to LLM parameters schema. + * + * Creates an LLM (Large Language Model) parameters schema, a type metadata that is used in the + * [LLM function calling](https://platform.openai.com/docs/guides/function-calling) + * and [LLM structured outputs](https://platform.openai.com/docs/guides/structured-outputs), + * from a TypeScript parameters type. + * + * For references, LLM identifies only keyworded arguments, not positional arguments. + * Therefore, the TypeScript parameters type must be an object type, and its properties + * must be static. If dynamic properties are, it would be compilation error. + * + * Also, such parameters type can be utilized not only for the LLM function calling, + * but also for the LLM structured outputs. The LLM structured outputs is a feature + * that LLM (Large Language Model) can generate a structured output, not only a plain + * text, by filling the parameters from the conversation (maybe chatting text) with user + * (human). + * + * Here is the list of available `Model` types with their corresponding LLM schema. + * Reading the following list, and determine the `Model` type considering the + * characteristics of the target LLM provider. + * + * - LLM provider schemas + * - `chatgpt`: [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts) + * - `claude`: [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts) + * - `gemini`: [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) + * - `llama`: [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts) + * - Midldle layer schemas + * - `3.0`: [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts) + * - `3.1`: [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts) + * + * @template Parameters Target parameters type + * @template Model LLM schema model + * @template Config Configuration of LLM schema composition + * @returns LLM parameters schema + * @reference https://platform.openai.com/docs/guides/function-calling + * @reference https://platform.openai.com/docs/guides/structured-outputs + */ +export function parameters(): never; + +/** + * TypeScript parameters to LLM parameters schema. + * + * Creates an LLM (Large Language Model) parameters schema, a type metadata that is used in the + * [LLM function calling](https://platform.openai.com/docs/guides/function-calling) + * and [LLM structured outputs](https://platform.openai.com/docs/guides/structured-outputs), + * from a TypeScript parameters type. + * + * For references, LLM identifies only keyworded arguments, not positional arguments. + * Therefore, the TypeScript parameters type must be an object type, and its properties + * must be static. If dynamic properties are, it would be compilation error. + * + * Also, such parameters type can be utilized not only for the LLM function calling, + * but also for the LLM structured outputs. The LLM structured outputs is a feature + * that LLM (Large Language Model) can generate a structured output, not only a plain + * text, by filling the parameters from the conversation (maybe chatting text) with user + * (human). + * + * Here is the list of available `Model` types with their corresponding LLM schema. + * Reading the following list, and determine the `Model` type considering the + * characteristics of the target LLM provider. + * + * - LLM provider schemas + * - `chatgpt`: [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts) + * - `claude`: [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts) + * - `gemini`: [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) + * - `llama`: [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts) + * - Midldle layer schemas + * - `3.0`: [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts) + * - `3.1`: [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts) + * + * @template Parameters Target parameters type + * @template Model LLM schema model + * @template Config Configuration of LLM schema composition + * @returns LLM parameters schema + * @reference https://platform.openai.com/docs/guides/function-calling + * @reference https://platform.openai.com/docs/guides/structured-outputs + */ +export function parameters< + Parameters extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, +>(): ILlmSchema.ModelParameters[Model]; + +/** + * @internal + */ +export function parameters(): never { + halt("parameters"); +} /** * > You must configure the generic argument `T`. @@ -106,14 +225,24 @@ export { applicationPure as application }; * [LLM function calling](@reference https://platform.openai.com/docs/guides/function-calling), * from a TypeScript type. * - * The returned {@link ILlmSchema} type is similar to the OpenAPI v3.0 based JSON schema - * definition, but it is more simplified for the LLM function calling by remmoving the - * {@link OpenApiV3.IJson.IReference reference} type embodied by the - * {@link OpenApiV3.IJson.IReference.$ref `$ref`} proeprty. + * The returned {@link ILlmSchema} type would be specified by the `Model` argument, + * and here is the list of available `Model` types with their corresponding LLM schema. + * Reading the following list, and determine the `Model` type considering the + * characteristics of the target LLM provider. + * + * - LLM provider schemas + * - `chatgpt`: [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts) + * - `claude`: [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts) + * - `gemini`: [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) + * - `llama`: [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts) + * - Midldle layer schemas + * - `3.0`: [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts) + * - `3.1`: [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts) * * If you actually want to perform the LLM function calling with TypeScript functions, - * you can do it with the {@link application} function. Let's enjoy the - * LLM function calling with native TypeScript functions and types. + * you can do it with the {@link application} function. Otherwise you hope to perform the + * structured output, {@link parameters} function is better. Let's enjoy the LLM function calling + * and structured output with the native TypeScript functions and types. * * > **What LLM function calling is? * > @@ -129,8 +258,11 @@ export { applicationPure as application }; * > LLM will continue the next conversation based on the return value. * * @template T Target type + * @template Model LLM schema model + * @template Config Configuration of LLM schema composition * @returns LLM schema * @reference https://platform.openai.com/docs/guides/function-calling + * @reference https://platform.openai.com/docs/guides/structured-outputs * @author Jeongho Nam - https://github.com/samchon */ export function schema(): never; @@ -142,14 +274,22 @@ export function schema(): never; * [LLM function calling](@reference https://platform.openai.com/docs/guides/function-calling), * from a TypeScript type. * - * The returned {@link ILlmSchema} type is similar to the OpenAPI v3.0 based JSON schema - * definition, but it is more simplified for the LLM function calling by remmoving the - * {@link OpenApiV3.IJson.IReference reference} type embodied by the - * {@link OpenApiV3.IJson.IReference.$ref `$ref`} proeprty. + * The returned {@link ILlmSchema} type would be specified by the `Model` argument, + * and here is the list of available `Model` types with their corresponding LLM schema: + * + * - LLM provider schemas + * - `chatgpt`: [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts) + * - `claude`: [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts) + * - `gemini`: [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) + * - `llama`: [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts) + * - Midldle layer schemas + * - `3.0`: [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts) + * - `3.1`: [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts) * * If you actually want to perform the LLM function calling with TypeScript functions, - * you can do it with the {@link application} function. Let's enjoy the - * LLM function calling with native TypeScript functions and types. + * you can do it with the {@link application} function. Otherwise you hope to perform the + * structured output, {@link parameters} function is better. Let's enjoy the LLM function calling + * and structured output with the native TypeScript functions and types. * * > **What LLM function calling is? * > @@ -165,11 +305,25 @@ export function schema(): never; * > LLM will continue the next conversation based on the return value. * * @template T Target type + * @template Model LLM schema model + * @template Config Configuration of LLM schema composition * @returns LLM schema * @reference https://platform.openai.com/docs/guides/function-calling + * @reference https://platform.openai.com/docs/guides/structured-outputs * @author Jeongho Nam - https://github.com/samchon */ -export function schema(): ILlmSchema; +export function schema< + T, + Model extends ILlmSchema.Model, + Config extends Partial = {}, +>( + ...$defs: Extract< + ILlmSchema.ModelSchema[Model], + { $ref: string } + > extends never + ? [] + : [Record] +): ILlmSchema.ModelSchema[Model]; /** * @internal diff --git a/src/misc.ts b/src/misc.ts index faa559e957..ae5bad22eb 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -7,8 +7,6 @@ ============================================================== LITERALS ----------------------------------------------------------- */ -import * as Namespace from "./functional/Namespace"; - import { Atomic } from "./typings/Atomic"; import { IValidation } from "./IValidation"; @@ -77,19 +75,14 @@ export function literals(): never { * * @author Jeongho Nam - https://github.com/samchon */ -function clone(input: T): Resolved; +export function clone(input: T): Resolved; /** * @internal */ -function clone(): never { +export function clone(): never { halt("clone"); } -const clonePure = /** @__PURE__ */ Object.assign( - clone, - /** @__PURE__ */ Namespace.misc.clone("clone"), -); -export { clonePure as clone }; /** * Clone a data with type assertion. @@ -109,7 +102,7 @@ export { clonePure as clone }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertClone( +export function assertClone( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Resolved; @@ -132,7 +125,7 @@ function assertClone( * * @author Jeongho Nam - https://github.com/samchon */ -function assertClone( +export function assertClone( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Resolved; @@ -140,19 +133,9 @@ function assertClone( /** * @internal */ -function assertClone(): never { +export function assertClone(): never { halt("assertClone"); } -const assertClonePure = /** @__PURE__ */ Object.assign< - typeof assertClone, - {}, - {} ->( - assertClone, - /** @__PURE__ */ Namespace.assert("misc.assertClone"), - /** @__PURE__ */ Namespace.misc.clone("assertClone"), -); -export { assertClonePure as assertClone }; /** * Clone a data with type checking. @@ -171,7 +154,7 @@ export { assertClonePure as assertClone }; * * @author Jeongho Nam - https://github.com/samchon */ -function isClone(input: T): Resolved | null; +export function isClone(input: T): Resolved | null; /** * Clone a data with type checking. @@ -190,20 +173,14 @@ function isClone(input: T): Resolved | null; * * @author Jeongho Nam - https://github.com/samchon */ -function isClone(input: unknown): Resolved | null; +export function isClone(input: unknown): Resolved | null; /** * @internal */ -function isClone(): never { +export function isClone(): never { halt("isClone"); } -const isClonePure = /** @__PURE__ */ Object.assign( - isClone, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.misc.clone("isClone"), -); -export { isClonePure as isClone }; /** * Clone a data with detailed type validation. @@ -221,7 +198,7 @@ export { isClonePure as isClone }; * @param input A value to be cloned * @returns Validation result with cloned value */ -function validateClone(input: T): IValidation>; +export function validateClone(input: T): IValidation>; /** * Clone a data with detailed type validation. @@ -239,24 +216,14 @@ function validateClone(input: T): IValidation>; * @param input A value to be cloned * @returns Validation result with cloned value */ -function validateClone(input: unknown): IValidation>; +export function validateClone(input: unknown): IValidation>; /** * @internal */ -function validateClone(): never { +export function validateClone(): never { halt("validateClone"); } -const validateClonePure = /** @__PURE__ */ Object.assign< - typeof validateClone, - {}, - {} ->( - validateClone, - /** @__PURE__ */ Namespace.validate(), - /** @__PURE__ */ Namespace.misc.clone("validateClone"), -); -export { validateClonePure as validateClone }; /* ----------------------------------------------------------- PRUNE @@ -282,19 +249,14 @@ export { validateClonePure as validateClone }; * * @author Jeongho Nam - https://github.com/samchon */ -function prune(input: T): void; +export function prune(input: T): void; /** * @internal */ -function prune(): never { +export function prune(): never { halt("prune"); } -const prunePure = /** @__PURE__ */ Object.assign( - prune, - /** @__PURE__ */ Namespace.misc.prune("prune"), -); -export { prunePure as prune }; /** * Prune, erase superfluous properties, with type assertion. @@ -314,7 +276,7 @@ export { prunePure as prune }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertPrune( +export function assertPrune( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -337,7 +299,7 @@ function assertPrune( * * @author Jeongho Nam - https://github.com/samchon */ -function assertPrune( +export function assertPrune( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -345,19 +307,9 @@ function assertPrune( /** * @internal */ -function assertPrune(): unknown { +export function assertPrune(): unknown { halt("assertPrune"); } -const assertPrunePure = /** @__PURE__ */ Object.assign< - typeof assertPrune, - {}, - {} ->( - assertPrune, - /** @__PURE__ */ Namespace.assert("misc.assertPrune"), - /** @__PURE__ */ Namespace.misc.prune("assertPrune"), -); -export { assertPrunePure as assertPrune }; /** * Prune, erase superfluous properties, with type checking. @@ -376,7 +328,7 @@ export { assertPrunePure as assertPrune }; * * @author Jeongho Nam - https://github.com/samchon */ -function isPrune(input: T): input is T; +export function isPrune(input: T): input is T; /** * Prune, erase superfluous properties, with type checking. @@ -395,20 +347,14 @@ function isPrune(input: T): input is T; * * @author Jeongho Nam - https://github.com/samchon */ -function isPrune(input: unknown): input is T; +export function isPrune(input: unknown): input is T; /** * @internal */ -function isPrune(): never { +export function isPrune(): never { halt("isPrune"); } -const isPrunePure = /** @__PURE__ */ Object.assign( - isPrune, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.misc.prune("isPrune"), -); -export { isPrunePure as isPrune }; /** * Prune, erase superfluous properties, with type validation. @@ -428,7 +374,7 @@ export { isPrunePure as isPrune }; * * @author Jeongho Nam - https://github.com/samchon */ -function validatePrune(input: T): IValidation; +export function validatePrune(input: T): IValidation; /** * Prune, erase superfluous properties, with type validation. @@ -448,26 +394,15 @@ function validatePrune(input: T): IValidation; * * @author Jeongho Nam - https://github.com/samchon */ -function validatePrune(input: unknown): IValidation; +export function validatePrune(input: unknown): IValidation; /** * @internal */ -function validatePrune(): IValidation { +export function validatePrune(): IValidation { halt("validatePrune"); } -const validatePrunePure = /** @__PURE__ */ Object.assign< - typeof validatePrune, - {}, - {} ->( - validatePrune, - /** @__PURE__ */ Namespace.misc.prune("validatePrune"), - /** @__PURE__ */ Namespace.validate(), -); -export { validatePrunePure as validatePrune }; - /* ----------------------------------------------------------- FACTORY FUNCTIONS ----------------------------------------------------------- */ @@ -480,7 +415,7 @@ export { validatePrunePure as validatePrune }; * * @author Jeongho Nam - https://github.com/samchon */ -function createClone(): never; +export function createClone(): never; /** * Creates a resuable {@link clone} function. @@ -490,19 +425,14 @@ function createClone(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createClone(): (input: T) => Resolved; +export function createClone(): (input: T) => Resolved; /** * @internal */ -function createClone(): never { +export function createClone(): never { halt("createClone"); } -const createClonePure = /** @__PURE__ */ Object.assign( - createClone, - clonePure, -); -export { createClonePure as createClone }; /** * Creates a reusable {@link assertClone} function. @@ -514,7 +444,7 @@ export { createClonePure as createClone }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertClone( +export function createAssertClone( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -527,21 +457,16 @@ function createAssertClone( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertClone( +export function createAssertClone( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: unknown) => Resolved; /** * @internal */ -function createAssertClone(): never { +export function createAssertClone(): never { halt("createAssertClone"); } -const createAssertClonePure = /** @__PURE__ */ Object.assign< - typeof createAssertClone, - {} ->(createAssertClone, assertClonePure); -export { createAssertClonePure as createAssertClone }; /** * Creates a reusable {@link isClone} function. @@ -552,7 +477,7 @@ export { createAssertClonePure as createAssertClone }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsClone(): never; +export function createIsClone(): never; /** * Creates a resuable {@link isClone} function. @@ -562,19 +487,14 @@ function createIsClone(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsClone(): (input: unknown) => Resolved | null; +export function createIsClone(): (input: unknown) => Resolved | null; /** * @internal */ -function createIsClone(): never { +export function createIsClone(): never { halt("createIsClone"); } -const createIsClonePure = /** @__PURE__ */ Object.assign< - typeof createIsClone, - {} ->(createIsClone, isClonePure); -export { createIsClonePure as createIsClone }; /** * Creates a reusable {@link validateClone} function. @@ -585,7 +505,7 @@ export { createIsClonePure as createIsClone }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateClone(): never; +export function createValidateClone(): never; /** * Creates a resuable {@link validateClone} function. @@ -595,19 +515,16 @@ function createValidateClone(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateClone(): (input: unknown) => IValidation>; +export function createValidateClone(): ( + input: unknown, +) => IValidation>; /** * @internal */ -function createValidateClone(): never { +export function createValidateClone(): never { halt("createValidateClone"); } -const createValidateClonePure = /** @__PURE__ */ Object.assign< - typeof createValidateClone, - {} ->(createValidateClone, validateClonePure); -export { createValidateClonePure as createValidateClone }; /** * Creates a reusable {@link prune} function. @@ -618,7 +535,7 @@ export { createValidateClonePure as createValidateClone }; * * @author Jeongho Nam - https://github.com/samchon */ -function createPrune(): never; +export function createPrune(): never; /** * Creates a resuable {@link prune} function. @@ -628,19 +545,14 @@ function createPrune(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createPrune(): (input: T) => void; +export function createPrune(): (input: T) => void; /** * @internal */ -function createPrune(): (input: T) => void { +export function createPrune(): (input: T) => void { halt("createPrune"); } -const createPrunePure = /** @__PURE__ */ Object.assign( - createPrune, - prunePure, -); -export { createPrunePure as createPrune }; /** * Creates a reusable {@link assertPrune} function. @@ -652,7 +564,7 @@ export { createPrunePure as createPrune }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertPrune( +export function createAssertPrune( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -665,21 +577,16 @@ function createAssertPrune( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertPrune( +export function createAssertPrune( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: T) => T; /** * @internal */ -function createAssertPrune(): (input: T) => T { +export function createAssertPrune(): (input: T) => T { halt("createAssertPrune"); } -const createAssertPrunePure = /** @__PURE__ */ Object.assign< - typeof createAssertPrune, - {} ->(createAssertPrune, assertPrunePure); -export { createAssertPrunePure as createAssertPrune }; /** * Creates a reusable {@link isPrune} function. @@ -690,7 +597,7 @@ export { createAssertPrunePure as createAssertPrune }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsPrune(): never; +export function createIsPrune(): never; /** * Creates a resuable {@link isPrune} function. @@ -700,19 +607,14 @@ function createIsPrune(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsPrune(): (input: T) => input is T; +export function createIsPrune(): (input: T) => input is T; /** * @internal */ -function createIsPrune(): (input: T) => input is T { +export function createIsPrune(): (input: T) => input is T { halt("createIsPrune"); } -const createIsPrunePure = /** @__PURE__ */ Object.assign< - typeof createIsPrune, - {} ->(createIsPrune, isPrunePure); -export { createIsPrunePure as createIsPrune }; /** * Creates a reusable {@link validatePrune} function. @@ -723,7 +625,7 @@ export { createIsPrunePure as createIsPrune }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidatePrune(): never; +export function createValidatePrune(): never; /** * Creates a resuable {@link validatePrune} function. @@ -733,19 +635,18 @@ function createValidatePrune(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidatePrune(): (input: T) => IValidation; +export function createValidatePrune(): ( + input: T, +) => IValidation; /** * @internal */ -function createValidatePrune(): (input: T) => IValidation { +export function createValidatePrune(): ( + input: T, +) => IValidation { halt("createValidatePrune"); } -const createValidatePrunePure = /** @__PURE__ */ Object.assign< - typeof createValidatePrune, - {} ->(createValidatePrune, validatePrunePure); -export { createValidatePrunePure as createValidatePrune }; /** * @internal diff --git a/src/module.ts b/src/module.ts index 478196f1e6..62bd29f6ae 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1,5 +1,3 @@ -import * as Namespace from "./functional/Namespace"; - import { AssertionGuard } from "./AssertionGuard"; import { IRandomGenerator } from "./IRandomGenerator"; import { IValidation } from "./IValidation"; @@ -18,6 +16,7 @@ export * as tags from "./tags"; export * from "./schemas/metadata/IJsDocTagInfo"; export * from "./schemas/json/IJsonApplication"; +export * from "./schemas/json/IJsonSchemaCollection"; export * from "./AssertionGuard"; export * from "./IRandomGenerator"; export * from "./IValidation"; @@ -28,6 +27,7 @@ export * from "./Resolved"; export * from "./CamelCase"; export * from "./PascalCase"; export * from "./SnakeCase"; +export * from "./IReadableURLSearchParams"; /* ----------------------------------------------------------- BASIC VALIDATORS @@ -56,7 +56,7 @@ export * from "./SnakeCase"; * * @author Jeongho Nam - https://github.com/samchon */ -function assert( +export function assert( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -83,7 +83,7 @@ function assert( * * @author Jeongho Nam - https://github.com/samchon */ -function assert( +export function assert( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -91,14 +91,9 @@ function assert( /** * @internal */ -function assert(): never { +export function assert(): never { halt("assert"); } -const assertPure = /** @__PURE__ */ Object.assign( - assert, - /** @__PURE__ */ Namespace.assert("assert"), -); -export { assertPure as assert }; /** * Assertion guard of a value type. @@ -125,7 +120,7 @@ export { assertPure as assert }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertGuard( +export function assertGuard( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): asserts input is T; @@ -155,7 +150,7 @@ function assertGuard( * * @author Jeongho Nam - https://github.com/samchon */ -function assertGuard( +export function assertGuard( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): asserts input is T; @@ -163,14 +158,9 @@ function assertGuard( /** * @internal */ -function assertGuard(): never { +export function assertGuard(): never { halt("assertGuard"); } -const assertGuardPure = /** @__PURE__ */ Object.assign( - assertGuard, - /** @__PURE__ */ Namespace.assert("assertGuard"), -); -export { assertGuardPure as assertGuard }; /** * Tests a value type. @@ -195,7 +185,7 @@ export { assertGuardPure as assertGuard }; * * @author Jeongho Nam - https://github.com/samchon */ -function is(input: T): input is T; +export function is(input: T): input is T; /** * Tests a value type. @@ -219,19 +209,14 @@ function is(input: T): input is T; * * @author Jeongho Nam - https://github.com/samchon */ -function is(input: unknown): input is T; +export function is(input: unknown): input is T; /** * @internal */ -function is(): never { +export function is(): never { halt("is"); } -const isPure = /** @__PURE__ */ Object.assign( - is, - /** @__PURE__ */ Namespace.assert("is"), -); -export { isPure as is }; /** * Validates a value type. @@ -256,7 +241,7 @@ export { isPure as is }; * * @author Jeongho Nam - https://github.com/samchon */ -function validate(input: T): IValidation; +export function validate(input: T): IValidation; /** * Validates a value type. @@ -281,19 +266,14 @@ function validate(input: T): IValidation; * * @author Jeongho Nam - https://github.com/samchon */ -function validate(input: unknown): IValidation; +export function validate(input: unknown): IValidation; /** * @internal */ -function validate(): never { +export function validate(): never { halt("validate"); } -const validatePure = /** @__PURE__ */ Object.assign( - validate, - /** @__PURE__ */ Namespace.validate(), -); -export { validatePure as validate }; /* ----------------------------------------------------------- STRICT VALIDATORS @@ -322,7 +302,7 @@ export { validatePure as validate }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertEquals( +export function assertEquals( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -351,7 +331,7 @@ function assertEquals( * * @author Jeongho Nam - https://github.com/samchon */ -function assertEquals( +export function assertEquals( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): T; @@ -359,14 +339,9 @@ function assertEquals( /** * @internal */ -function assertEquals(): never { +export function assertEquals(): never { halt("assertEquals"); } -const assertEqualsPure = /** @__PURE__ */ Object.assign< - typeof assertEquals, - {} ->(assertEquals, /** @__PURE__ */ Namespace.assert("assertEquals")); -export { assertEqualsPure as assertEquals }; /** * Assertion guard of a type with equality. @@ -396,7 +371,7 @@ export { assertEqualsPure as assertEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertGuardEquals( +export function assertGuardEquals( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): asserts input is T; @@ -429,7 +404,7 @@ function assertGuardEquals( * * @author Jeongho Nam - https://github.com/samchon */ -function assertGuardEquals( +export function assertGuardEquals( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): asserts input is T; @@ -437,14 +412,9 @@ function assertGuardEquals( /** * @internal */ -function assertGuardEquals(): never { +export function assertGuardEquals(): never { halt("assertGuardEquals"); } -const assertGuardEqualsPure = /** @__PURE__ */ Object.assign< - typeof assertGuardEquals, - {} ->(assertGuardEquals, /** @__PURE__ */ Namespace.assert("assertGuardEquals")); -export { assertGuardEqualsPure as assertGuardEquals }; /** * Tests equality between a value and its type. @@ -469,7 +439,7 @@ export { assertGuardEqualsPure as assertGuardEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function equals(input: T): input is T; +export function equals(input: T): input is T; /** * Tests equality between a value and its type. @@ -494,19 +464,14 @@ function equals(input: T): input is T; * * @author Jeongho Nam - https://github.com/samchon */ -function equals(input: unknown): input is T; +export function equals(input: unknown): input is T; /** * @internal */ -function equals(): never { +export function equals(): never { halt("equals"); } -const equalsPure = /** @__PURE__ */ Object.assign( - equals, - /** @__PURE__ */ Namespace.is(), -); -export { equalsPure as equals }; /** * Validates equality between a value and its type. @@ -532,7 +497,7 @@ export { equalsPure as equals }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEquals(input: T): IValidation; +export function validateEquals(input: T): IValidation; /** * Validates equality between a value and its type. @@ -558,19 +523,14 @@ function validateEquals(input: T): IValidation; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEquals(input: unknown): IValidation; +export function validateEquals(input: unknown): IValidation; /** * @internal */ -function validateEquals(): never { +export function validateEquals(): never { halt("validateEquals"); } -const validateEqualsPure = /** @__PURE__ */ Object.assign< - typeof validateEquals, - {} ->(validateEquals, /** @__PURE__ */ Namespace.validate()); -export { validateEqualsPure as validateEquals }; /* ----------------------------------------------------------- RANDOM @@ -593,7 +553,7 @@ export { validateEqualsPure as validateEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function random(generator?: Partial): never; +export function random(generator?: Partial): never; /** * Generate random data. @@ -611,19 +571,14 @@ function random(generator?: Partial): never; * * @author Jeongho Nam - https://github.com/samchon */ -function random(generator?: Partial): Resolved; +export function random(generator?: Partial): Resolved; /** * @internal */ -function random(): never { +export function random(): never { halt("random"); } -const randomPure = /** @__PURE__ */ Object.assign( - random, - /** @__PURE__ */ Namespace.random(), -); -export { randomPure as random }; /* ----------------------------------------------------------- FACTORY FUNCTIONS @@ -638,7 +593,7 @@ export { randomPure as random }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssert( +export function createAssert( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -651,21 +606,16 @@ function createAssert( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssert( +export function createAssert( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: unknown) => T; /** * @internal */ -function createAssert(): (input: unknown) => T { +export function createAssert(): (input: unknown) => T { halt("createAssert"); } -const createAssertPure = /** @__PURE__ */ Object.assign< - typeof createAssert, - {} ->(createAssert, assertPure); -export { createAssertPure as createAssert }; /** * Creates a reusable {@link assertGuard} function. @@ -692,7 +642,7 @@ export { createAssertPure as createAssert }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertGuard( +export function createAssertGuard( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -720,21 +670,16 @@ function createAssertGuard( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertGuard( +export function createAssertGuard( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: unknown) => AssertionGuard; /** * @internal */ -function createAssertGuard(): (input: unknown) => AssertionGuard { +export function createAssertGuard(): (input: unknown) => AssertionGuard { halt("createAssertGuard"); } -const createAssertGuardPure = /** @__PURE__ */ Object.assign< - typeof createAssertGuard, - {} ->(createAssertGuard, assertGuardPure); -export { createAssertGuardPure as createAssertGuard }; /** * Creates a reusable {@link is} function. @@ -745,7 +690,7 @@ export { createAssertGuardPure as createAssertGuard }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIs(): never; +export function createIs(): never; /** * Creates a reusable {@link is} function. @@ -755,19 +700,14 @@ function createIs(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIs(): (input: unknown) => input is T; +export function createIs(): (input: unknown) => input is T; /** * @internal */ -function createIs(): (input: unknown) => input is T { +export function createIs(): (input: unknown) => input is T { halt("createIs"); } -const createIsPure = /** @__PURE__ */ Object.assign( - createIs, - isPure, -); -export { createIsPure as createIs }; /** * Creates a reusable {@link validate} function. @@ -778,7 +718,7 @@ export { createIsPure as createIs }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidate(): never; +export function createValidate(): never; /** * Creates a reusable {@link validate} function. @@ -788,19 +728,14 @@ function createValidate(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidate(): (input: unknown) => IValidation; +export function createValidate(): (input: unknown) => IValidation; /** * @internal */ -function createValidate(): (input: unknown) => IValidation { +export function createValidate(): (input: unknown) => IValidation { halt("createValidate"); } -const createValidatePure = /** @__PURE__ */ Object.assign< - typeof createValidate, - {} ->(createValidate, validatePure); -export { createValidatePure as createValidate }; /** * Creates a reusable {@link assertEquals} function. @@ -812,7 +747,7 @@ export { createValidatePure as createValidate }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertEquals( +export function createAssertEquals( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -825,21 +760,16 @@ function createAssertEquals( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertEquals( +export function createAssertEquals( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: unknown) => T; /** * @internal */ -function createAssertEquals(): (input: unknown) => T { +export function createAssertEquals(): (input: unknown) => T { halt("createAssertEquals"); } -const createAssertEqualsPure = /** @__PURE__ */ Object.assign< - typeof createAssertEquals, - {} ->(createAssertEquals, assertEqualsPure); -export { createAssertEqualsPure as createAssertEquals }; /** * Creates a reusable {@link assertGuardEquals} function. @@ -866,7 +796,7 @@ export { createAssertEqualsPure as createAssertEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertGuardEquals( +export function createAssertGuardEquals( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -894,21 +824,18 @@ function createAssertGuardEquals( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertGuardEquals( +export function createAssertGuardEquals( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: unknown) => AssertionGuard; /** * @internal */ -function createAssertGuardEquals(): (input: unknown) => AssertionGuard { +export function createAssertGuardEquals(): ( + input: unknown, +) => AssertionGuard { halt("createAssertGuardEquals"); } -const createAssertGuardEqualsPure = /** @__PURE__ */ Object.assign< - typeof createAssertGuardEquals, - {} ->(createAssertGuardEquals, assertGuardEqualsPure); -export { createAssertGuardEqualsPure as createAssertGuardEquals }; /** * Creates a reusable {@link equals} function. @@ -919,7 +846,7 @@ export { createAssertGuardEqualsPure as createAssertGuardEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function createEquals(): never; +export function createEquals(): never; /** * Creates a reusable {@link equals} function. @@ -929,19 +856,14 @@ function createEquals(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createEquals(): (input: unknown) => input is T; +export function createEquals(): (input: unknown) => input is T; /** * @internal */ -function createEquals(): (input: unknown) => input is T { +export function createEquals(): (input: unknown) => input is T { halt("createEquals"); } -const createEqualsPure = /** @__PURE__ */ Object.assign< - typeof createEquals, - {} ->(createEquals, equalsPure); -export { createEqualsPure as createEquals }; /** * Creates a reusable {@link validateEquals} function. @@ -952,7 +874,7 @@ export { createEqualsPure as createEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateEquals(): never; +export function createValidateEquals(): never; /** * Creates a reusable {@link validateEquals} function. @@ -962,19 +884,14 @@ function createValidateEquals(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateEquals(): (input: unknown) => IValidation; +export function createValidateEquals(): (input: unknown) => IValidation; /** * @internal */ -function createValidateEquals(): (input: unknown) => IValidation { +export function createValidateEquals(): (input: unknown) => IValidation { halt("createValidateEquals"); } -const createValidateEqualsPure = /** @__PURE__ */ Object.assign< - typeof createValidateEquals, - {} ->(createValidateEquals, validateEqualsPure); -export { createValidateEqualsPure as createValidateEquals }; /** * Creates a reusable {@link random} function. @@ -986,7 +903,7 @@ export { createValidateEqualsPure as createValidateEquals }; * * @author Jeongho Nam - https://github.com/samchon */ -function createRandom(generator?: Partial): never; +export function createRandom(generator?: Partial): never; /** * Creates a resuable {@link random} function. @@ -997,21 +914,16 @@ function createRandom(generator?: Partial): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createRandom( +export function createRandom( generator?: Partial, ): () => Resolved; /** * @internal */ -function createRandom(): never { +export function createRandom(): never { halt("createRandom"); } -const createRandomPure = /** @__PURE__ */ Object.assign< - typeof createRandom, - {} ->(createRandom, randomPure); -export { createRandomPure as createRandom }; /** * @internal diff --git a/src/notations.ts b/src/notations.ts index 3ae5e892d4..1afeb8e573 100644 --- a/src/notations.ts +++ b/src/notations.ts @@ -1,5 +1,3 @@ -import * as Namespace from "./functional/Namespace"; - import { CamelCase } from "./CamelCase"; import { IValidation } from "./IValidation"; import { PascalCase } from "./PascalCase"; @@ -34,19 +32,14 @@ import { TypeGuardError } from "./TypeGuardError"; * * @author Jeongho Nam - https://github.com/samchon */ -function camel(input: T): CamelCase; +export function camel(input: T): CamelCase; /** * @internal */ -function camel(): never { +export function camel(): never { return halt("camel"); } -const camelPure = /** @__PURE__ */ Object.assign( - camel, - /** @__PURE__ */ Namespace.notations.camel("camel"), -); -export { camelPure as camel }; /** * Converts to camel case with type assertion. @@ -61,7 +54,7 @@ export { camelPure as camel }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertCamel( +export function assertCamel( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): CamelCase; @@ -79,7 +72,7 @@ function assertCamel( * * @author Jeongho Nam - https://github.com/samchon */ -function assertCamel( +export function assertCamel( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): CamelCase; @@ -87,19 +80,9 @@ function assertCamel( /** * @internal */ -function assertCamel(): never { +export function assertCamel(): never { return halt("assertCamel"); } -const assertCamelPure = /** @__PURE__ */ Object.assign< - typeof assertCamel, - {}, - {} ->( - assertCamel, - /** @__PURE__ */ Namespace.notations.camel("assertCamel"), - /** @__PURE__ */ Namespace.assert("notations.assertCamel"), -); -export { assertCamelPure as assertCamel }; /** * Converts to camel case with type checking. @@ -113,7 +96,7 @@ export { assertCamelPure as assertCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function isCamel(input: T): CamelCase | null; +export function isCamel(input: T): CamelCase | null; /** * Converts to camel case with type checking. @@ -127,20 +110,14 @@ function isCamel(input: T): CamelCase | null; * * @author Jeongho Nam - https://github.com/samchon */ -function isCamel(input: unknown): CamelCase | null; +export function isCamel(input: unknown): CamelCase | null; /** * @internal */ -function isCamel(): never { +export function isCamel(): never { return halt("isCamel"); } -const isCamelPure = /** @__PURE__ */ Object.assign( - isCamel, - /** @__PURE__ */ Namespace.notations.camel("isCamel"), - /** @__PURE__ */ Namespace.is(), -); -export { isCamelPure as isCamel }; /** * Converts to camel case with type validation. @@ -156,7 +133,7 @@ export { isCamelPure as isCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateCamel(input: T): IValidation>; +export function validateCamel(input: T): IValidation>; /** * Converts to camel case with type validation. @@ -172,24 +149,14 @@ function validateCamel(input: T): IValidation>; * * @author Jeongho Nam - https://github.com/samchon */ -function validateCamel(input: unknown): IValidation>; +export function validateCamel(input: unknown): IValidation>; /** * @internal */ -function validateCamel(): never { +export function validateCamel(): never { return halt("validateCamel"); } -const validateCamelPure = /** @__PURE__ */ Object.assign< - typeof validateCamel, - {}, - {} ->( - validateCamel, - /** @__PURE__ */ Namespace.notations.camel("validateCamel"), - /** @__PURE__ */ Namespace.validate(), -); -export { validateCamelPure as validateCamel }; /* ----------------------------------------------------------- PASCAL CASE @@ -213,19 +180,14 @@ export { validateCamelPure as validateCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function pascal(input: T): PascalCase; +export function pascal(input: T): PascalCase; /** * @internal */ -function pascal(): never { +export function pascal(): never { return halt("pascal"); } -const pascalPure = /** @__PURE__ */ Object.assign( - pascal, - /** @__PURE__ */ Namespace.notations.pascal("pascal"), -); -export { pascalPure as pascal }; /** * Converts to pascal case with type assertion. @@ -240,7 +202,7 @@ export { pascalPure as pascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertPascal( +export function assertPascal( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): PascalCase; @@ -258,7 +220,7 @@ function assertPascal( * * @author Jeongho Nam - https://github.com/samchon */ -function assertPascal( +export function assertPascal( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): PascalCase; @@ -266,19 +228,9 @@ function assertPascal( /** * @internal */ -function assertPascal(): never { +export function assertPascal(): never { return halt("assertPascal"); } -const assertPascalPure = /** @__PURE__ */ Object.assign< - typeof assertPascal, - {}, - {} ->( - assertPascal, - /** @__PURE__ */ Namespace.notations.pascal("assertPascal"), - /** @__PURE__ */ Namespace.assert("notations.assertPascal"), -); -export { assertPascalPure as assertPascal }; /** * Converts to pascal case with type checking. @@ -292,7 +244,7 @@ export { assertPascalPure as assertPascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function isPascal(input: T): PascalCase | null; +export function isPascal(input: T): PascalCase | null; /** * Converts to pascal case with type checking. @@ -306,20 +258,14 @@ function isPascal(input: T): PascalCase | null; * * @author Jeongho Nam - https://github.com/samchon */ -function isPascal(input: unknown): PascalCase | null; +export function isPascal(input: unknown): PascalCase | null; /** * @internal */ -function isPascal(): never { +export function isPascal(): never { return halt("isPascal"); } -const isPascalPure = /** @__PURE__ */ Object.assign( - isPascal, - /** @__PURE__ */ Namespace.notations.pascal("isPascal"), - /** @__PURE__ */ Namespace.is(), -); -export { isPascalPure as isPascal }; /** * Converts to pascal case with type validation. @@ -335,7 +281,7 @@ export { isPascalPure as isPascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function validatePascal(input: T): IValidation>; +export function validatePascal(input: T): IValidation>; /** * Converts to pascal case with type validation. @@ -351,24 +297,14 @@ function validatePascal(input: T): IValidation>; * * @author Jeongho Nam - https://github.com/samchon */ -function validatePascal(input: unknown): IValidation>; +export function validatePascal(input: unknown): IValidation>; /** * @internal */ -function validatePascal(): never { +export function validatePascal(): never { return halt("validatePascal"); } -const validatePascalPure = /** @__PURE__ */ Object.assign< - typeof validatePascal, - {}, - {} ->( - validatePascal, - /** @__PURE__ */ Namespace.notations.pascal("validatePascal"), - /** @__PURE__ */ Namespace.validate(), -); -export { validatePascalPure as validatePascal }; /* ----------------------------------------------------------- SNAKE CASE @@ -392,19 +328,14 @@ export { validatePascalPure as validatePascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function snake(input: T): SnakeCase; +export function snake(input: T): SnakeCase; /** * @internal */ -function snake(): never { +export function snake(): never { return halt("snake"); } -const snakePure = /** @__PURE__ */ Object.assign( - snake, - /** @__PURE__ */ Namespace.notations.snake("snake"), -); -export { snakePure as snake }; /** * Converts to snake case with type assertion. @@ -419,7 +350,7 @@ export { snakePure as snake }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertSnake( +export function assertSnake( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): SnakeCase; @@ -437,7 +368,7 @@ function assertSnake( * * @author Jeongho Nam - https://github.com/samchon */ -function assertSnake( +export function assertSnake( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): SnakeCase; @@ -445,19 +376,9 @@ function assertSnake( /** * @internal */ -function assertSnake(): never { +export function assertSnake(): never { return halt("assertSnake"); } -const assertSnakePure = /** @__PURE__ */ Object.assign< - typeof assertSnake, - {}, - {} ->( - assertSnake, - /** @__PURE__ */ Namespace.notations.snake("assertSnake"), - /** @__PURE__ */ Namespace.assert("notations.assertSnake"), -); -export { assertSnakePure as assertSnake }; /** * Converts to snake case with type checking. @@ -471,7 +392,7 @@ export { assertSnakePure as assertSnake }; * * @author Jeongho Nam - https://github.com/samchon */ -function isSnake(input: T): SnakeCase | null; +export function isSnake(input: T): SnakeCase | null; /** * Converts to snake case with type checking. @@ -485,20 +406,14 @@ function isSnake(input: T): SnakeCase | null; * * @author Jeongho Nam - https://github.com/samchon */ -function isSnake(input: unknown): SnakeCase | null; +export function isSnake(input: unknown): SnakeCase | null; /** * @internal */ -function isSnake(): never { +export function isSnake(): never { return halt("isSnake"); } -const isSnakePure = /** @__PURE__ */ Object.assign( - isSnake, - /** @__PURE__ */ Namespace.notations.snake("isSnake"), - /** @__PURE__ */ Namespace.is(), -); -export { isSnakePure as isSnake }; /** * Converts to snake case with type validation. @@ -514,7 +429,7 @@ export { isSnakePure as isSnake }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateSnake(input: T): IValidation>; +export function validateSnake(input: T): IValidation>; /** * Converts to snake case with type validation. @@ -530,24 +445,15 @@ function validateSnake(input: T): IValidation>; * * @author Jeongho Nam - https://github.com/samchon */ -function validateSnake(input: unknown): IValidation>; +export function validateSnake(input: unknown): IValidation>; /** * @internal */ -function validateSnake(): never { +export function validateSnake(): never { return halt("validateSnake"); } -const validateSnakePure = /** @__PURE__ */ Object.assign< - typeof validateSnake, - {}, - {} ->( - validateSnake, - /** @__PURE__ */ Namespace.notations.snake("validateSnake"), - /** @__PURE__ */ Namespace.validate(), -); -export { validateSnakePure as validateSnake }; + /* ----------------------------------------------------------- FACTORY FUNCTIONS ----------------------------------------------------------- */ @@ -560,7 +466,7 @@ export { validateSnakePure as validateSnake }; * * @author Jeongho Nam - https://github.com/samchon */ -function createCamel(): never; +export function createCamel(): never; /** * Creates a reusable {@link camel} function. @@ -570,19 +476,14 @@ function createCamel(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createCamel(): (input: T) => CamelCase; +export function createCamel(): (input: T) => CamelCase; /** * @internal */ -function createCamel(): never { +export function createCamel(): never { halt("createCamel"); } -const createCamelPure = /** @__PURE__ */ Object.assign( - createCamel, - /** @__PURE__ */ Namespace.notations.camel("createCamel"), -); -export { createCamelPure as createCamel }; /** * Creates a reusable {@link assertCamel} function. @@ -594,7 +495,7 @@ export { createCamelPure as createCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertCamel( +export function createAssertCamel( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -607,26 +508,16 @@ function createAssertCamel( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertCamel( +export function createAssertCamel( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: T) => CamelCase; /** * @internal */ -function createAssertCamel(): never { +export function createAssertCamel(): never { halt("createAssertCamel"); } -const createAssertCamelPure = /** @__PURE__ */ Object.assign< - typeof createAssertCamel, - {}, - {} ->( - createAssertCamel, - /** @__PURE__ */ Namespace.notations.camel("createAssertCamel"), - /** @__PURE__ */ Namespace.assert("notations.createAssertCamel"), -); -export { createAssertCamelPure as createAssertCamel }; /** * Creates a reusable {@link isCamel} function. @@ -637,7 +528,7 @@ export { createAssertCamelPure as createAssertCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsCamel(): never; +export function createIsCamel(): never; /** * Creates a reusable {@link isCamel} function. @@ -647,24 +538,14 @@ function createIsCamel(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsCamel(): (input: T) => CamelCase | null; +export function createIsCamel(): (input: T) => CamelCase | null; /** * @internal */ -function createIsCamel(): never { +export function createIsCamel(): never { halt("createIsCamel"); } -const createIsCamelPure = /** @__PURE__ */ Object.assign< - typeof createIsCamel, - {}, - {} ->( - createIsCamel, - /** @__PURE__ */ Namespace.notations.camel("createIsCamel"), - /** @__PURE__ */ Namespace.is(), -); -export { createIsCamelPure as createIsCamel }; /** * Creates a reusable {@link validateCamel} function. @@ -675,7 +556,7 @@ export { createIsCamelPure as createIsCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateCamel(): never; +export function createValidateCamel(): never; /** * Creates a reusable {@link validateCamel} function. @@ -685,24 +566,16 @@ function createValidateCamel(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateCamel(): (input: T) => IValidation>; +export function createValidateCamel(): ( + input: T, +) => IValidation>; /** * @internal */ -function createValidateCamel(): never { +export function createValidateCamel(): never { halt("createValidateCamel"); } -const createValidateCamelPure = /** @__PURE__ */ Object.assign< - typeof createValidateCamel, - {}, - {} ->( - createValidateCamel, - /** @__PURE__ */ Namespace.notations.camel("createValidateCamel"), - /** @__PURE__ */ Namespace.validate(), -); -export { createValidateCamelPure as createValidateCamel }; /** * Creates a reusable {@link pascal} function. @@ -713,7 +586,7 @@ export { createValidateCamelPure as createValidateCamel }; * * @author Jeongho Nam - https://github.com/samchon */ -function createPascal(): never; +export function createPascal(): never; /** * Creates a reusable {@link pascal} function. @@ -723,19 +596,14 @@ function createPascal(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createPascal(): (input: T) => PascalCase; +export function createPascal(): (input: T) => PascalCase; /** * @internal */ -function createPascal(): never { +export function createPascal(): never { halt("createPascal"); } -const createPascalPure = /** @__PURE__ */ Object.assign< - typeof createPascal, - {} ->(createPascal, /** @__PURE__ */ Namespace.notations.pascal("createPascal")); -export { createPascalPure as createPascal }; /** * Creates a reusable {@link assertPascal} function. @@ -747,7 +615,7 @@ export { createPascalPure as createPascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertPascal( +export function createAssertPascal( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -760,26 +628,16 @@ function createAssertPascal( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertPascal( +export function createAssertPascal( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: T) => PascalCase; /** * @internal */ -function createAssertPascal(): never { +export function createAssertPascal(): never { halt("createAssertPascal"); } -const createAssertPascalPure = /** @__PURE__ */ Object.assign< - typeof createAssertPascal, - {}, - {} ->( - createAssertPascal, - /** @__PURE__ */ Namespace.notations.pascal("createAssertPascal"), - /** @__PURE__ */ Namespace.assert("notations.createAssertPascal"), -); -export { createAssertPascalPure as createAssertPascal }; /** * Creates a reusable {@link isPascal} function. @@ -790,7 +648,7 @@ export { createAssertPascalPure as createAssertPascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsPascal(): never; +export function createIsPascal(): never; /** * Creates a reusable {@link isPascal} function. @@ -800,24 +658,14 @@ function createIsPascal(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsPascal(): (input: T) => PascalCase | null; +export function createIsPascal(): (input: T) => PascalCase | null; /** * @internal */ -function createIsPascal(): never { +export function createIsPascal(): never { halt("createIsPascal"); } -const createIsPascalPure = /** @__PURE__ */ Object.assign< - typeof createIsPascal, - {}, - {} ->( - createIsPascal, - /** @__PURE__ */ Namespace.notations.pascal("createIsPascal"), - /** @__PURE__ */ Namespace.is(), -); -export { createIsPascalPure as createIsPascal }; /** * Creates a reusable {@link validatePascal} function. @@ -828,7 +676,7 @@ export { createIsPascalPure as createIsPascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidatePascal(): never; +export function createValidatePascal(): never; /** * Creates a reusable {@link validatePascal} function. @@ -838,24 +686,16 @@ function createValidatePascal(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidatePascal(): (input: T) => IValidation>; +export function createValidatePascal(): ( + input: T, +) => IValidation>; /** * @internal */ -function createValidatePascal(): never { +export function createValidatePascal(): never { halt("createValidatePascal"); } -const createValidatePascalPure = /** @__PURE__ */ Object.assign< - typeof createValidatePascal, - {}, - {} ->( - createValidatePascal, - /** @__PURE__ */ Namespace.notations.pascal("createValidatePascal"), - /** @__PURE__ */ Namespace.validate(), -); -export { createValidatePascalPure as createValidatePascal }; /** * Creates a reusable {@link snake} function. @@ -866,7 +706,7 @@ export { createValidatePascalPure as createValidatePascal }; * * @author Jeongho Nam - https://github.com/samchon */ -function createSnake(): never; +export function createSnake(): never; /** * Creates a reusable {@link snake} function. @@ -876,19 +716,14 @@ function createSnake(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createSnake(): (input: T) => SnakeCase; +export function createSnake(): (input: T) => SnakeCase; /** * @internal */ -function createSnake(): never { +export function createSnake(): never { halt("createSnake"); } -const createSnakePure = /** @__PURE__ */ Object.assign( - createSnake, - /** @__PURE__ */ Namespace.notations.snake("createSnake"), -); -export { createSnakePure as createSnake }; /** * Creates a reusable {@link assertSnake} function. @@ -900,7 +735,7 @@ export { createSnakePure as createSnake }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertSnake( +export function createAssertSnake( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -913,26 +748,16 @@ function createAssertSnake( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertSnake( +export function createAssertSnake( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: T) => SnakeCase; /** * @internal */ -function createAssertSnake(): never { +export function createAssertSnake(): never { halt("createAssertSnake"); } -const createAssertSnakePure = /** @__PURE__ */ Object.assign< - typeof createAssertSnake, - {}, - {} ->( - createAssertSnake, - /** @__PURE__ */ Namespace.notations.snake("createAssertSnake"), - /** @__PURE__ */ Namespace.assert("notations.createAssertSnake"), -); -export { createAssertSnakePure as createAssertSnake }; /** * Creates a reusable {@link isSnake} function. @@ -943,7 +768,7 @@ export { createAssertSnakePure as createAssertSnake }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsSnake(): never; +export function createIsSnake(): never; /** * Creates a reusable {@link isSnake} function. @@ -953,24 +778,14 @@ function createIsSnake(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsSnake(): (input: T) => SnakeCase | null; +export function createIsSnake(): (input: T) => SnakeCase | null; /** * @internal */ -function createIsSnake(): never { +export function createIsSnake(): never { halt("createIsSnake"); } -const createIsSnakePure = /** @__PURE__ */ Object.assign< - typeof createIsSnake, - {}, - {} ->( - createIsSnake, - /** @__PURE__ */ Namespace.notations.snake("createIsSnake"), - /** @__PURE__ */ Namespace.is(), -); -export { createIsSnakePure as createIsSnake }; /** * Creates a reusable {@link validateSnake} function. @@ -981,7 +796,7 @@ export { createIsSnakePure as createIsSnake }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateSnake(): never; +export function createValidateSnake(): never; /** * Creates a reusable {@link validateSnake} function. @@ -991,24 +806,16 @@ function createValidateSnake(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateSnake(): (input: T) => IValidation>; +export function createValidateSnake(): ( + input: T, +) => IValidation>; /** * @internal */ -function createValidateSnake(): never { +export function createValidateSnake(): never { halt("createValidateSnake"); } -const createValidateSnakePure = /** @__PURE__ */ Object.assign< - typeof createValidateSnake, - {}, - {} ->( - createValidateSnake, - /** @__PURE__ */ Namespace.notations.snake("createValidateSnake"), - /** @__PURE__ */ Namespace.validate(), -); -export { createValidateSnakePure as createValidateSnake }; /** * @internal diff --git a/src/programmers/AssertProgrammer.ts b/src/programmers/AssertProgrammer.ts index 0c32e87a87..51bdb6adda 100644 --- a/src/programmers/AssertProgrammer.ts +++ b/src/programmers/AssertProgrammer.ts @@ -4,61 +4,77 @@ import { IdentifierFactory } from "../factories/IdentifierFactory"; import { StatementFactory } from "../factories/StatementFactory"; import { TypeFactory } from "../factories/TypeFactory"; -import { IProject } from "../transformers/IProject"; +import { IProgrammerProps } from "../transformers/IProgrammerProps"; +import { ITypiaContext } from "../transformers/ITypiaContext"; import { CheckerProgrammer } from "./CheckerProgrammer"; import { FeatureProgrammer } from "./FeatureProgrammer"; import { IsProgrammer } from "./IsProgrammer"; -import { FunctionImporter } from "./helpers/FunctionImporter"; +import { FunctionProgrammer } from "./helpers/FunctionProgrammer"; +import { IExpressionEntry } from "./helpers/IExpressionEntry"; import { OptionPredicator } from "./helpers/OptionPredicator"; import { check_object } from "./internal/check_object"; export namespace AssertProgrammer { - export const decompose = (props: { - project: IProject; + export interface IConfig { equals: boolean; guard: boolean; - importer: FunctionImporter; + } + export interface IProps extends IProgrammerProps { + config: IConfig; + } + + export const decompose = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { - const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose(props); + const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ + ...props, + config: { + equals: props.config.equals, + }, + }); const composed: FeatureProgrammer.IComposed = CheckerProgrammer.compose({ ...props, config: { - prefix: "$a", + prefix: "_a", path: true, trace: true, - numeric: OptionPredicator.numeric(props.project.options), - equals: props.equals, - atomist: (explore) => (entry) => (input) => + numeric: OptionPredicator.numeric(props.context.options), + equals: props.config.equals, + atomist: (next) => [ - ...(entry.expression ? [entry.expression] : []), - ...(entry.conditions.length === 0 + ...(next.entry.expression ? [next.entry.expression] : []), + ...(next.entry.conditions.length === 0 ? [] - : entry.conditions.length === 1 - ? entry.conditions[0]!.map((cond) => + : next.entry.conditions.length === 1 + ? next.entry.conditions[0]!.map((cond) => ts.factory.createLogicalOr( cond.expression, - create_guard_call(props.importer)( - explore.from === "top" - ? ts.factory.createTrue() - : ts.factory.createIdentifier("_exceptionable"), - )( - ts.factory.createIdentifier( - explore.postfix - ? `_path + ${explore.postfix}` + create_guard_call({ + context: props.context, + functor: props.functor, + exceptionable: + next.explore.from === "top" + ? ts.factory.createTrue() + : ts.factory.createIdentifier("_exceptionable"), + path: ts.factory.createIdentifier( + next.explore.postfix + ? `_path + ${next.explore.postfix}` : "_path", ), - cond.expected, - input, - ), + expected: cond.expected, + input: next.input, + }), ), ) : [ ts.factory.createLogicalOr( - entry.conditions + next.entry.conditions .map((set) => set .map((s) => s.expression) @@ -67,24 +83,26 @@ export namespace AssertProgrammer { ), ) .reduce((a, b) => ts.factory.createLogicalOr(a, b)), - create_guard_call(props.importer)( - explore.from === "top" - ? ts.factory.createTrue() - : ts.factory.createIdentifier("_exceptionable"), - )( - ts.factory.createIdentifier( - explore.postfix - ? `_path + ${explore.postfix}` + create_guard_call({ + context: props.context, + functor: props.functor, + exceptionable: + next.explore.from === "top" + ? ts.factory.createTrue() + : ts.factory.createIdentifier("_exceptionable"), + path: ts.factory.createIdentifier( + next.explore.postfix + ? `_path + ${next.explore.postfix}` : "_path", ), - entry.expected, - input, - ), + expected: next.entry.expected, + input: next.input, + }), ), ]), ].reduce((x, y) => ts.factory.createLogicalAnd(x, y)), - combiner: combiner(props.equals)(props.project)(props.importer), - joiner: joiner(props.equals)(props.project)(props.importer), + combiner: combiner(props), + joiner: joiner(props), success: ts.factory.createTrue(), }, }); @@ -93,20 +111,29 @@ export namespace AssertProgrammer { undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - Guardian.parameter(props.init), + Guardian.parameter({ + context: props.context, + init: props.init, + }), ], - props.guard + props.config.guard ? ts.factory.createTypePredicateNode( ts.factory.createToken(ts.SyntaxKind.AssertsKeyword), ts.factory.createIdentifier("input"), ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ) : ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), undefined, ts.factory.createBlock( @@ -152,7 +179,7 @@ export namespace AssertProgrammer { ), undefined, ), - ...(props.guard === false + ...(props.config.guard === false ? [ ts.factory.createReturnStatement( ts.factory.createIdentifier(`input`), @@ -163,7 +190,6 @@ export namespace AssertProgrammer { true, ), ); - return { functions: { ...is.functions, @@ -172,120 +198,128 @@ export namespace AssertProgrammer { statements: [ ...is.statements, ...composed.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.mut("_errorFactory"), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.mut({ + name: "_errorFactory", + }), ], arrow, }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (props: boolean | { equals: boolean; guard: boolean }) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - if (typeof props === "boolean") props = { equals: props, guard: false }; - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - ...props, - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; const combiner = - (equals: boolean) => - (project: IProject) => - (importer: FunctionImporter): CheckerProgrammer.IConfig.Combiner => - (explore: CheckerProgrammer.IExplore) => { - if (explore.tracable === false) + (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + }): CheckerProgrammer.IConfig.Combiner => + (next) => { + if (next.explore.tracable === false) return IsProgrammer.configure({ - object: assert_object(equals)(project)(importer), - numeric: true, - })(project)(importer).combiner(explore); + options: { + object: (v) => + assert_object({ + config: props.config, + context: props.context, + functor: props.functor, + entries: v.entries, + input: v.input, + }), + numeric: true, + }, + context: props.context, + functor: props.functor, + }).combiner(next); - const path: string = explore.postfix - ? `_path + ${explore.postfix}` + const path: string = next.explore.postfix + ? `_path + ${next.explore.postfix}` : "_path"; - return (logic) => (input, binaries, expected) => - logic === "and" - ? binaries - .map((binary) => - binary.combined - ? binary.expression - : ts.factory.createLogicalOr( - binary.expression, - create_guard_call(importer)( - explore.source === "top" + return next.logic === "and" + ? next.binaries + .map((binary) => + binary.combined + ? binary.expression + : ts.factory.createLogicalOr( + binary.expression, + create_guard_call({ + context: props.context, + functor: props.functor, + exceptionable: + next.explore.source === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )(ts.factory.createIdentifier(path), expected, input), - ), - ) - .reduce(ts.factory.createLogicalAnd) - : ts.factory.createLogicalOr( - binaries - .map((binary) => binary.expression) - .reduce(ts.factory.createLogicalOr), - create_guard_call(importer)( - explore.source === "top" + path: ts.factory.createIdentifier(path), + expected: next.expected, + input: next.input, + }), + ), + ) + .reduce(ts.factory.createLogicalAnd) + : ts.factory.createLogicalOr( + next.binaries + .map((binary) => binary.expression) + .reduce(ts.factory.createLogicalOr), + create_guard_call({ + context: props.context, + functor: props.functor, + exceptionable: + next.explore.source === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )(ts.factory.createIdentifier(path), expected, input), - ); - // : (() => { - // const addicted = binaries.slice(); - // if ( - // addicted[addicted.length - 1]!.combined === false - // ) { - // addicted.push({ - // combined: true, - // expression: create_guard_call(importer)( - // explore.source === "top" - // ? ts.factory.createTrue() - // : ts.factory.createIdentifier( - // "_exceptionable", - // ), - // )( - // ts.factory.createIdentifier(path), - // expected, - // input, - // ), - // }); - // } - // return addicted - // .map((b) => b.expression) - // .reduce(ts.factory.createLogicalOr); - // })(); + path: ts.factory.createIdentifier(path), + expected: next.expected, + input: next.input, + }), + ); }; - const assert_object = - (equals: boolean) => (project: IProject) => (importer: FunctionImporter) => - check_object({ - equals, + const assert_object = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + entries: IExpressionEntry[]; + input: ts.Expression; + }) => + check_object({ + config: { + equals: props.config.equals, assert: true, undefined: true, reduce: ts.factory.createLogicalAnd, positive: ts.factory.createTrue(), - superfluous: (value) => - create_guard_call(importer)()( - ts.factory.createAdd( + superfluous: (input) => + create_guard_call({ + context: props.context, + functor: props.functor, + path: ts.factory.createAdd( ts.factory.createIdentifier("_path"), - ts.factory.createCallExpression(importer.use("join"), undefined, [ - ts.factory.createIdentifier("key"), - ]), + ts.factory.createCallExpression( + props.context.importer.internal("accessExpressionAsString"), + undefined, + [ts.factory.createIdentifier("key")], + ), ), - "undefined", - value, - ), + expected: "undefined", + input, + }), halt: (expr) => ts.factory.createLogicalOr( ts.factory.createStrictEquality( @@ -294,77 +328,108 @@ export namespace AssertProgrammer { ), expr, ), - })(project)(importer); + }, + context: props.context, + entries: props.entries, + input: props.input, + }); - const joiner = - (equals: boolean) => - (project: IProject) => - (importer: FunctionImporter): CheckerProgrammer.IConfig.IJoiner => ({ - object: assert_object(equals)(project)(importer), - array: (input, arrow) => - ts.factory.createCallExpression( - IdentifierFactory.access(input)("every"), - undefined, - [arrow], - ), - failure: (value, expected, explore) => - create_guard_call(importer)( - explore?.from === "top" + const joiner = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + }): CheckerProgrammer.IConfig.IJoiner => ({ + object: (next) => + assert_object({ + config: props.config, + context: props.context, + functor: props.functor, + entries: next.entries, + input: next.input, + }), + array: (props) => + ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "every"), + undefined, + [props.arrow], + ), + failure: (next) => + create_guard_call({ + context: props.context, + functor: props.functor, + exceptionable: + next.explore?.from === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )( - ts.factory.createIdentifier( - explore?.postfix ? `_path + ${explore.postfix}` : "_path", - ), - expected, - value, + path: ts.factory.createIdentifier( + next.explore?.postfix ? `_path + ${next.explore.postfix}` : "_path", ), - full: equals - ? undefined - : (condition) => (input, expected, explore) => - ts.factory.createLogicalOr( - condition, - create_guard_call(importer)( - explore.from === "top" + expected: next.expected, + input: next.input, + }), + full: props.config.equals + ? undefined + : (next) => + ts.factory.createLogicalOr( + next.condition, + create_guard_call({ + context: props.context, + functor: props.functor, + exceptionable: + next.explore.from === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )(ts.factory.createIdentifier("_path"), expected, input), - ), - }); + path: ts.factory.createIdentifier("_path"), + expected: next.expected, + input: next.input, + }), + ), + }); - const create_guard_call = - (importer: FunctionImporter) => - (exceptionable?: ts.Expression) => - ( - path: ts.Expression, - expected: string, - value: ts.Expression, - ): ts.Expression => - ts.factory.createCallExpression(importer.use("guard"), undefined, [ - exceptionable ?? ts.factory.createIdentifier("_exceptionable"), + const create_guard_call = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + expected: string; + input: ts.Expression; + path: ts.Expression; + exceptionable?: ts.Expression; + }): ts.Expression => + ts.factory.createCallExpression( + props.context.importer.internal("assertGuard"), + undefined, + [ + props.exceptionable ?? ts.factory.createIdentifier("_exceptionable"), ts.factory.createObjectLiteralExpression( [ - ts.factory.createPropertyAssignment("path", path), + ts.factory.createPropertyAssignment( + "method", + ts.factory.createStringLiteral(props.functor.method), + ), + ts.factory.createPropertyAssignment("path", props.path), ts.factory.createPropertyAssignment( "expected", - ts.factory.createStringLiteral(expected), + ts.factory.createStringLiteral(props.expected), ), - ts.factory.createPropertyAssignment("value", value), + ts.factory.createPropertyAssignment("value", props.input), ], true, ), ts.factory.createIdentifier("_errorFactory"), - ]); + ], + ); export namespace Guardian { export const identifier = () => ts.factory.createIdentifier("errorFactory"); - export const parameter = (init: ts.Expression | undefined) => + export const parameter = (props: { + context: ITypiaContext; + init: ts.Expression | undefined; + }) => IdentifierFactory.parameter( "errorFactory", - type(), - init ?? ts.factory.createToken(ts.SyntaxKind.QuestionToken), + type(props.context), + props.init ?? ts.factory.createToken(ts.SyntaxKind.QuestionToken), ); - export const type = () => + export const type = (context: ITypiaContext) => ts.factory.createFunctionTypeNode( undefined, [ @@ -373,18 +438,10 @@ export namespace AssertProgrammer { undefined, ts.factory.createIdentifier("p"), undefined, - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createQualifiedName( - ts.factory.createIdentifier("TypeGuardError"), - ts.factory.createIdentifier("IProps"), - ), - undefined, - false, - ), + context.importer.type({ + file: "typia", + name: "TypeGuardError.IProps", + }), undefined, ), ], diff --git a/src/programmers/CheckerProgrammer.ts b/src/programmers/CheckerProgrammer.ts index df1a9af508..81472b9e33 100644 --- a/src/programmers/CheckerProgrammer.ts +++ b/src/programmers/CheckerProgrammer.ts @@ -11,17 +11,19 @@ import { ValueFactory } from "../factories/ValueFactory"; import { Metadata } from "../schemas/metadata/Metadata"; import { MetadataArray } from "../schemas/metadata/MetadataArray"; import { MetadataConstant } from "../schemas/metadata/MetadataConstant"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataMap } from "../schemas/metadata/MetadataMap"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; +import { MetadataSet } from "../schemas/metadata/MetadataSet"; import { MetadataTuple } from "../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../schemas/metadata/MetadataTupleType"; -import { IProject } from "../transformers/IProject"; +import { ITypiaContext } from "../transformers/ITypiaContext"; import { TransformerError } from "../transformers/TransformerError"; import { FeatureProgrammer } from "./FeatureProgrammer"; import { IsProgrammer } from "./IsProgrammer"; import { AtomicPredicator } from "./helpers/AtomicPredicator"; -import { FunctionImporter } from "./helpers/FunctionImporter"; +import { FunctionProgrammer } from "./helpers/FunctionProgrammer"; import { ICheckEntry } from "./helpers/ICheckEntry"; import { IExpressionEntry } from "./helpers/IExpressionEntry"; import { OptionPredicator } from "./helpers/OptionPredicator"; @@ -44,47 +46,56 @@ export namespace CheckerProgrammer { equals: boolean; numeric: boolean; addition?: () => ts.Statement[]; - decoder?: () => FeatureProgrammer.Decoder; + decoder?: (props: { + metadata: Metadata; + input: ts.Expression; + explore: IExplore; + }) => ts.Expression; combiner: IConfig.Combiner; - atomist: ( - explore: IExplore, - ) => (check: ICheckEntry) => (input: ts.Expression) => ts.Expression; + atomist: (props: { + entry: ICheckEntry; + input: ts.Expression; + explore: IExplore; + }) => ts.Expression; joiner: IConfig.IJoiner; success: ts.Expression; } export namespace IConfig { export interface Combiner { - (explorer: IExplore): { - (logic: "and" | "or"): { - ( - input: ts.Expression, - binaries: IBinary[], - expected: string, - ): ts.Expression; - }; - }; + (props: { + explore: IExplore; + logic: "and" | "or"; + input: ts.Expression; + binaries: IBinary[]; + expected: string; + }): ts.Expression; } export interface IJoiner { - object(input: ts.Expression, entries: IExpressionEntry[]): ts.Expression; - array(input: ts.Expression, arrow: ts.ArrowFunction): ts.Expression; + object(props: { + input: ts.Expression; + entries: IExpressionEntry[]; + }): ts.Expression; + array(props: { + input: ts.Expression; + arrow: ts.ArrowFunction; + }): ts.Expression; tuple?: undefined | ((exprs: ts.Expression[]) => ts.Expression); - failure( - value: ts.Expression, - expected: string, - explore?: undefined | FeatureProgrammer.IExplore, - ): ts.Expression; + failure(props: { + input: ts.Expression; + expected: string; + explore?: undefined | FeatureProgrammer.IExplore; + }): ts.Expression; is?(expression: ts.Expression): ts.Expression; required?(exp: ts.Expression): ts.Expression; full?: | undefined - | (( - condition: ts.Expression, - ) => ( - input: ts.Expression, - expected: string, - explore: IExplore, - ) => ts.Expression); + | ((props: { + condition: ts.Expression; + input: ts.Expression; + expected: string; + explore: IExplore; + }) => ts.Expression); } } export type IExplore = FeatureProgrammer.IExplore; @@ -98,1041 +109,1509 @@ export namespace CheckerProgrammer { WRITERS ----------------------------------------------------------- */ export const compose = (props: { - project: IProject; + context: ITypiaContext; config: IConfig; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - }) => + }): FeatureProgrammer.IComposed => FeatureProgrammer.compose({ ...props, - config: configure(props.project)(props.config)(props.importer), + config: configure(props), }); - export const write = - (project: IProject) => (config: IConfig) => (importer: FunctionImporter) => - FeatureProgrammer.write(project)(configure(project)(config)(importer))( - importer, - ); + export const write = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + type: ts.Type; + name?: string; + }): ts.ArrowFunction => + FeatureProgrammer.write({ + config: configure(props), + context: props.context, + functor: props.functor, + type: props.type, + name: props.name, + }); - export const write_object_functions = - (project: IProject) => (config: IConfig) => (importer: FunctionImporter) => - FeatureProgrammer.write_object_functions( - configure(project)(config)(importer), - )(importer); + export const write_object_functions = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + FeatureProgrammer.write_object_functions({ + config: configure(props), + context: props.context, + collection: props.collection, + }); - export const write_union_functions = - (project: IProject) => (config: IConfig) => (importer: FunctionImporter) => - FeatureProgrammer.write_union_functions( - configure(project)({ ...config, numeric: false })(importer), - ); + export const write_union_functions = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + FeatureProgrammer.write_union_functions({ + config: configure({ + context: props.context, + config: { + ...props.config, + numeric: false, + }, + functor: props.functor, + }), + collection: props.collection, + }); - export const write_array_functions = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .arrays() - .filter((a) => a.recursive) - .map((type, i) => - StatementFactory.constant( - `${config.prefix}a${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_array_inline(project)(config)(importer)( - ts.factory.createIdentifier("input"), - MetadataArray.create({ - type, - tags: [], - }), - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + export const write_array_functions = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .arrays() + .filter((a) => a.recursive) + .map((type, i) => + StatementFactory.constant({ + name: `${props.config.prefix}a${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_array_inline({ + ...props, + input: ts.factory.createIdentifier("input"), + array: MetadataArray.create({ + type, + tags: [], + }), + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); - export const write_tuple_functions = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .tuples() - .filter((t) => t.recursive) - .map((tuple, i) => - StatementFactory.constant( - `${config.prefix}t${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_tuple_inline(project)(config)(importer)( - ts.factory.createIdentifier("input"), - tuple, - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + export const write_tuple_functions = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .tuples() + .filter((t) => t.recursive) + .map((tuple, i) => + StatementFactory.constant({ + name: `${props.config.prefix}t${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_tuple_inline({ + config: props.config, + context: props.context, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + tuple, + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); - const configure = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter): FeatureProgrammer.IConfig => ({ - types: { - input: () => TypeFactory.keyword("any"), - output: (type, name) => - ts.factory.createTypePredicateNode( - undefined, - "input", - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), - ), + const configure = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + }): FeatureProgrammer.IConfig => ({ + types: { + input: () => TypeFactory.keyword("any"), + output: (type, name) => + ts.factory.createTypePredicateNode( + undefined, + "input", + ts.factory.createTypeReferenceNode( + name ?? + TypeFactory.getFullName({ checker: props.context.checker, type }), ), - }, - trace: config.trace, - path: config.path, - prefix: config.prefix, - initializer: (project) => (importer) => (type) => { - const collection: MetadataCollection = new MetadataCollection(); - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ + ), + }, + trace: props.config.trace, + path: props.config.path, + prefix: props.config.prefix, + initializer: (next) => { + const collection: MetadataCollection = new MetadataCollection(); + const result = MetadataFactory.analyze({ + checker: next.context.checker, + transformer: next.context.transformer, + options: { escape: false, constant: true, absorb: true, - })(collection)(type); - if (result.success === false) - throw TransformerError.from(`typia.${importer.method}`)( - result.errors, - ); - return [collection, result.data]; - }, - addition: config.addition, - decoder: () => config.decoder?.() ?? decode(project)(config)(importer), - objector: { - checker: () => config.decoder?.() ?? decode(project)(config)(importer), - decoder: () => decode_object(config)(importer), - joiner: config.joiner.object, - unionizer: config.equals - ? decode_union_object(decode_object(config)(importer))( - (input, obj, explore) => - decode_object(config)(importer)(input, obj, { - ...explore, - tracable: true, + }, + collection, + type: next.type, + }); + if (result.success === false) + throw TransformerError.from({ + code: next.functor.method, + errors: result.errors, + }); + return { + collection, + metadata: result.data, + }; + }, + addition: props.config.addition, + decoder: props.config.decoder + ? (next) => props.config.decoder!(next) + : (next) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + objector: { + checker: props.config.decoder + ? (next) => props.config.decoder!(next) + : (next) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + decoder: (next) => + decode_object({ + config: props.config, + functor: props.functor, + input: next.input, + object: next.object, + explore: next.explore, + }), + joiner: props.config.joiner.object, + unionizer: props.config.equals + ? (next) => + decode_union_object({ + checker: (v) => + decode_object({ + config: props.config, + functor: props.functor, + object: v.object, + input: v.input, + explore: v.explore, }), - )(config.joiner.is ?? ((expr) => expr))((value, expected) => - ts.factory.createReturnStatement( - config.joiner.failure(value, expected), - ), - ) - : (input, targets, explore) => - config.combiner(explore)("or")( - input, - targets.map((obj) => ({ - expression: decode_object(config)(importer)( - input, - obj, - explore, - ), - combined: true, - })), - `(${targets.map((t) => t.name).join(" | ")})`, - ), - failure: (value, expected) => - ts.factory.createReturnStatement( - config.joiner.failure(value, expected), - ), - is: config.joiner.is, - required: config.joiner.required, - full: config.joiner.full, - type: TypeFactory.keyword("boolean"), - }, - generator: { - unions: config.numeric - ? () => - FeatureProgrammer.write_union_functions( - configure(project)({ ...config, numeric: false })(importer), - ) - : undefined, - arrays: () => write_array_functions(project)(config)(importer), - tuples: () => write_tuple_functions(project)(config)(importer), - }, - }); + decoder: (v) => + decode_object({ + config: props.config, + functor: props.functor, + input: v.input, + object: v.object, + explore: { + ...v.explore, + tracable: true, + }, + }), + success: props.config.joiner.is ?? ((expr) => expr), + escaper: (v) => + ts.factory.createReturnStatement( + props.config.joiner.failure(v), + ), + input: next.input, + objects: next.objects, + explore: next.explore, + }) + : (next) => + props.config.combiner({ + logic: "or", + explore: next.explore, + input: next.input, + binaries: next.objects.map((object) => ({ + expression: decode_object({ + config: props.config, + functor: props.functor, + object, + input: next.input, + explore: next.explore, + }), + combined: true, + })), + expected: `(${next.objects.map((t) => t.name).join(" | ")})`, + }), + failure: (next) => + ts.factory.createReturnStatement(props.config.joiner.failure(next)), + is: props.config.joiner.is, + required: props.config.joiner.required, + full: props.config.joiner.full + ? (next) => props.config.joiner.full!(next) + : undefined, + type: TypeFactory.keyword("boolean"), + }, + generator: { + unions: props.config.numeric + ? (collection) => + FeatureProgrammer.write_union_functions({ + config: configure({ + ...props, + config: { + ...props.config, + numeric: false, + }, + }), + collection, + }) + : undefined, + arrays: (collection) => + write_array_functions({ + ...props, + collection, + }), + tuples: (collection) => + write_tuple_functions({ + ...props, + collection, + }), + }, + }); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - /** - * @internal - */ - export const decode = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: IExplore, - ): ts.Expression => { - if (meta.any) return config.success; + export const decode = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: IExplore; + }): ts.Expression => { + if (props.metadata.any) return props.config.success; - const top: IBinary[] = []; - const binaries: IBinary[] = []; - const add = create_add(binaries)(input); - const getConstantValue = (value: number | string | bigint | boolean) => { - if (typeof value === "string") - return ts.factory.createStringLiteral(value); - else if (typeof value === "bigint") - return ExpressionFactory.bigint(value); - return ts.factory.createIdentifier(value.toString()); - }; + const top: IBinary[] = []; + const binaries: IBinary[] = []; + const add = (next: { + exact: boolean; + left: ts.Expression; + right?: ts.Expression; + }) => + create_add({ + binaries, + left: next.left, + right: next.right, + exact: next.exact, + default: props.input, + }); + const getConstantValue = (value: number | string | bigint | boolean) => { + if (typeof value === "string") + return ts.factory.createStringLiteral(value); + else if (typeof value === "bigint") + return ExpressionFactory.bigint(value); + return ts.factory.createIdentifier(value.toString()); + }; - //---- - // CHECK OPTIONAL - //---- - // @todo -> should be elaborated - const checkOptional: boolean = meta.empty() || meta.isUnionBucket(); + //---- + // CHECK OPTIONAL + //---- + // @todo -> should be elaborated + const checkOptional: boolean = + props.metadata.empty() || props.metadata.isUnionBucket(); - // NULLABLE - if (checkOptional || meta.nullable) - (meta.nullable ? add : create_add(top)(input))( - meta.nullable, - ValueFactory.NULL(), - ); + // NULLABLE + if (checkOptional || props.metadata.nullable) + if (props.metadata.nullable) + add({ + exact: props.metadata.nullable, + left: ValueFactory.NULL(), + }); + else + create_add({ + binaries: top, + default: props.input, + exact: props.metadata.nullable, + left: ValueFactory.NULL(), + }); - // UNDEFINDABLE - if (checkOptional || !meta.isRequired()) - (meta.isRequired() ? create_add(top)(input) : add)( - !meta.isRequired(), - ValueFactory.UNDEFINED(), - ); + // UNDEFINDABLE + if (checkOptional || !props.metadata.isRequired()) + if (props.metadata.isRequired()) + create_add({ + binaries: top, + default: props.input, + exact: false, + left: ValueFactory.UNDEFINED(), + }); + else + add({ + exact: true, + left: ValueFactory.UNDEFINED(), + }); - // FUNCTIONAL - if (meta.functions.length) - if (OptionPredicator.functional(project.options) || meta.size() !== 1) - add( - true, - ts.factory.createStringLiteral("function"), - ValueFactory.TYPEOF(input), - ); - else - binaries.push({ - combined: false, - expression: config.success, - }); + // FUNCTIONAL + if (props.metadata.functions.length) + if ( + OptionPredicator.functional(props.context.options) || + props.metadata.size() !== 1 + ) + add({ + exact: true, + left: ts.factory.createStringLiteral("function"), + right: ValueFactory.TYPEOF(props.input), + }); + else + binaries.push({ + combined: false, + expression: props.config.success, + }); - //---- - // VALUES - //---- - // CONSTANT VALUES - const constants: MetadataConstant[] = meta.constants.filter((c) => - AtomicPredicator.constant(meta)(c.type), - ); - const constantLength: number = constants - .map((c) => c.values.length) - .reduce((a, b) => a + b, 0); - if (constantLength >= 10) { - const values: Array = constants - .map((c) => c.values.map((v) => v.value)) - .flat(); - add( - true, - ts.factory.createTrue(), - ts.factory.createCallExpression( - IdentifierFactory.access( - importer.emplaceVariable( - `${config.prefix}v${importer.increment()}`, - ts.factory.createNewExpression( - ts.factory.createIdentifier("Set"), - undefined, - [ - ts.factory.createArrayLiteralExpression( - values.map((v) => - typeof v === "boolean" - ? v === true - ? ts.factory.createTrue() - : ts.factory.createFalse() - : typeof v === "bigint" - ? ExpressionFactory.bigint(v) - : typeof v === "number" - ? ExpressionFactory.number(v) - : ts.factory.createStringLiteral(v.toString()), - ), + //---- + // VALUES + //---- + // CONSTANT VALUES + const constants: MetadataConstant[] = props.metadata.constants.filter((c) => + AtomicPredicator.constant({ + metadata: props.metadata, + name: c.type, + }), + ); + const constantLength: number = constants + .map((c) => c.values.length) + .reduce((a, b) => a + b, 0); + if (constantLength >= 10) { + const values: Array = constants + .map((c) => c.values.map((v) => v.value)) + .flat(); + add({ + exact: true, + left: ts.factory.createTrue(), + right: ts.factory.createCallExpression( + IdentifierFactory.access( + props.functor.emplaceVariable( + `${props.config.prefix}v${props.functor.increment()}`, + ts.factory.createNewExpression( + ts.factory.createIdentifier("Set"), + undefined, + [ + ts.factory.createArrayLiteralExpression( + values.map((v) => + typeof v === "boolean" + ? v === true + ? ts.factory.createTrue() + : ts.factory.createFalse() + : typeof v === "bigint" + ? ExpressionFactory.bigint(v) + : typeof v === "number" + ? ExpressionFactory.number(v) + : ts.factory.createStringLiteral(v.toString()), ), - ], - ), + ), + ], ), - )("has"), - undefined, - [input], + ), + "has", ), - ); - } else - for (const c of constants) - if (AtomicPredicator.constant(meta)(c.type)) - for (const v of c.values) add(true, getConstantValue(v.value)); - - // ATOMIC VALUES - for (const atom of meta.atomics) - if (AtomicPredicator.atomic(meta)(atom.type) === false) continue; - else if (atom.type === "number") - binaries.push({ - expression: config.atomist(explore)( - check_number(project, config.numeric)(atom)(input), - )(input), - combined: false, - }); - else if (atom.type === "bigint") - binaries.push({ - expression: config.atomist(explore)( - check_bigint(project)(atom)(input), - )(input), - combined: false, - }); - else if (atom.type === "string") - binaries.push({ - expression: config.atomist(explore)( - check_string(project)(atom)(input), - )(input), - combined: false, - }); - else - add( - true, - ts.factory.createStringLiteral(atom.type), - ValueFactory.TYPEOF(input), - ); + undefined, + [props.input], + ), + }); + } else + for (const c of constants) + if ( + AtomicPredicator.constant({ + metadata: props.metadata, + name: c.type, + }) + ) + for (const v of c.values) + add({ + exact: true, + left: getConstantValue(v.value), + }); - // TEMPLATE LITERAL VALUES - if (meta.templates.length) - if (AtomicPredicator.template(meta)) - binaries.push({ - expression: config.atomist(explore)( - check_template(meta.templates)(input), - )(input), - combined: false, - }); + // ATOMIC VALUES + for (const atom of props.metadata.atomics) + if ( + AtomicPredicator.atomic({ + metadata: props.metadata, + name: atom.type, + }) === false + ) + continue; + else if (atom.type === "number") + binaries.push({ + expression: props.config.atomist({ + explore: props.explore, + entry: check_number({ + context: props.context, + numeric: props.config.numeric, + atomic: atom, + input: props.input, + }), + input: props.input, + }), + combined: false, + }); + else if (atom.type === "bigint") + binaries.push({ + expression: props.config.atomist({ + explore: props.explore, + entry: check_bigint({ + context: props.context, + atomic: atom, + input: props.input, + }), + input: props.input, + }), + combined: false, + }); + else if (atom.type === "string") + binaries.push({ + expression: props.config.atomist({ + explore: props.explore, + entry: check_string({ + context: props.context, + atomic: atom, + input: props.input, + }), + input: props.input, + }), + combined: false, + }); + else + add({ + exact: true, + left: ts.factory.createStringLiteral(atom.type), + right: ValueFactory.TYPEOF(props.input), + }); - // NATIVE CLASSES - for (const native of meta.natives) + // TEMPLATE LITERAL VALUES + if (props.metadata.templates.length) + if (AtomicPredicator.template(props.metadata)) binaries.push({ - expression: check_native(native)(input), + expression: props.config.atomist({ + explore: props.explore, + entry: check_template({ + templates: props.metadata.templates, + input: props.input, + }), + input: props.input, + }), combined: false, }); - //---- - // INSTANCES - //---- - interface IInstance { - pre: ts.Expression; - body: ts.Expression | null; - expected: string; - } - const instances: IInstance[] = []; - const prepare = - (pre: ts.Expression, expected: string) => - (body: ts.Expression | null) => - instances.push({ - pre, - expected, - body, - }); + // NATIVE CLASSES + for (const native of props.metadata.natives) + binaries.push({ + expression: check_native({ + name: native.name, + input: props.input, + }), + combined: false, + }); - // SETS - if (meta.sets.length) { - const install = prepare( - check_native("Set")(input), - meta.sets.map((elem) => `Set<${elem.getName()}>`).join(" | "), - ); - if (meta.sets.some((elem) => elem.any)) install(null); - else - install( - explore_sets(project)(config)(importer)(input, meta.sets, { - ...explore, + //---- + // INSTANCES + //---- + interface IInstance { + head: ts.Expression; + body: ts.Expression | null; + expected: string; + } + const instances: IInstance[] = []; + const prepare = (next: IInstance) => instances.push(next); + + // SETS + if (props.metadata.sets.length) { + const install = (body: ts.Expression | null) => + prepare({ + head: check_native({ + name: "Set", + input: props.input, + }), + expected: props.metadata.sets + .map((elem) => `Set<${elem.getName()}>`) + .join(" | "), + body, + }); + if (props.metadata.sets.some((elem) => elem.value.any)) install(null); + else + install( + explore_sets({ + config: props.config, + context: props.context, + functor: props.functor, + sets: props.metadata.sets, + input: props.input, + explore: { + ...props.explore, from: "array", - }), - ); - } + }, + }), + ); + } - // MAPS - if (meta.maps.length) { - const install = prepare( - check_native("Map")(input), - meta.maps + // MAPS + if (props.metadata.maps.length) { + const install = (body: ts.Expression | null) => + prepare({ + head: check_native({ + name: "Map", + input: props.input, + }), + expected: props.metadata.maps .map(({ key, value }) => `Map<${key}, ${value}>`) .join(" | "), - ); - if (meta.maps.some((elem) => elem.key.any && elem.value.any)) - install(null); - else - install( - explore_maps(project)(config)(importer)(input, meta.maps, { - ...explore, + body, + }); + if (props.metadata.maps.some((elem) => elem.key.any && elem.value.any)) + install(null); + else + install( + explore_maps({ + config: props.config, + context: props.context, + functor: props.functor, + maps: props.metadata.maps, + input: props.input, + explore: { + ...props.explore, from: "array", - }), - ); - } + }, + }), + ); + } - // ARRAYS AND TUPLES - if (meta.tuples.length + meta.arrays.length > 0) { - const install = prepare( - config.atomist(explore)({ - expected: [ - ...meta.tuples.map((t) => t.type.name), - ...meta.arrays.map((a) => a.getName()), - ].join(" | "), - expression: ExpressionFactory.isArray(input), - conditions: [], - })(input), - [...meta.tuples, ...meta.arrays] + // ARRAYS AND TUPLES + if (props.metadata.tuples.length + props.metadata.arrays.length > 0) { + const install = (body: ts.Expression | null) => + prepare({ + head: props.config.atomist({ + explore: props.explore, + entry: { + expected: [ + ...props.metadata.tuples.map((t) => t.type.name), + ...props.metadata.arrays.map((a) => a.getName()), + ].join(" | "), + expression: ExpressionFactory.isArray(props.input), + conditions: [], + }, + input: props.input, + }), + expected: [...props.metadata.tuples, ...props.metadata.arrays] .map((elem) => elem.type.name) .join(" | "), - ); - if (meta.arrays.length === 0) - if (meta.tuples.length === 1) - install( - decode_tuple(project)(config)(importer)(input, meta.tuples[0]!, { - ...explore, - from: "array", - }), - ); - // TUPLE ONLY - else - install( - explore_tuples(project)(config)(importer)(input, meta.tuples, { - ...explore, + body, + }); + if (props.metadata.arrays.length === 0) + if (props.metadata.tuples.length === 1) + install( + decode_tuple({ + config: props.config, + context: props.context, + functor: props.functor, + tuple: props.metadata.tuples[0]!, + input: props.input, + explore: { + ...props.explore, from: "array", - }), - ); - else if (meta.arrays.some((elem) => elem.type.value.any)) install(null); - else if (meta.tuples.length === 0) - if (meta.arrays.length === 1) - // ARRAY ONLY - install( - decode_array(project)(config)(importer)(input, meta.arrays[0]!, { - ...explore, + }, + }), + ); + // TUPLE ONLY + else + install( + explore_tuples({ + config: props.config, + context: props.context, + functor: props.functor, + tuples: props.metadata.tuples, + input: props.input, + explore: { + ...props.explore, from: "array", - }), - ); - else - install( - explore_arrays(project)(config)(importer)(input, meta.arrays, { - ...explore, + }, + }), + ); + else if (props.metadata.arrays.some((elem) => elem.type.value.any)) + install(null); + else if (props.metadata.tuples.length === 0) + if (props.metadata.arrays.length === 1) + // ARRAY ONLY + install( + decode_array({ + config: props.config, + context: props.context, + functor: props.functor, + array: props.metadata.arrays[0]!, + input: props.input, + explore: { + ...props.explore, from: "array", - }), - ); + }, + }), + ); else install( - explore_arrays_and_tuples(project)(config)(importer)( - input, - [...meta.tuples, ...meta.arrays], - explore, - ), + explore_arrays({ + config: props.config, + context: props.context, + functor: props.functor, + arrays: props.metadata.arrays, + input: props.input, + explore: { + ...props.explore, + from: "array", + }, + }), ); - } - - // OBJECT - if (meta.objects.length > 0) - prepare( - ExpressionFactory.isObject({ - checkNull: true, - checkArray: meta.objects.some((obj) => - obj.properties.every( - (prop) => !prop.key.isSoleLiteral() || !prop.value.isRequired(), - ), - ), - })(input), - meta.objects.map((obj) => obj.name).join(" | "), - )( - explore_objects(config)(importer)(input, meta, { - ...explore, - from: "object", + else + install( + explore_arrays_and_tuples({ + config: props.config, + context: props.context, + functor: props.functor, + definitions: [...props.metadata.tuples, ...props.metadata.arrays], + input: props.input, + explore: props.explore, }), ); + } - if (instances.length) { - const transformer = - (merger: (x: ts.Expression, y: ts.Expression) => ts.Expression) => - (ins: IInstance) => - ins.body - ? { - expression: merger(ins.pre, ins.body), - combined: true, - } - : { - expression: ins.pre, - combined: false, - }; - if (instances.length === 1) - binaries.push( - transformer((pre, body) => - config.combiner(explore)("and")( - input, - [pre, body].map((expression) => ({ - expression, - combined: expression !== pre, - })), - meta.getName(), - ), - )(instances[0]!), - ); - else - binaries.push({ - expression: config.combiner(explore)("or")( - input, - instances.map(transformer(ts.factory.createLogicalAnd)), - meta.getName(), + // OBJECT + if (props.metadata.objects.length > 0) + prepare({ + head: ExpressionFactory.isObject({ + checkNull: true, + checkArray: props.metadata.objects.some((obj) => + obj.type.properties.every( + (prop) => !prop.key.isSoleLiteral() || !prop.value.isRequired(), ), - combined: true, - }); - } + ), + input: props.input, + }), + expected: props.metadata.objects + .map((obj) => obj.type.name) + .join(" | "), + body: explore_objects({ + config: props.config, + functor: props.functor, + metadata: props.metadata, + input: props.input, + explore: { + ...props.explore, + from: "object", + }, + }), + }); - // ESCAPED CASE - if (meta.escaped !== null) + if (instances.length) { + const transformer = + (merge: (x: ts.Expression, y: ts.Expression) => ts.Expression) => + (instance: IInstance) => + instance.body + ? { + expression: merge(instance.head, instance.body), + combined: true, + } + : { + expression: instance.head, + combined: false, + }; + if (instances.length === 1) + binaries.push( + transformer((head, body) => + props.config.combiner({ + explore: props.explore, + logic: "and", + input: props.input, + binaries: [head, body].map((expression) => ({ + expression, + combined: expression !== head, + })), + expected: props.metadata.getName(), + }), + )(instances[0]!), + ); + else binaries.push({ - combined: false, - expression: - meta.escaped.original.size() === 1 && - meta.escaped.original.natives.length === 1 - ? check_native(meta.escaped.original.natives[0]!)(input) - : ts.factory.createLogicalAnd( - decode(project)(config)(importer)( - input, - meta.escaped.original, - explore, - ), - ts.factory.createLogicalAnd( - IsProgrammer.decode_to_json(false)(input), - decode_escaped(project)(config)(importer)( - input, - meta.escaped.returns, - explore, - ), - ), - ), + expression: props.config.combiner({ + explore: props.explore, + logic: "or", + input: props.input, + binaries: instances.map(transformer(ts.factory.createLogicalAnd)), + expected: props.metadata.getName(), + }), + combined: true, }); + } - //---- - // COMBINE CONDITIONS - //---- - return top.length && binaries.length - ? config.combiner(explore)("and")( - input, - [ - ...top, - { - expression: config.combiner(explore)("or")( - input, - binaries, - meta.getName(), + // ESCAPED CASE + if (props.metadata.escaped !== null) + binaries.push({ + combined: false, + expression: + props.metadata.escaped.original.size() === 1 && + props.metadata.escaped.original.natives.length === 1 + ? check_native({ + name: props.metadata.escaped.original.natives[0]!.name, + input: props.input, + }) + : ts.factory.createLogicalAnd( + decode({ + context: props.context, + config: props.config, + functor: props.functor, + metadata: props.metadata.escaped.original, + input: props.input, + explore: props.explore, + }), + ts.factory.createLogicalAnd( + IsProgrammer.decode_to_json({ + checkNull: false, + input: props.input, + }), + decode_escaped({ + config: props.config, + context: props.context, + functor: props.functor, + metadata: props.metadata.escaped.returns, + input: props.input, + explore: props.explore, + }), ), - combined: true, - }, - ], - meta.getName(), - ) - : binaries.length - ? config.combiner(explore)("or")(input, binaries, meta.getName()) - : config.success; - }; + ), + }); - export const decode_object = - (config: IConfig) => (importer: FunctionImporter) => { - const func = FeatureProgrammer.decode_object(config)(importer); - return (input: ts.Expression, obj: MetadataObject, explore: IExplore) => { - obj.validated = true; - return func(input, obj, explore); - }; - }; + //---- + // COMBINE CONDITIONS + //---- + return top.length && binaries.length + ? props.config.combiner({ + explore: props.explore, + logic: "and", + input: props.input, + binaries: [ + ...top, + { + expression: props.config.combiner({ + explore: props.explore, + logic: "or", + input: props.input, + binaries, + expected: props.metadata.getName(), + }), + combined: true, + }, + ], + expected: props.metadata.getName(), + }) + : binaries.length + ? props.config.combiner({ + explore: props.explore, + logic: "or", + input: props.input, + binaries, + expected: props.metadata.getName(), + }) + : props.config.success; + }; - const decode_array = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - (input: ts.Expression, array: MetadataArray, explore: IExplore) => { - if (array.type.recursive === false) - return decode_array_inline(project)(config)(importer)( - input, - array, - explore, - ); + export const decode_object = (props: { + config: IConfig; + functor: FunctionProgrammer; + object: MetadataObjectType; + input: ts.Expression; + explore: IExplore; + }) => { + props.object.validated ||= true; + return FeatureProgrammer.decode_object(props); + }; - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createLogicalOr( - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}a${array.type.index}`), + const decode_array = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + array: MetadataArray; + input: ts.Expression; + explore: IExplore; + }) => { + if (props.array.type.recursive === false) return decode_array_inline(props); + + const arrayExplore: IExplore = { + ...props.explore, + source: "function", + from: "array", + }; + return ts.factory.createLogicalOr( + ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}a${props.array.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...arrayExplore, source: "function", from: "array", - })(input), - ), - config.joiner.failure(input, array.type.name, explore), - ); - }; - - const decode_array_inline = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: IExplore, - ): ts.Expression => { - const length = check_array_length(project)(array)(input); - const main = FeatureProgrammer.decode_array({ - prefix: config.prefix, - trace: config.trace, - path: config.path, - decoder: () => decode(project)(config)(importer), - })(importer)(config.joiner.array)(input, array, explore); - return length.expression === null && length.conditions.length === 0 - ? main - : ts.factory.createLogicalAnd( - config.atomist(explore)(length)(input), - main, - ); - }; + }, + input: props.input, + }), + ), + props.config.joiner.failure({ + input: props.input, + expected: props.array.type.name, + explore: arrayExplore, + }), + ); + }; - const decode_tuple = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTuple, - explore: IExplore, - ): ts.Expression => { - if (tuple.type.recursive === false) - return decode_tuple_inline(project)(config)(importer)( - input, - tuple.type, - explore, + const decode_array_inline = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + array: MetadataArray; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => { + const length: ICheckEntry = check_array_length({ + context: props.context, + array: props.array, + input: props.input, + }); + const main: ts.Expression = FeatureProgrammer.decode_array({ + config: { + prefix: props.config.prefix, + trace: props.config.trace, + path: props.config.path, + decoder: (next) => + decode({ + ...props, + ...next, + }), + }, + functor: props.functor, + combiner: props.config.joiner.array, + array: props.array, + input: props.input, + explore: props.explore, + }); + return length.expression === null && length.conditions.length === 0 + ? main + : ts.factory.createLogicalAnd( + props.config.atomist({ + explore: props.explore, + input: props.input, + entry: length, + }), + main, ); - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createLogicalOr( - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}t${tuple.type.index}`), - ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, - source: "function", - })(input), - ), - config.joiner.failure(input, tuple.type.name, explore), - ); - }; + }; - const decode_tuple_inline = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTupleType, - explore: IExplore, - ): ts.Expression => { - const binaries: ts.Expression[] = tuple.elements - .filter((meta) => meta.rest === null) - .map((meta, index) => - decode(project)(config)(importer)( - ts.factory.createElementAccessExpression(input, index), - meta, - { - ...explore, - from: "array", - postfix: explore.postfix.length - ? `${postfix_of_tuple(explore.postfix)}[${index}]"` - : `"[${index}]"`, - }, + const decode_tuple = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + tuple: MetadataTuple; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => { + if (props.tuple.type.recursive === false) + return decode_tuple_inline({ + ...props, + tuple: props.tuple.type, + }); + const arrayExplore: IExplore = { + ...props.explore, + source: "function", + from: "array", + }; + return ts.factory.createLogicalOr( + ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}t${props.tuple.type.index}`, ), - ); - const rest: ts.Expression | null = - tuple.elements.length && tuple.elements.at(-1)!.rest !== null - ? decode(project)(config)(importer)( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("slice"), - undefined, - [ExpressionFactory.number(tuple.elements.length - 1)], - ), - wrap_metadata_rest_tuple(tuple.elements.at(-1)!.rest!), - { - ...explore, - start: tuple.elements.length - 1, - }, - ) - : null; + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...arrayExplore, + source: "function", + }, + input: props.input, + }), + ), + props.config.joiner.failure({ + input: props.input, + expected: props.tuple.type.name, + explore: arrayExplore, + }), + ); + }; - const arrayLength = ts.factory.createPropertyAccessExpression( - input, - "length", + const decode_tuple_inline = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + tuple: MetadataTupleType; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => { + const binaries: ts.Expression[] = props.tuple.elements + .filter((metadata) => metadata.rest === null) + .map((metadata, index) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createElementAccessExpression(props.input, index), + metadata, + explore: { + ...props.explore, + from: "array", + postfix: props.explore.postfix.length + ? `${postfix_of_tuple(props.explore.postfix)}[${index}]"` + : `"[${index}]"`, + }, + }), ); - return config.combiner(explore)("and")( - input, - [ - ...(rest === null - ? tuple.elements.every((t) => t.optional === false) - ? [ - { - combined: false, - expression: ts.factory.createStrictEquality( - arrayLength, - ExpressionFactory.number(tuple.elements.length), - ), - }, - ] - : [ - { - combined: false, - expression: ts.factory.createLogicalAnd( - ts.factory.createLessThanEquals( - ExpressionFactory.number( - tuple.elements.filter((t) => t.optional === false) - .length, - ), - arrayLength, - ), - ts.factory.createGreaterThanEquals( - ExpressionFactory.number(tuple.elements.length), - arrayLength, - ), - ), - }, - ] - : []), - ...(config.joiner.tuple + const rest: ts.Expression | null = + props.tuple.elements.length && props.tuple.elements.at(-1)!.rest !== null + ? decode({ + config: props.config, + context: props.context, + functor: props.functor, + input: ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "slice"), + undefined, + [ExpressionFactory.number(props.tuple.elements.length - 1)], + ), + metadata: wrap_metadata_rest_tuple( + props.tuple.elements.at(-1)!.rest!, + ), + explore: { + ...props.explore, + start: props.tuple.elements.length - 1, + }, + }) + : null; + const arrayLength = ts.factory.createPropertyAccessExpression( + props.input, + "length", + ); + return props.config.combiner({ + explore: props.explore, + logic: "and", + input: props.input, + binaries: [ + ...(rest === null + ? props.tuple.elements.every((t) => t.optional === false) ? [ { - expression: config.joiner.tuple(binaries), - combined: true, + combined: false, + expression: ts.factory.createStrictEquality( + arrayLength, + ExpressionFactory.number(props.tuple.elements.length), + ), }, ] - : binaries.map((expression) => ({ - expression, - combined: true, - }))), - ...(rest !== null - ? [ + : [ { - expression: rest, - combined: true, + combined: false, + expression: ts.factory.createLogicalAnd( + ts.factory.createLessThanEquals( + ExpressionFactory.number( + props.tuple.elements.filter((t) => t.optional === false) + .length, + ), + arrayLength, + ), + ts.factory.createGreaterThanEquals( + ExpressionFactory.number(props.tuple.elements.length), + arrayLength, + ), + ), }, ] - : []), - ], - `[${tuple.elements.map((t) => t.getName()).join(", ")}]`, - ); - }; + : []), + ...(props.config.joiner.tuple + ? [ + { + expression: props.config.joiner.tuple(binaries), + combined: true, + }, + ] + : binaries.map((expression) => ({ + expression, + combined: true, + }))), + ...(rest !== null + ? [ + { + expression: rest, + combined: true, + }, + ] + : []), + ], + expected: `[${props.tuple.elements.map((t) => t.getName()).join(", ")}]`, + }); + }; - const decode_escaped = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - (input: ts.Expression, meta: Metadata, explore: IExplore): ts.Expression => - ts.factory.createCallExpression( - ts.factory.createParenthesizedExpression( - ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - undefined, - undefined, - decode(project)(config)(importer)( - ts.factory.createIdentifier("input"), - meta, - explore, - ), - ), + const decode_escaped = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + metadata: Metadata; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => + ts.factory.createCallExpression( + ts.factory.createParenthesizedExpression( + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], + undefined, + undefined, + decode({ + ...props, + input: ts.factory.createIdentifier("input"), + }), ), - undefined, - [ - ts.factory.createCallExpression( - IdentifierFactory.access(input)("toJSON"), - undefined, - [], - ), - ], - ); + ), + undefined, + [ + ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "toJSON"), + undefined, + [], + ), + ], + ); /* ----------------------------------------------------------- UNION TYPE EXPLORERS ----------------------------------------------------------- */ - const explore_sets = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - sets: Metadata[], - explore: IExplore, - ): ts.Expression => - ts.factory.createCallExpression( - UnionExplorer.set({ - checker: decode(project)(config)(importer), - decoder: decode_array(project)(config)(importer), - empty: config.success, - success: config.success, - failure: (input, expected, explore) => - ts.factory.createReturnStatement( - config.joiner.failure(input, expected, explore), - ), - })([])(input, sets, explore), - undefined, - undefined, - ); + const explore_sets = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + sets: MetadataSet[]; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => + ts.factory.createCallExpression( + UnionExplorer.set({ + config: { + checker: (v) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: v.input, + metadata: v.definition, + explore: v.explore, + }), + decoder: (v) => + decode_array({ + config: props.config, + context: props.context, + functor: props.functor, + array: v.definition, + input: v.input, + explore: v.explore, + }), + empty: props.config.success, + success: props.config.success, + failure: (v) => + ts.factory.createReturnStatement(props.config.joiner.failure(v)), + }, + parameters: [], + input: props.input, + sets: props.sets, + explore: props.explore, + }), + undefined, + undefined, + ); - const explore_maps = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - maps: Metadata.Entry[], - explore: IExplore, - ): ts.Expression => - ts.factory.createCallExpression( - UnionExplorer.map({ - checker: (input, entry, explore) => { - const func = decode(project)(config)(importer); - return ts.factory.createLogicalAnd( - func( - ts.factory.createElementAccessExpression(input, 0), - entry[0], - { - ...explore, - postfix: `${explore.postfix}[0]`, + const explore_maps = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + maps: MetadataMap[]; + explore: IExplore; + }): ts.Expression => + ts.factory.createCallExpression( + UnionExplorer.map({ + config: { + checker: (v) => + ts.factory.createLogicalAnd( + decode({ + config: props.config, + context: props.context, + functor: props.functor, + input: ts.factory.createElementAccessExpression(v.input, 0), + metadata: v.definition[0], + explore: { + ...v.explore, + postfix: `${v.explore.postfix}[0]`, }, - ), - func( - ts.factory.createElementAccessExpression(input, 1), - entry[1], - { - ...explore, - postfix: `${explore.postfix}[1]`, + }), + decode({ + config: props.config, + context: props.context, + functor: props.functor, + input: ts.factory.createElementAccessExpression(v.input, 1), + metadata: v.definition[1], + explore: { + ...v.explore, + postfix: `${v.explore.postfix}[1]`, }, - ), - ); - }, - decoder: decode_array(project)(config)(importer), - empty: config.success, - success: config.success, - failure: (input, expected, explore) => - ts.factory.createReturnStatement( - config.joiner.failure(input, expected, explore), + }), ), - })([])(input, maps, explore), - undefined, - undefined, - ); + decoder: (v) => + decode_array({ + context: props.context, + config: props.config, + functor: props.functor, + array: v.definition, + input: v.input, + explore: v.explore, + }), + empty: props.config.success, + success: props.config.success, + failure: (v) => + ts.factory.createReturnStatement(props.config.joiner.failure(v)), + }, + parameters: [], + input: props.input, + maps: props.maps, + explore: props.explore, + }), + undefined, + undefined, + ); - const explore_tuples = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuples: MetadataTuple[], - explore: IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( + const explore_tuples = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + tuples: MetadataTuple[]; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => + explore_array_like_union_types({ + config: props.config, + functor: props.functor, + factory: (next) => UnionExplorer.tuple({ - checker: decode_tuple(project)(config)(importer), - decoder: decode_tuple(project)(config)(importer), - empty: config.success, - success: config.success, - failure: (input, expected, explore) => - ts.factory.createReturnStatement( - config.joiner.failure(input, expected, explore), - ), + config: { + checker: (v) => + decode_tuple({ + context: props.context, + config: props.config, + functor: props.functor, + input: v.input, + tuple: v.definition, + explore: v.explore, + }), + decoder: (v) => + decode_tuple({ + context: props.context, + config: props.config, + functor: props.functor, + tuple: v.definition, + input: v.input, + explore: v.explore, + }), + empty: props.config.success, + success: props.config.success, + failure: (v) => + ts.factory.createReturnStatement(props.config.joiner.failure(v)), + }, + parameters: next.parameters, + tuples: next.definitions, + input: next.input, + explore: next.explore, }), - )(input, tuples, explore); + definitions: props.tuples, + input: props.input, + explore: props.explore, + }); - const explore_arrays = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - arrays: MetadataArray[], - explore: IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( + const explore_arrays = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + arrays: MetadataArray[]; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => + explore_array_like_union_types({ + config: props.config, + functor: props.functor, + factory: (next) => UnionExplorer.array({ - checker: decode(project)(config)(importer), - decoder: decode_array(project)(config)(importer), - empty: config.success, - success: config.success, - failure: (input, expected, explore) => - ts.factory.createReturnStatement( - config.joiner.failure(input, expected, explore), - ), + config: { + checker: (v) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + metadata: v.definition, + input: v.input, + explore: v.explore, + }), + decoder: (v) => + decode_array({ + context: props.context, + config: props.config, + functor: props.functor, + array: v.definition, + input: v.input, + explore: v.explore, + }), + empty: props.config.success, + success: props.config.success, + failure: (v) => + ts.factory.createReturnStatement(props.config.joiner.failure(v)), + }, + parameters: next.parameters, + arrays: next.definitions, + input: next.input, + explore: next.explore, }), - )(input, arrays, explore); + definitions: props.arrays, + input: props.input, + explore: props.explore, + }); - const explore_arrays_and_tuples = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - elements: Array, - explore: IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( + const explore_arrays_and_tuples = (props: { + config: IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + definitions: Array; + input: ts.Expression; + explore: IExplore; + }): ts.Expression => + explore_array_like_union_types({ + config: props.config, + functor: props.functor, + factory: (next) => UnionExplorer.array_or_tuple({ - checker: (front, target, explore, array) => - target instanceof MetadataTuple - ? decode_tuple(project)(config)(importer)(front, target, explore) - : config.atomist(explore)({ - expected: elements - .map((elem) => - elem instanceof MetadataArray - ? elem.getName() - : elem.type.name, - ) - .join(" | "), - expression: decode(project)(config)(importer)( - front, - target, - explore, - ), - conditions: [], - })(array), - decoder: (input, target, explore) => - target instanceof MetadataTuple - ? decode_tuple(project)(config)(importer)(input, target, explore) - : decode_array(project)(config)(importer)(input, target, explore), - empty: config.success, - success: config.success, - failure: (input, expected, explore) => - ts.factory.createReturnStatement( - config.joiner.failure(input, expected, explore), - ), + config: { + checker: (v) => + v.definition instanceof MetadataTuple + ? decode_tuple({ + config: props.config, + context: props.context, + functor: props.functor, + input: v.input, + tuple: v.definition, + explore: v.explore, + }) + : props.config.atomist({ + explore: v.explore, + entry: { + expected: props.definitions + .map((elem) => + elem instanceof MetadataArray + ? elem.getName() + : elem.type.name, + ) + .join(" | "), + expression: decode({ + functor: props.functor, + context: props.context, + config: props.config, + metadata: v.definition, + input: v.input, + explore: v.explore, + }), + conditions: [], + }, + input: v.container, + }), + decoder: (v) => + v.definition instanceof MetadataTuple + ? decode_tuple({ + context: props.context, + config: props.config, + functor: props.functor, + input: v.input, + tuple: v.definition, + explore: v.explore, + }) + : decode_array({ + context: props.context, + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + empty: props.config.success, + success: props.config.success, + failure: (v) => + ts.factory.createReturnStatement(props.config.joiner.failure(v)), + }, + parameters: next.parameters, + definitions: next.definitions, + input: next.input, + explore: next.explore, }), - )(input, elements, explore); + input: props.input, + definitions: props.definitions, + explore: props.explore, + }); - const explore_array_like_union_types = - (config: IConfig) => - (importer: FunctionImporter) => - ( - factory: ( - parameters: ts.ParameterDeclaration[], - ) => ( - input: ts.Expression, - elements: T[], - explore: IExplore, - ) => ts.ArrowFunction, - ) => - (input: ts.Expression, elements: T[], explore: IExplore): ts.Expression => { - const arrow = - (parameters: ts.ParameterDeclaration[]) => - (explore: IExplore) => - (input: ts.Expression): ts.ArrowFunction => - factory(parameters)(input, elements, explore); - if (elements.every((e) => e.type.recursive === false)) - ts.factory.createCallExpression( - arrow([])(explore)(input), - undefined, - [], - ); - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createLogicalOr( - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.emplaceUnion( - config.prefix, - elements.map((e) => e.type.name).join(" | "), - () => - arrow( - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - )({ - ...explore, + const explore_array_like_union_types = < + T extends MetadataArray | MetadataTuple, + >(props: { + config: IConfig; + functor: FunctionProgrammer; + factory: (next: { + parameters: ts.ParameterDeclaration[]; + definitions: T[]; + input: ts.Expression; + explore: IExplore; + }) => ts.ArrowFunction; + input: ts.Expression; + definitions: T[]; + explore: IExplore; + }): ts.Expression => { + const arrow = (next: { + parameters: ts.ParameterDeclaration[]; + explore: IExplore; + input: ts.Expression; + }): ts.ArrowFunction => + props.factory({ + parameters: next.parameters, + definitions: props.definitions, + input: next.input, + explore: next.explore, + }); + if (props.definitions.every((e) => e.type.recursive === false)) + ts.factory.createCallExpression( + arrow({ + explore: props.explore, + input: props.input, + parameters: [], + }), + undefined, + [], + ); + const arrayExplore: IExplore = { + ...props.explore, + source: "function", + from: "array", + }; + return ts.factory.createLogicalOr( + ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.emplaceUnion( + props.config.prefix, + props.definitions.map((e) => e.type.name).join(" | "), + () => + arrow({ + parameters: FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + explore: { + ...arrayExplore, postfix: "", - })(ts.factory.createIdentifier("input")), - ), + }, + input: ts.factory.createIdentifier("input"), + }), ), - undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), ), - config.joiner.failure( - input, - elements.map((e) => e.type.name).join(" | "), - explore, - ), - ); - }; + undefined, + FeatureProgrammer.argumentsArray(props), + ), + props.config.joiner.failure({ + input: props.input, + expected: props.definitions.map((e) => e.type.name).join(" | "), + explore: arrayExplore, + }), + ); + }; - const explore_objects = - (config: IConfig) => - (importer: FunctionImporter) => - (input: ts.Expression, meta: Metadata, explore: IExplore) => - meta.objects.length === 1 - ? decode_object(config)(importer)(input, meta.objects[0]!, explore) - : ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}u${meta.union_index!}`), + const explore_objects = (props: { + config: IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: IExplore; + }) => + props.metadata.objects.length === 1 + ? decode_object({ + config: props.config, + functor: props.functor, + object: props.metadata.objects[0]!.type, + input: props.input, + explore: props.explore, + }) + : ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}u${props.metadata.union_index!}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), - ); + ), + undefined, + FeatureProgrammer.argumentsArray(props), + ); } -const create_add = - (binaries: CheckerProgrammer.IBinary[]) => - (defaultInput: ts.Expression) => - ( - exact: boolean, - left: ts.Expression, - right: ts.Expression = defaultInput, - ) => { - const factory = exact - ? ts.factory.createStrictEquality - : ts.factory.createStrictInequality; - binaries.push({ - expression: factory(left, right), - combined: false, - }); - }; +const create_add = (props: { + binaries: CheckerProgrammer.IBinary[]; + default: ts.Expression; + exact: boolean; + left: ts.Expression; + right?: ts.Expression; +}) => { + const factory = props.exact + ? ts.factory.createStrictEquality + : ts.factory.createStrictInequality; + props.binaries.push({ + expression: factory(props.left, props.right ?? props.default), + combined: false, + }); +}; diff --git a/src/programmers/FeatureProgrammer.ts b/src/programmers/FeatureProgrammer.ts index a840d1fb65..832a7d1214 100644 --- a/src/programmers/FeatureProgrammer.ts +++ b/src/programmers/FeatureProgrammer.ts @@ -8,20 +8,20 @@ import { ValueFactory } from "../factories/ValueFactory"; import { Metadata } from "../schemas/metadata/Metadata"; import { MetadataArray } from "../schemas/metadata/MetadataArray"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; -import { IProject } from "../transformers/IProject"; +import { ITypiaContext } from "../transformers/ITypiaContext"; import { CheckerProgrammer } from "./CheckerProgrammer"; -import { FunctionImporter } from "./helpers/FunctionImporter"; +import { FunctionProgrammer } from "./helpers/FunctionProgrammer"; import { IExpressionEntry } from "./helpers/IExpressionEntry"; import { UnionExplorer } from "./helpers/UnionExplorer"; import { feature_object_entries } from "./internal/feature_object_entries"; export namespace FeatureProgrammer { /* ----------------------------------------------------------- - PARAMETERS - ----------------------------------------------------------- */ + PARAMETERS + ----------------------------------------------------------- */ export interface IConfig { types: IConfig.ITypes; @@ -45,16 +45,23 @@ export namespace FeatureProgrammer { /** * Initializer of metadata. */ - initializer: ( - project: IProject, - ) => ( - importer: FunctionImporter, - ) => (type: ts.Type) => [MetadataCollection, Metadata]; + initializer: (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + type: ts.Type; + }) => { + collection: MetadataCollection; + metadata: Metadata; + }; /** * Decoder, station of every types. */ - decoder: () => Decoder; + decoder: (props: { + metadata: Metadata; + input: ts.Expression; + explore: IExplore; + }) => Output; /** * Object configurator. @@ -76,21 +83,29 @@ export namespace FeatureProgrammer { /** * Type checker when union object type comes. */ - checker: () => Decoder; + checker: (props: { + metadata: Metadata; + input: ts.Expression; + explore: IExplore; + }) => ts.Expression; /** * Decoder, function call expression generator of specific typed objects. */ - decoder: () => Decoder; + decoder: (props: { + input: ts.Expression; + object: MetadataObjectType; + explore: IExplore; + }) => ts.Expression; /** * Joiner of expressions from properties. */ - joiner( - input: ts.Expression, - entries: IExpressionEntry[], - parent: MetadataObject, - ): ts.ConciseBody; + joiner(props: { + entries: IExpressionEntry[]; + input?: ts.Expression; + object?: MetadataObjectType; + }): ts.ConciseBody; /** * Union type specificator. @@ -98,21 +113,23 @@ export namespace FeatureProgrammer { * Expression of an algorithm specifying object type and calling * the `decoder` function of the specified object type. */ - unionizer: Decoder; + unionizer: (props: { + objects: MetadataObjectType[]; + input: ts.Expression; + explore: IExplore; + }) => ts.Expression; /** * Handler of union type specification failure. * - * @param value Expression of input parameter - * @param expected Expected type name - * @param explore Exploration info + * @param props Properties of failure * @returns Statement of failure */ - failure( - value: ts.Expression, - expected: string, - explore?: undefined | IExplore, - ): ts.Statement; + failure(props: { + input: ts.Expression; + expected: string; + explore?: undefined | IExplore; + }): ts.Statement; /** * Transformer of type checking expression by discrimination. @@ -153,18 +170,17 @@ export namespace FeatureProgrammer { * iteration type checking would be happend. In such circumstance, you * can wrap the condition with additional function. * - * @param condition Current condition - * @returns A function wrapped current condition + * @param props Properties of condition + * @returns The wrapper expression */ full?: | undefined - | (( - condition: ts.Expression, - ) => ( - input: ts.Expression, - expected: string, - explore: IExplore, - ) => ts.Expression); + | ((props: { + condition: ts.Expression; + input: ts.Expression; + expected: string; + explore: IExplore; + }) => ts.Expression); /** * Return type. @@ -174,12 +190,12 @@ export namespace FeatureProgrammer { export interface IGenerator { objects?: | undefined - | (() => (col: MetadataCollection) => ts.VariableStatement[]); + | ((collection: MetadataCollection) => ts.VariableStatement[]); unions?: | undefined - | (() => (col: MetadataCollection) => ts.VariableStatement[]); - arrays(): (col: MetadataCollection) => ts.VariableStatement[]; - tuples(): (col: MetadataCollection) => ts.VariableStatement[]; + | ((collection: MetadataCollection) => ts.VariableStatement[]); + arrays: (collection: MetadataCollection) => ts.VariableStatement[]; + tuples: (collection: MetadataCollection) => ts.VariableStatement[]; } } @@ -191,9 +207,14 @@ export namespace FeatureProgrammer { start?: undefined | number; } - export interface Decoder { - (input: ts.Expression, target: T, explore: IExplore): Output; - } + export type Decoder< + T, + Output extends ts.ConciseBody = ts.ConciseBody, + > = (props: { + input: ts.Expression; + definition: T; + explore: IExplore; + }) => Output; /* ----------------------------------------------------------- GENERATORS @@ -212,21 +233,23 @@ export namespace FeatureProgrammer { } export const compose = (props: { - project: IProject; + context: ITypiaContext; config: IConfig; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): IComposed => { - const [collection, meta] = props.config.initializer(props.project)( - props.importer, - )(props.type); + const { collection, metadata } = props.config.initializer(props); return { - body: props.config.decoder()(ValueFactory.INPUT(), meta, { - tracable: props.config.path || props.config.trace, - source: "top", - from: "top", - postfix: '""', + body: props.config.decoder({ + input: ValueFactory.INPUT(), + metadata, + explore: { + tracable: props.config.path || props.config.trace, + source: "top", + from: "top", + postfix: '""', + }, }), statements: props.config.addition ? props.config.addition(collection) @@ -234,37 +257,45 @@ export namespace FeatureProgrammer { functions: { ...Object.fromEntries( ( - props.config.generator.objects?.() ?? - write_object_functions(props.config)(props.importer) - )(collection).map((v, i) => [`${props.config.prefix}o${i}`, v]), + props.config.generator.objects?.(collection) ?? + write_object_functions({ + ...props, + collection, + }) + ).map((v, i) => [`${props.config.prefix}o${i}`, v]), ), ...Object.fromEntries( ( - props.config.generator.unions?.() ?? - write_union_functions(props.config) - )(collection).map((v, i) => [`${props.config.prefix}u${i}`, v]), + props.config.generator.unions?.(collection) ?? + write_union_functions({ + config: props.config, + collection, + }) + ).map((v, i) => [`${props.config.prefix}u${i}`, v]), ), ...Object.fromEntries( props.config.generator - .arrays()(collection) + .arrays(collection) .map((v, i) => [`${props.config.prefix}a${i}`, v]), ), ...Object.fromEntries( props.config.generator - .tuples()(collection) + .tuples(collection) .map((v, i) => [`${props.config.prefix}t${i}`, v]), ), }, - parameters: parameterDeclarations(props.config)( - props.config.types.input(props.type, props.name), - )(ValueFactory.INPUT()), + parameters: parameterDeclarations({ + config: props.config, + type: props.config.types.input(props.type, props.name), + input: ValueFactory.INPUT(), + }), response: props.config.types.output(props.type, props.name), }; }; export const writeDecomposed = (props: { modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; result: IDecomposed; }): ts.CallExpression => ts.factory.createCallExpression( @@ -275,9 +306,9 @@ export namespace FeatureProgrammer { undefined, undefined, ts.factory.createBlock([ - ...props.importer.declare(props.modulo), + ...props.functor.declare(), ...Object.entries(props.result.functions) - .filter(([k]) => props.importer.hasLocal(k)) + .filter(([k]) => props.functor.hasLocal(k)) .map(([_k, v]) => v), ...props.result.statements, ts.factory.createReturnStatement(props.result.arrow), @@ -287,263 +318,305 @@ export namespace FeatureProgrammer { undefined, ); - export const write = - (project: IProject) => - (config: IConfig) => - (importer: FunctionImporter) => - (type: ts.Type, name?: string): ts.ArrowFunction => { - const [collection, meta] = config.initializer(project)(importer)(type); - - // ITERATE OVER ALL METADATA - const output: ts.ConciseBody = config.decoder()( - ValueFactory.INPUT(), - meta, - { - tracable: config.path || config.trace, - source: "top", - from: "top", - postfix: '""', - }, - ); - - // RETURNS THE OPTIMAL ARROW FUNCTION - const functions = { - objects: ( - config.generator.objects?.() ?? - write_object_functions(config)(importer) - )(collection), - unions: (config.generator.unions?.() ?? write_union_functions(config))( + export const write = (props: { + context: ITypiaContext; + config: IConfig; + functor: FunctionProgrammer; + type: ts.Type; + name?: string | undefined; + }): ts.ArrowFunction => { + // ITERATE OVER ALL METADATA + const { collection, metadata } = props.config.initializer(props); + const output: ts.ConciseBody = props.config.decoder({ + metadata, + input: ValueFactory.INPUT(), + explore: { + tracable: props.config.path || props.config.trace, + source: "top", + from: "top", + postfix: '""', + }, + }); + + // RETURNS THE OPTIMAL ARROW FUNCTION + const functions = { + objects: + props.config.generator.objects?.(collection) ?? + write_object_functions({ + config: props.config, + context: props.context, collection, - ), - arrays: config.generator.arrays()(collection), - tuples: config.generator.tuples()(collection), - }; - const added: ts.Statement[] = (config.addition ?? (() => []))(collection); - - return ts.factory.createArrowFunction( - undefined, - undefined, - parameterDeclarations(config)(config.types.input(type, name))( - ValueFactory.INPUT(), - ), - config.types.output(type, name), - undefined, - ts.factory.createBlock( - [ - ...added, - ...functions.objects.filter((_, i) => - importer.hasLocal(`${config.prefix}o${i}`), - ), - ...functions.unions.filter((_, i) => - importer.hasLocal(`${config.prefix}u${i}`), - ), - ...functions.arrays.filter((_, i) => - importer.hasLocal(`${config.prefix}a${i}`), - ), - ...functions.tuples.filter((_, i) => - importer.hasLocal(`${config.prefix}t${i}`), - ), - ...(ts.isBlock(output) - ? output.statements - : [ts.factory.createReturnStatement(output)]), - ], - true, - ), - ); + }), + unions: + props.config.generator.unions?.(collection) ?? + write_union_functions({ + config: props.config, + collection, + }), + arrays: props.config.generator.arrays(collection), + tuples: props.config.generator.tuples(collection), }; + const added: ts.Statement[] = (props.config.addition ?? (() => []))( + collection, + ); - export const write_object_functions = - (config: IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection) => - collection - .objects() - .map((obj) => - StatementFactory.constant( - `${config.prefix}o${obj.index}`, - ts.factory.createArrowFunction( - undefined, - undefined, - parameterDeclarations(config)(TypeFactory.keyword("any"))( - ValueFactory.INPUT(), - ), - config.objector.type ?? TypeFactory.keyword("any"), - undefined, - config.objector.joiner( - ts.factory.createIdentifier("input"), - feature_object_entries(config)(importer)(obj)( - ts.factory.createIdentifier("input"), - ), - obj, - ), - ), + return ts.factory.createArrowFunction( + undefined, + undefined, + parameterDeclarations({ + config: props.config, + type: props.config.types.input(props.type, props.name), + input: ValueFactory.INPUT(), + }), + props.config.types.output(props.type, props.name), + undefined, + ts.factory.createBlock( + [ + ...added, + ...functions.objects.filter((_, i) => + props.functor.hasLocal(`${props.config.prefix}o${i}`), ), - ); - - export const write_union_functions = - (config: IConfig) => (collection: MetadataCollection) => - collection - .unions() - .map((union, i) => - StatementFactory.constant( - `${config.prefix}u${i}`, - write_union(config)(union), + ...functions.unions.filter((_, i) => + props.functor.hasLocal(`${props.config.prefix}u${i}`), ), - ); - - const write_union = (config: IConfig) => { - const explorer = UnionExplorer.object(config); - const input = ValueFactory.INPUT(); + ...functions.arrays.filter((_, i) => + props.functor.hasLocal(`${props.config.prefix}a${i}`), + ), + ...functions.tuples.filter((_, i) => + props.functor.hasLocal(`${props.config.prefix}t${i}`), + ), + ...(ts.isBlock(output) + ? output.statements + : [ts.factory.createReturnStatement(output)]), + ], + true, + ), + ); + }; - return (meta: MetadataObject[]) => - ts.factory.createArrowFunction( - undefined, - undefined, - parameterDeclarations(config)(TypeFactory.keyword("any"))( - ValueFactory.INPUT(), + export const write_object_functions = (props: { + config: IConfig; + context: ITypiaContext; + collection: MetadataCollection; + }) => + props.collection.objects().map((object) => + StatementFactory.constant({ + name: `${props.config.prefix}o${object.index}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ValueFactory.INPUT(), + }), + props.config.objector.type ?? TypeFactory.keyword("any"), + undefined, + props.config.objector.joiner({ + input: ts.factory.createIdentifier("input"), + entries: feature_object_entries({ + config: props.config, + context: props.context, + input: ts.factory.createIdentifier("input"), + object, + }), + object, + }), ), - TypeFactory.keyword("any"), - undefined, - explorer(input, meta, { - tracable: config.path || config.trace, + }), + ); + + export const write_union_functions = (props: { + config: IConfig; + collection: MetadataCollection; + }) => + props.collection.unions().map((union, i) => + StatementFactory.constant({ + name: `${props.config.prefix}u${i}`, + value: write_union({ + config: props.config, + objects: union, + }), + }), + ); + + const write_union = (props: { + config: IConfig; + objects: MetadataObjectType[]; + }) => + ts.factory.createArrowFunction( + undefined, + undefined, + parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ValueFactory.INPUT(), + }), + TypeFactory.keyword("any"), + undefined, + UnionExplorer.object({ + config: props.config, + objects: props.objects, + input: ValueFactory.INPUT(), + explore: { + tracable: props.config.path || props.config.trace, source: "function", from: "object", postfix: "", - }), - ); - }; + }, + }), + ); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - export const decode_array = - (config: Pick) => - (importer: FunctionImporter) => - ( - combiner: ( - input: ts.Expression, - arrow: ts.ArrowFunction, - ) => ts.Expression, - ) => { - const rand: string = importer.increment().toString(); - const tail = - config.path || config.trace - ? [ - IdentifierFactory.parameter( - "_index" + rand, - TypeFactory.keyword("number"), - ), - ] - : []; - - return ( - input: ts.Expression, - array: MetadataArray, - explore: IExplore, - ) => { - const arrow: ts.ArrowFunction = ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter("elem", TypeFactory.keyword("any")), - ...tail, - ], - undefined, - undefined, - config.decoder()(ValueFactory.INPUT("elem"), array.type.value, { - tracable: explore.tracable, - source: explore.source, - from: "array", - postfix: index(explore.start ?? null)(explore.postfix)(rand), + export const decode_array = (props: { + config: Pick; + functor: FunctionProgrammer; + combiner: (next: { + input: ts.Expression; + arrow: ts.ArrowFunction; + }) => ts.Expression; + array: MetadataArray; + input: ts.Expression; + explore: IExplore; + }) => { + const rand: string = props.functor.increment().toString(); + const tail = + props.config.path || props.config.trace + ? [ + IdentifierFactory.parameter( + "_index" + rand, + TypeFactory.keyword("number"), + ), + ] + : []; + const arrow: ts.ArrowFunction = ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter("elem", TypeFactory.keyword("any")), + ...tail, + ], + undefined, + undefined, + props.config.decoder({ + input: ValueFactory.INPUT("elem"), + metadata: props.array.type.value, + explore: { + tracable: props.explore.tracable, + source: props.explore.source, + from: "array", + postfix: index({ + start: props.explore.start ?? null, + postfix: props.explore.postfix, + rand, }), - ); - return combiner(input, arrow); - }; - }; + }, + }), + ); + return props.combiner({ + input: props.input, + arrow, + }); + }; - export const decode_object = - (config: Pick) => - (importer: FunctionImporter) => - (input: ts.Expression, obj: MetadataObject, explore: IExplore) => - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}o${obj.index}`), - ), - undefined, - argumentsArray(config)(explore)(input), - ); + export const decode_object = (props: { + config: Pick; + functor: FunctionProgrammer; + object: MetadataObjectType; + input: ts.Expression; + explore: IExplore; + }) => + ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(`${props.config.prefix}o${props.object.index}`), + ), + undefined, + argumentsArray(props), + ); /* ----------------------------------------------------------- UTILITIES FOR INTERNAL FUNCTIONS ----------------------------------------------------------- */ - export const index = - (start: number | null) => (prev: string) => (rand: string) => { - const tail: string = - start !== null - ? `"[" + (${start} + _index${rand}) + "]"` - : `"[" + _index${rand} + "]"`; - if (prev === "") return tail; - else if (prev[prev.length - 1] === `"`) - return prev.substring(0, prev.length - 1) + tail.substring(1); - return prev + ` + ${tail}`; - }; + export const index = (props: { + start: number | null; + postfix: string; + rand: string; + }) => { + const tail: string = + props.start !== null + ? `"[" + (${props.start} + _index${props.rand}) + "]"` + : `"[" + _index${props.rand} + "]"`; + if (props.postfix === "") return tail; + else if (props.postfix[props.postfix.length - 1] === `"`) + return ( + props.postfix.substring(0, props.postfix.length - 1) + tail.substring(1) + ); + return props.postfix + ` + ${tail}`; + }; - export const argumentsArray = - (config: Pick) => - (explore: FeatureProgrammer.IExplore) => { - const tail: ts.Expression[] = - config.path === false && config.trace === false - ? [] - : config.path === true && config.trace === true + export const argumentsArray = (props: { + config: Pick; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; + }) => { + const tail: ts.Expression[] = + props.config.path === false && props.config.trace === false + ? [] + : props.config.path === true && props.config.trace === true + ? [ + ts.factory.createIdentifier( + props.explore.postfix + ? `_path + ${props.explore.postfix}` + : "_path", + ), + props.explore.source === "function" + ? ts.factory.createIdentifier( + `${props.explore.tracable} && _exceptionable`, + ) + : props.explore.tracable + ? ts.factory.createTrue() + : ts.factory.createFalse(), + ] + : props.config.path === true ? [ ts.factory.createIdentifier( - explore.postfix ? `_path + ${explore.postfix}` : "_path", + props.explore.postfix + ? `_path + ${props.explore.postfix}` + : "_path", ), - explore.source === "function" + ] + : [ + props.explore.source === "function" ? ts.factory.createIdentifier( - `${explore.tracable} && _exceptionable`, + `${props.explore.tracable} && _exceptionable`, ) - : explore.tracable + : props.explore.tracable ? ts.factory.createTrue() : ts.factory.createFalse(), - ] - : config.path === true - ? [ - ts.factory.createIdentifier( - explore.postfix ? `_path + ${explore.postfix}` : "_path", - ), - ] - : [ - explore.source === "function" - ? ts.factory.createIdentifier( - `${explore.tracable} && _exceptionable`, - ) - : explore.tracable - ? ts.factory.createTrue() - : ts.factory.createFalse(), - ]; - return (input: ts.Expression) => [input, ...tail]; - }; + ]; + return [props.input, ...tail]; + }; - export const parameterDeclarations = - (props: Pick) => - (type: ts.TypeNode) => { - const tail: ts.ParameterDeclaration[] = []; - if (props.path) - tail.push( - IdentifierFactory.parameter("_path", TypeFactory.keyword("string")), - ); - if (props.trace) - tail.push( - IdentifierFactory.parameter( - "_exceptionable", - TypeFactory.keyword("boolean"), - ts.factory.createTrue(), - ), - ); - return (input: ts.Identifier): ts.ParameterDeclaration[] => [ - IdentifierFactory.parameter(input, type), - ...tail, - ]; - }; + export const parameterDeclarations = (props: { + config: Pick; + type: ts.TypeNode; + input: ts.Identifier; + }) => { + const tail: ts.ParameterDeclaration[] = []; + if (props.config.path) + tail.push( + IdentifierFactory.parameter("_path", TypeFactory.keyword("string")), + ); + if (props.config.trace) + tail.push( + IdentifierFactory.parameter( + "_exceptionable", + TypeFactory.keyword("boolean"), + ts.factory.createTrue(), + ), + ); + return [IdentifierFactory.parameter(props.input, props.type), ...tail]; + }; } diff --git a/src/programmers/ImportProgrammer.ts b/src/programmers/ImportProgrammer.ts new file mode 100644 index 0000000000..2aea415d8b --- /dev/null +++ b/src/programmers/ImportProgrammer.ts @@ -0,0 +1,185 @@ +import ts from "typescript"; + +import { MapUtil } from "../utils/MapUtil"; + +export class ImportProgrammer { + private readonly assets_: Map = new Map(); + private readonly options_: Readonly; + + public constructor(options?: Partial) { + this.options_ = { + internalPrefix: options?.internalPrefix ?? "", + }; + } + + /* ----------------------------------------------------------- + ENROLLMENTS + ----------------------------------------------------------- */ + public default(props: ImportProgrammer.IDefault): ts.Identifier { + const asset: IAsset = this.take(props.file); + asset.default ??= props; + asset.default.type ||= props.type; + return ts.factory.createIdentifier(asset.default.name); + } + + public instance(props: ImportProgrammer.IInstance): ts.Identifier { + const alias: string = props.alias ?? props.name; + const asset: IAsset = this.take(props.file); + MapUtil.take(asset.instances, alias, () => props); + return ts.factory.createIdentifier(alias); + } + + public namespace(props: ImportProgrammer.INamespace): ts.Identifier { + const asset: IAsset = this.take(props.file); + asset.namespace ??= props; + return ts.factory.createIdentifier(asset.namespace.name); + } + + public type(props: { + file: string; + name: string | ts.EntityName; + arguments?: ts.TypeNode[]; + }): ts.ImportTypeNode { + return ts.factory.createImportTypeNode( + ts.factory.createLiteralTypeNode( + ts.factory.createStringLiteral(props.file), + ), + undefined, + typeof props.name === "string" + ? ts.factory.createIdentifier(props.name) + : props.name, + props.arguments, + ); + } + + /** + * @internal + */ + public internal(name: string): ts.PropertyAccessExpression { + if (name.startsWith("_") === false) name = `_${name}`; + return ts.factory.createPropertyAccessExpression( + this.namespace({ + file: `typia/lib/internal/${name}.js`, + name: this.alias(name), + }), + name, + ); + } + + /** + * @internal + */ + public getInternalText(name: string): string { + if (name.startsWith("_") === false) name = `_${name}`; + const asset: IAsset | undefined = this.take( + `typia/lib/internal/${name}.js`, + ); + if (!asset?.namespace) throw new Error(`Internal asset not found: ${name}`); + return `${asset.namespace.name}.${name}`; + } + + /** + * @internal + */ + private take(file: string): IAsset { + return MapUtil.take(this.assets_, file, () => ({ + file, + default: null, + namespace: null, + instances: new Map(), + })); + } + + private alias(name: string): string { + return `__${this.options_.internalPrefix}${name}`; + } + + /* ----------------------------------------------------------- + PROGRAM STATEMENTS + ----------------------------------------------------------- */ + public toStatements(): ts.ImportDeclaration[] { + const statements: ts.ImportDeclaration[] = []; + for (const asset of this.assets_.values()) { + if (asset.namespace !== null) + statements.push( + ts.factory.createImportDeclaration( + undefined, + ts.factory.createImportClause( + false, + undefined, + ts.factory.createNamespaceImport( + ts.factory.createIdentifier(asset.namespace.name), + ), + ), + ts.factory.createStringLiteral(asset.file), + ), + ); + if (asset.default !== null) + statements.push( + ts.factory.createImportDeclaration( + undefined, + ts.factory.createImportClause( + asset.default.type, + ts.factory.createIdentifier(asset.default.name), + undefined, + ), + ts.factory.createStringLiteral(asset.file), + ), + ); + if (asset.instances.size > 0) + statements.push( + ts.factory.createImportDeclaration( + undefined, + ts.factory.createImportClause( + false, + undefined, + asset.instances.size > 0 + ? ts.factory.createNamedImports( + [...asset.instances.values()].map((ins) => + ts.factory.createImportSpecifier( + false, + ins.alias || ins.alias === ins.name + ? ts.factory.createIdentifier(ins.name) + : undefined, + ts.factory.createIdentifier(ins.alias ?? ins.name), + ), + ), + ) + : undefined, + ), + ts.factory.createStringLiteral(asset.file), + undefined, + ), + ); + } + return statements; + } +} + +export namespace ImportProgrammer { + export interface IOptions { + internalPrefix: string; + } + + export interface IDefault { + file: string; + name: string; + type: boolean; + } + export interface IInstance { + file: string; + name: string; + alias: string | null; + } + export interface INamespace { + file: string; + name: string; + } +} + +interface IAsset { + file: string; + default: ImportProgrammer.IDefault | null; + namespace: ImportProgrammer.INamespace | null; + instances: Map; +} diff --git a/src/programmers/IsProgrammer.ts b/src/programmers/IsProgrammer.ts index ec8c3a5a9a..600d8e3c01 100644 --- a/src/programmers/IsProgrammer.ts +++ b/src/programmers/IsProgrammer.ts @@ -5,118 +5,142 @@ import { IdentifierFactory } from "../factories/IdentifierFactory"; import { MetadataCollection } from "../factories/MetadataCollection"; import { ValueFactory } from "../factories/ValueFactory"; -import { IProject } from "../transformers/IProject"; +import { Metadata } from "../schemas/metadata/Metadata"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; + +import { IProgrammerProps } from "../transformers/IProgrammerProps"; +import { ITypiaContext } from "../transformers/ITypiaContext"; import { CheckerProgrammer } from "./CheckerProgrammer"; import { FeatureProgrammer } from "./FeatureProgrammer"; -import { FunctionImporter } from "./helpers/FunctionImporter"; +import { FunctionProgrammer } from "./helpers/FunctionProgrammer"; import { IExpressionEntry } from "./helpers/IExpressionEntry"; import { OptionPredicator } from "./helpers/OptionPredicator"; import { check_object } from "./internal/check_object"; export namespace IsProgrammer { - export const configure = - (options?: Partial) => - (project: IProject) => - (importer: FunctionImporter): CheckerProgrammer.IConfig => ({ - prefix: "$i", - equals: !!options?.object, - trace: false, - path: false, - numeric: OptionPredicator.numeric({ - numeric: options?.numeric, - }), - atomist: () => (entry) => () => - [ - ...(entry.expression ? [entry.expression] : []), - ...(entry.conditions.length === 0 - ? [] - : [ - entry.conditions - .map((set) => - set - .map((s) => s.expression) - .reduce((a, b) => ts.factory.createLogicalAnd(a, b)), - ) - .reduce((a, b) => ts.factory.createLogicalOr(a, b)), - ]), - ].reduce((x, y) => ts.factory.createLogicalAnd(x, y)), - combiner: () => (type: "and" | "or") => { - const initial: ts.TrueLiteral | ts.FalseLiteral = - type === "and" ? ts.factory.createTrue() : ts.factory.createFalse(); - const binder = - type === "and" - ? ts.factory.createLogicalAnd - : ts.factory.createLogicalOr; - return ( - _input: ts.Expression, - binaries: CheckerProgrammer.IBinary[], - ) => - binaries.length - ? binaries - .map((binary) => binary.expression) - .reduce((x, y) => binder(x, y)) - : initial; - }, - joiner: { - object: - options?.object || - check_object({ - equals: !!options?.object, - undefined: OptionPredicator.undefined({ - undefined: options?.undefined, + export const configure = (props: { + options?: Partial; + context: ITypiaContext; + functor: FunctionProgrammer; + }): CheckerProgrammer.IConfig => ({ + prefix: "_i", + equals: !!props.options?.object, + trace: false, + path: false, + numeric: OptionPredicator.numeric({ + numeric: props.options?.numeric, + }), + atomist: ({ entry }) => + [ + ...(entry.expression ? [entry.expression] : []), + ...(entry.conditions.length === 0 + ? [] + : [ + entry.conditions + .map((set) => + set + .map((s) => s.expression) + .reduce((a, b) => ts.factory.createLogicalAnd(a, b)), + ) + .reduce((a, b) => ts.factory.createLogicalOr(a, b)), + ]), + ].reduce((x, y) => ts.factory.createLogicalAnd(x, y)), + combiner: (next) => { + const initial: ts.TrueLiteral | ts.FalseLiteral = + next.logic === "and" + ? ts.factory.createTrue() + : ts.factory.createFalse(); + const binder = + next.logic === "and" + ? ts.factory.createLogicalAnd + : ts.factory.createLogicalOr; + return next.binaries.length + ? next.binaries.map((binary) => binary.expression).reduce(binder) + : initial; + }, + joiner: { + object: props.options?.object + ? (v) => props.options!.object!(v) + : (v) => + check_object({ + config: { + equals: !!props.options?.object, + undefined: OptionPredicator.undefined({ + undefined: props.options?.undefined, + }), + assert: true, + reduce: ts.factory.createLogicalAnd, + positive: ts.factory.createTrue(), + superfluous: () => ts.factory.createFalse(), + }, + context: props.context, + entries: v.entries, + input: v.input, }), - assert: true, - reduce: ts.factory.createLogicalAnd, - positive: ts.factory.createTrue(), - superfluous: () => ts.factory.createFalse(), - })(project)(importer), - array: (input, arrow) => - ts.factory.createCallExpression( - IdentifierFactory.access(input)("every"), - undefined, - [arrow], - ), - failure: () => ts.factory.createFalse(), - }, - success: ts.factory.createTrue(), - }); + array: (props) => + ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "every"), + undefined, + [props.arrow], + ), + failure: () => ts.factory.createFalse(), + }, + success: ts.factory.createTrue(), + }); export namespace CONFIG { export interface IOptions { numeric: boolean; undefined: boolean; - object: ( - input: ts.Expression, - entries: IExpressionEntry[], - ) => ts.Expression; + object: (props: { + input: ts.Expression; + entries: IExpressionEntry[]; + }) => ts.Expression; } } /* ----------------------------------------------------------- WRITERS ----------------------------------------------------------- */ - export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + export interface IConfig { equals: boolean; + } + export interface IProps extends IProgrammerProps { + config: IConfig; + } + + export const decompose = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + config: IConfig; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { // CONFIGURATION const config: CheckerProgrammer.IConfig = { ...configure({ - object: check_object({ - equals: props.equals, - undefined: OptionPredicator.undefined(props.project.options), - assert: true, - reduce: ts.factory.createLogicalAnd, - positive: ts.factory.createTrue(), - superfluous: () => ts.factory.createFalse(), - })(props.project)(props.importer), - numeric: OptionPredicator.numeric(props.project.options), - })(props.project)(props.importer), - trace: props.equals, + options: { + object: (v) => + check_object({ + config: { + equals: props.config.equals, + undefined: OptionPredicator.undefined(props.context.options), + assert: true, + reduce: ts.factory.createLogicalAnd, + positive: ts.factory.createTrue(), + superfluous: () => ts.factory.createFalse(), + }, + context: props.context, + entries: v.entries, + input: v.input, + }), + numeric: OptionPredicator.numeric(props.context.options), + }, + context: props.context, + functor: props.functor, + }), + trace: props.config.equals, }; // COMPOSITION @@ -138,79 +162,108 @@ export namespace IsProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - (type: ts.Type, name?: string) => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - equals, - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps) => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + config: props.config, + context: props.context, + functor, + type: props.type, + name: props.name, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - export const write_function_statements = - (project: IProject) => - (importer: FunctionImporter) => - (collection: MetadataCollection) => { - const config = configure()(project)(importer); - const objects = - CheckerProgrammer.write_object_functions(project)(config)(importer)( - collection, - ); - const unions = - CheckerProgrammer.write_union_functions(project)(config)(importer)( - collection, - ); - const arrays = - CheckerProgrammer.write_array_functions(project)(config)(importer)( - collection, - ); - const tuples = - CheckerProgrammer.write_tuple_functions(project)(config)(importer)( - collection, - ); - - return [ - ...objects.filter((_, i) => importer.hasLocal(`${config.prefix}o${i}`)), - ...unions.filter((_, i) => importer.hasLocal(`${config.prefix}u${i}`)), - ...arrays.filter((_, i) => importer.hasLocal(`${config.prefix}a${i}`)), - ...tuples.filter((_, i) => importer.hasLocal(`${config.prefix}t${i}`)), - ]; + export const write_function_statements = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + collection: MetadataCollection; + }) => { + const config: CheckerProgrammer.IConfig = configure(props); + const next = { + ...props, + config, }; + const objects: ts.VariableStatement[] = + CheckerProgrammer.write_object_functions(next); + const unions: ts.VariableStatement[] = + CheckerProgrammer.write_union_functions(next); + const arrays: ts.VariableStatement[] = + CheckerProgrammer.write_array_functions(next); + const tuples: ts.VariableStatement[] = + CheckerProgrammer.write_tuple_functions(next); + + return [ + ...objects.filter((_, i) => + props.functor.hasLocal(`${config.prefix}o${i}`), + ), + ...unions.filter((_, i) => + props.functor.hasLocal(`${config.prefix}u${i}`), + ), + ...arrays.filter((_, i) => + props.functor.hasLocal(`${config.prefix}a${i}`), + ), + ...tuples.filter((_, i) => + props.functor.hasLocal(`${config.prefix}t${i}`), + ), + ]; + }; /* ----------------------------------------------------------- - DECODERS - ----------------------------------------------------------- */ - export const decode = (project: IProject) => (importer: FunctionImporter) => - CheckerProgrammer.decode(project)(configure()(project)(importer))(importer); - - export const decode_object = - (project: IProject) => (importer: FunctionImporter) => - CheckerProgrammer.decode_object(configure()(project)(importer))(importer); - - export const decode_to_json = - (checkNull: boolean) => - (input: ts.Expression): ts.Expression => - ts.factory.createLogicalAnd( - ExpressionFactory.isObject({ - checkArray: false, - checkNull, - })(input), - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("function"), - ValueFactory.TYPEOF(IdentifierFactory.access(input)("toJSON")), - ), - ); + DECODERS + ----------------------------------------------------------- */ + export const decode = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + metadata: Metadata; + input: ts.Expression; + explore: CheckerProgrammer.IExplore; + }) => + CheckerProgrammer.decode({ + context: props.context, + config: configure(props), + functor: props.functor, + metadata: props.metadata, + input: props.input, + explore: props.explore, + }); + + export const decode_object = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + object: MetadataObjectType; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; + }) => + CheckerProgrammer.decode_object({ + config: configure(props), + functor: props.functor, + object: props.object, + input: props.input, + explore: props.explore, + }); + + export const decode_to_json = (props: { + input: ts.Expression; + checkNull: boolean; + }): ts.Expression => + ts.factory.createLogicalAnd( + ExpressionFactory.isObject({ + checkArray: false, + checkNull: props.checkNull, + input: props.input, + }), + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("function"), + ValueFactory.TYPEOF(IdentifierFactory.access(props.input, "toJSON")), + ), + ); export const decode_functional = (input: ts.Expression) => ts.factory.createStrictEquality( diff --git a/src/programmers/RandomProgrammer.ts b/src/programmers/RandomProgrammer.ts index ef04f49b0d..a46a9967eb 100644 --- a/src/programmers/RandomProgrammer.ts +++ b/src/programmers/RandomProgrammer.ts @@ -1,8 +1,11 @@ +import { OpenApi } from "@samchon/openapi"; import ts from "typescript"; import { ExpressionFactory } from "../factories/ExpressionFactory"; import { IdentifierFactory } from "../factories/IdentifierFactory"; +import { LiteralFactory } from "../factories/LiteralFactory"; import { MetadataCollection } from "../factories/MetadataCollection"; +import { MetadataCommentTagFactory } from "../factories/MetadataCommentTagFactory"; import { MetadataFactory } from "../factories/MetadataFactory"; import { StatementFactory } from "../factories/StatementFactory"; import { TemplateFactory } from "../factories/TemplateFactory"; @@ -12,67 +15,89 @@ import { Metadata } from "../schemas/metadata/Metadata"; import { MetadataArray } from "../schemas/metadata/MetadataArray"; import { MetadataArrayType } from "../schemas/metadata/MetadataArrayType"; import { MetadataAtomic } from "../schemas/metadata/MetadataAtomic"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataMap } from "../schemas/metadata/MetadataMap"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; +import { MetadataSet } from "../schemas/metadata/MetadataSet"; import { MetadataTemplate } from "../schemas/metadata/MetadataTemplate"; import { MetadataTuple } from "../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../schemas/metadata/MetadataTupleType"; -import { IProject } from "../transformers/IProject"; +import { ITypiaContext } from "../transformers/ITypiaContext"; import { TransformerError } from "../transformers/TransformerError"; -import { Escaper } from "../utils/Escaper"; +import { StringUtil } from "../utils/StringUtil"; -import { Format } from "../tags"; import { FeatureProgrammer } from "./FeatureProgrammer"; -import { FunctionImporter } from "./helpers/FunctionImporter"; +import { FunctionProgrammer } from "./helpers/FunctionProgrammer"; import { RandomJoiner } from "./helpers/RandomJoiner"; -import { RandomRanger } from "./helpers/RandomRanger"; -import { random_custom } from "./internal/random_custom"; +import { json_schema_array } from "./internal/json_schema_array"; +import { json_schema_bigint } from "./internal/json_schema_bigint"; +import { json_schema_boolean } from "./internal/json_schema_boolean"; +import { json_schema_number } from "./internal/json_schema_number"; +import { json_schema_string } from "./internal/json_schema_string"; export namespace RandomProgrammer { - export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; type: ts.Type; name: string | undefined; init: ts.Expression | undefined; - }): FeatureProgrammer.IDecomposed => { + } + export interface IDecomposeProps { + context: ITypiaContext; + functor: FunctionProgrammer; + type: ts.Type; + name: string | undefined; + init: ts.Expression | undefined; + } + + export const decompose = ( + props: IDecomposeProps, + ): FeatureProgrammer.IDecomposed => { const collection: MetadataCollection = new MetadataCollection(); - const result = MetadataFactory.analyze( - props.project.checker, - props.project.context, - )({ - escape: false, - constant: true, - absorb: true, - validate: (meta) => { - const output: string[] = []; - if (meta.natives.some((n) => n === "WeakSet")) - output.push(`WeakSet is not supported.`); - else if (meta.natives.some((n) => n === "WeakMap")) - output.push(`WeakMap is not supported.`); - return output; + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: false, + constant: true, + absorb: true, + validate: (meta) => { + const output: string[] = []; + if (meta.natives.some((native) => native.name === "WeakSet")) + output.push(`WeakSet is not supported.`); + else if (meta.natives.some((native) => native.name === "WeakMap")) + output.push(`WeakMap is not supported.`); + return output; + }, }, - })(collection)(props.type); + collection, + type: props.type, + }); if (result.success === false) - throw TransformerError.from(`typia.${props.importer.method}`)( - result.errors, - ); + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); // GENERATE FUNCTION const functions: Record = Object.fromEntries([ - ...write_object_functions(props.importer)(collection).map((v, i) => [ - Prefix.object(i), - v, - ]), - ...write_array_functions(props.importer)(collection).map((v, i) => [ - Prefix.array(i), - v, - ]), - ...write_tuple_functions(props.importer)(collection).map((v, i) => [ - Prefix.tuple(i), - v, - ]), + ...write_object_functions({ + context: props.context, + functor: props.functor, + collection, + }).map((v, i) => [Prefix.object(i), v]), + ...write_array_functions({ + context: props.context, + functor: props.functor, + collection, + }).map((v, i) => [Prefix.array(i), v]), + ...write_tuple_functions({ + context: props.context, + functor: props.functor, + collection, + }).map((v, i) => [Prefix.tuple(i), v]), ]); const arrow: ts.ArrowFunction = ts.factory.createArrowFunction( undefined, @@ -80,24 +105,28 @@ export namespace RandomProgrammer { [ IdentifierFactory.parameter( "generator", - ts.factory.createTypeReferenceNode("Partial"), + ts.factory.createTypeReferenceNode("Partial", [ + props.context.importer.type({ + file: "typia", + name: "IRandomGenerator", + }), + ]), props.init ?? ts.factory.createToken(ts.SyntaxKind.QuestionToken), ), ], - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Resolved"), - [ + props.context.importer.type({ + file: "typia", + name: "Resolved", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - false, - ), + }), undefined, ts.factory.createBlock( [ @@ -109,10 +138,15 @@ export namespace RandomProgrammer { ), ), ts.factory.createReturnStatement( - decode(props.importer)({ - function: false, - recursive: false, - })(result.data), + decode({ + context: props.context, + functor: props.functor, + explore: { + function: false, + recursive: false, + }, + metadata: result.data, + }), ), ], true, @@ -120,45 +154,104 @@ export namespace RandomProgrammer { ); return { functions, - statements: [StatementFactory.mut("_generator")], + statements: [ + StatementFactory.mut({ + name: "_generator", + type: ts.factory.createUnionTypeNode([ + ts.factory.createTypeReferenceNode("Partial", [ + props.context.importer.type({ + file: "typia", + name: "IRandomGenerator", + }), + ]), + ts.factory.createTypeReferenceNode("undefined"), + ]), + }), + ], arrow, }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (init?: ts.Expression) => - (type: ts.Type, name?: string) => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps) => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - const write_object_functions = - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection.objects().map((obj, i) => - StatementFactory.constant( - Prefix.object(i), - ts.factory.createArrowFunction( + const write_object_functions = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection.objects().map((obj, i) => + StatementFactory.constant({ + name: Prefix.object(i), + value: ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "_recursive", + TypeFactory.keyword("boolean"), + ts.factory.createIdentifier(String(obj.recursive)), + ), + IdentifierFactory.parameter( + "_depth", + TypeFactory.keyword("number"), + ExpressionFactory.number(0), + ), + ], + TypeFactory.keyword("any"), + undefined, + RandomJoiner.object({ + decode: (metadata) => + decode({ + context: props.context, + functor: props.functor, + explore: { + recursive: obj.recursive, + function: true, + }, + metadata, + }), + object: obj, + }), + ), + }), + ); + + const write_array_functions = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .arrays() + .filter((a) => a.recursive) + .map((array, i) => + StatementFactory.constant({ + name: Prefix.array(i), + value: ts.factory.createArrowFunction( undefined, undefined, [ + IdentifierFactory.parameter( + "_schema", + TypeFactory.keyword("boolean"), + ), IdentifierFactory.parameter( "_recursive", TypeFactory.keyword("boolean"), - ts.factory.createIdentifier(String(obj.recursive)), + ts.factory.createTrue(), ), IdentifierFactory.parameter( "_depth", @@ -168,156 +261,188 @@ export namespace RandomProgrammer { ], TypeFactory.keyword("any"), undefined, - RandomJoiner.object(COALESCE(importer))( - decode(importer)({ - recursive: obj.recursive, - function: true, + RandomJoiner.array({ + decode: (metadata) => + decode({ + context: props.context, + functor: props.functor, + explore: { + recursive: true, + function: true, + }, + metadata, + }), + recursive: true, + expression: coalesce({ + context: props.context, + method: "array", + internal: "randomArray", }), - )(obj), + array, + schema: undefined, + }), ), - ), + }), ); - const write_array_functions = - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .arrays() - .filter((a) => a.recursive) - .map((array, i) => - StatementFactory.constant( - Prefix.array(i), - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "length", - TypeFactory.keyword("number"), - ), - IdentifierFactory.parameter( - "unique", - TypeFactory.keyword("boolean"), - ), - IdentifierFactory.parameter( - "_recursive", - TypeFactory.keyword("boolean"), - ts.factory.createTrue(), - ), - IdentifierFactory.parameter( - "_depth", - TypeFactory.keyword("number"), - ExpressionFactory.number(0), - ), - ], - TypeFactory.keyword("any"), - undefined, - RandomJoiner.array(COALESCE(importer))( - decode(importer)({ - recursive: true, - function: true, - }), - )({ - recursive: true, - function: true, - })( - ts.factory.createIdentifier("length"), - ts.factory.createIdentifier("unique"), - )(array.value), - ), - ), - ); - - const write_tuple_functions = - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .tuples() - .filter((a) => a.recursive) - .map((tuple, i) => - StatementFactory.constant( - Prefix.tuple(i), - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "_recursive", - TypeFactory.keyword("boolean"), - ts.factory.createTrue(), - ), - IdentifierFactory.parameter( - "_depth", - TypeFactory.keyword("number"), - ExpressionFactory.number(0), - ), - ], - TypeFactory.keyword("any"), - undefined, - RandomJoiner.tuple( - decode(importer)({ - function: true, - recursive: true, + const write_tuple_functions = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .tuples() + .filter((a) => a.recursive) + .map((tuple, i) => + StatementFactory.constant({ + name: Prefix.tuple(i), + value: ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "_recursive", + TypeFactory.keyword("boolean"), + ts.factory.createTrue(), + ), + IdentifierFactory.parameter( + "_depth", + TypeFactory.keyword("number"), + ExpressionFactory.number(0), + ), + ], + TypeFactory.keyword("any"), + undefined, + RandomJoiner.tuple({ + decode: (metadata) => + decode({ + context: props.context, + functor: props.functor, + explore: { + function: true, + recursive: true, + }, + metadata, }), - )(tuple.elements), - ), + elements: tuple.elements, + }), ), - ); + }), + ); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - const decode = - (importer: FunctionImporter) => - (explore: IExplore) => - (meta: Metadata): ts.Expression => { - const expressions: ts.Expression[] = []; - if (meta.any) - expressions.push(ts.factory.createStringLiteral("any type used...")); - - // NULL COALESCING - if (meta.isRequired() === false || meta.functions.length) - expressions.push(ts.factory.createIdentifier("undefined")); - if (meta.nullable === true) expressions.push(ts.factory.createNull()); - - // CONSTANT TYPES - for (const constant of meta.constants) - for (const { value } of constant.values) - expressions.push(decode_atomic(value)); - - // ATOMIC VARIABLES - for (const template of meta.templates) - expressions.push(decode_template(importer)(explore)(template)); - for (const atomic of meta.atomics) - if (atomic.type === "boolean") - expressions.push(decode_boolean(importer)); - else if (atomic.type === "number") - expressions.push(...decode_number(importer)(atomic)); - else if (atomic.type === "string") - expressions.push(...decode_string(importer)(atomic)); - else if (atomic.type === "bigint") - expressions.push(...decode_bigint(importer)(atomic)); - - // INSTANCE TYPES - if (meta.escaped) - expressions.push(decode(importer)(explore)(meta.escaped.returns)); - for (const array of meta.arrays) - expressions.push(...decode_array(importer)(explore)(array)); - for (const tuple of meta.tuples) - expressions.push(decode_tuple(importer)(explore)(tuple)); - for (const o of meta.objects) - expressions.push(decode_object(importer)(explore)(o)); - for (const native of meta.natives) - expressions.push(decode_native(importer)(native)); - for (const set of meta.sets) - expressions.push(decode_set(importer)(explore)(set)); - for (const map of meta.maps) - expressions.push(decode_map(importer)(explore)(map)); - - // PICK UP A TYPE - if (expressions.length === 1) return expressions[0]!; - return ts.factory.createCallExpression( - ts.factory.createCallExpression(importer.use("pick"), undefined, [ + const decode = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + metadata: Metadata; + }): ts.Expression => { + const expressions: ts.Expression[] = []; + if (props.metadata.any === true) + expressions.push(ts.factory.createStringLiteral("any type used...")); + + // NULL COALESCING + if ( + props.metadata.isRequired() === false || + props.metadata.functions.length !== 0 + ) + expressions.push(ts.factory.createIdentifier("undefined")); + if (props.metadata.nullable === true) + expressions.push(ts.factory.createNull()); + + // CONSTANT TYPES + for (const constant of props.metadata.constants) + for (const { value } of constant.values) + expressions.push( + constant.type === "boolean" + ? value === true + ? ts.factory.createTrue() + : ts.factory.createFalse() + : constant.type === "bigint" + ? ExpressionFactory.bigint(value as bigint) + : constant.type === "number" + ? ExpressionFactory.number(value as number) + : ts.factory.createStringLiteral(value as string), + ); + + // ATOMIC VARIABLES + for (const template of props.metadata.templates) + expressions.push( + decode_template({ + ...props, + template, + }), + ); + for (const atomic of props.metadata.atomics) + expressions.push( + ...decode_atomic({ + context: props.context, + atomic, + }), + ); + + // INSTANCE TYPES + if (props.metadata.escaped) + expressions.push( + decode({ + ...props, + metadata: props.metadata.escaped.returns, + }), + ); + for (const array of props.metadata.arrays) + expressions.push( + ...decode_array({ + ...props, + array, + }), + ); + for (const tuple of props.metadata.tuples) + expressions.push( + decode_tuple({ + ...props, + tuple, + }), + ); + for (const object of props.metadata.objects) + expressions.push( + decode_object({ + ...props, + object: object.type, + }), + ); + for (const native of props.metadata.natives) + expressions.push( + decode_native({ + context: props.context, + functor: props.functor, + explore: props.explore, + name: native.name, + }), + ); + for (const set of props.metadata.sets) + expressions.push( + decode_set({ + ...props, + set, + }), + ); + for (const entry of props.metadata.maps) + expressions.push( + decode_map({ + ...props, + map: entry, + }), + ); + + // PICK UP A TYPE + if (expressions.length === 1) return expressions[0]!; + return ts.factory.createCallExpression( + ts.factory.createCallExpression( + props.context.importer.internal("randomPick"), + undefined, + [ ts.factory.createArrayLiteralExpression( expressions.map((expr) => ts.factory.createArrowFunction( @@ -331,625 +456,735 @@ export namespace RandomProgrammer { ), true, ), - ]), - undefined, - undefined, - ); - }; - - const decode_boolean = (importer: FunctionImporter) => - ts.factory.createCallExpression( - COALESCE(importer)("boolean"), + ], + ), undefined, undefined, ); + }; - const decode_atomic = (value: Atomic) => - typeof value === "boolean" - ? ts.factory.createIdentifier(value.toString()) - : typeof value === "number" - ? ExpressionFactory.number(value) - : typeof value === "string" - ? ts.factory.createStringLiteral(value) - : ExpressionFactory.bigint(Number(value)); - - const decode_template = - (importer: FunctionImporter) => - (explore: IExplore) => - (template: MetadataTemplate) => - TemplateFactory.generate( - template.row.map((meta) => decode(importer)(explore)(meta)), - ); - - const decode_number = - (importer: FunctionImporter) => - (atomic: MetadataAtomic): ts.Expression[] => - (atomic.tags.length ? atomic.tags : [[]]).map((tags) => { - const type = tags.find( - (t) => - t.kind === "type" && (t.value === "int32" || t.value === "int64"), - ) - ? "int" - : tags.find( - (t) => - t.kind === "type" && - (t.value === "uint32" || t.value === "uint64"), - ) - ? "uint" - : "double"; - const multiply = tags.find((t) => t.kind === "multipleOf"); - return random_custom(COALESCE(importer))("number")(tags)( - RandomRanger.number({ - type, - transform: (value) => ExpressionFactory.number(value), - setter: (args) => - ts.factory.createCallExpression( - type !== "double" || multiply !== undefined - ? COALESCE(importer)("integer") - : COALESCE(importer)("number"), - undefined, - args.map((val) => ExpressionFactory.number(val)), - ), - })({ - minimum: 0, - maximum: 100, - gap: 10, - })(tags), - ); - }); - - const decode_bigint = - (importer: FunctionImporter) => - (atomic: MetadataAtomic): ts.Expression[] => - (atomic.tags.length ? atomic.tags : [[]]).map((tags) => - random_custom(COALESCE(importer))("bigint")(tags)( - RandomRanger.number({ - type: tags.find( - (t) => - t.kind === "type" && - (t.value === "uint" || t.value === "uint64"), - ) - ? "uint" - : "int", - transform: (value) => ExpressionFactory.bigint(value), - setter: (args) => - ts.factory.createCallExpression( - COALESCE(importer)("bigint"), - undefined, - args.map((value) => ExpressionFactory.bigint(value)), - ), - })({ - minimum: 0, - maximum: 100, - gap: 10, - })(tags), - ), - ); - - const decode_string = - (importer: FunctionImporter) => - (atomic: MetadataAtomic): ts.Expression[] => - (atomic.tags.length ? atomic.tags : [[]]).map((tags) => - random_custom(COALESCE(importer))("string")(tags)( - (() => { - for (const t of tags) - if (t.kind === "format") - return ts.factory.createCallExpression( - COALESCE(importer)(emendFormat(t.value)), - undefined, - undefined, - ); - else if (t.kind === "pattern") - return ts.factory.createCallExpression( - COALESCE(importer)("pattern"), + const decode_atomic = (props: { + context: ITypiaContext; + atomic: MetadataAtomic; + }) => { + const schemaList: OpenApi.IJsonSchema[] = + props.atomic.type === "boolean" + ? json_schema_boolean(props.atomic) + : props.atomic.type === "string" + ? json_schema_string(props.atomic) + : props.atomic.type === "bigint" + ? json_schema_bigint(props.atomic) + : json_schema_number(props.atomic); + return schemaList.map((schema) => { + interface IComposed { + method: string; + internal: string; + arguments: ts.Expression[]; + } + const composed = ((): IComposed => { + if (props.atomic.type === "string") { + const string: OpenApi.IJsonSchema.IString = + schema as OpenApi.IJsonSchema.IString; + if (string.format !== undefined) { + const format: string = string.format!; + if (format === "date-time") + return { + method: "datetime", + internal: "randomFormatDatetime", + arguments: [], + }; + return { + method: format + .split("-") + .map((s, i) => (i === 0 ? s : StringUtil.capitalize(s))) + .join(""), + internal: `randomFormat${format + .split("-") + .map(StringUtil.capitalize) + .join("")}`, + arguments: [], + }; + } else if (string.pattern !== undefined) + return { + method: "pattern", + internal: "randomPattern", + arguments: [ + ts.factory.createNewExpression( + ts.factory.createIdentifier("RegExp"), undefined, [ - ts.factory.createIdentifier( - `RegExp(${JSON.stringify(t.value)})`, + ts.factory.createStringLiteral( + (schema as OpenApi.IJsonSchema.IString).pattern!, ), ], - ); - - const tail = RandomRanger.length(COALESCE(importer))({ - minimum: 5, - maximum: 25, - gap: 5, - })({ - minimum: "minLength", - maximum: "maxLength", - })(tags); - return ts.factory.createCallExpression( - COALESCE(importer)("string"), - undefined, - tail ? [tail] : undefined, - ); - })(), + ), + ], + }; + } else if (props.atomic.type === "number") { + const number: + | OpenApi.IJsonSchema.INumber + | OpenApi.IJsonSchema.IInteger = schema as + | OpenApi.IJsonSchema.INumber + | OpenApi.IJsonSchema.IInteger; + if (number.type === "integer") + return { + method: "integer", + internal: "randomInteger", + arguments: [LiteralFactory.write(schema)], + }; + } + return { + method: props.atomic.type, + internal: `random${StringUtil.capitalize(props.atomic.type)}`, + arguments: [LiteralFactory.write(schema)], + }; + })(); + return ts.factory.createCallExpression( + ExpressionFactory.coalesce( + ts.factory.createPropertyAccessChain( + ts.factory.createIdentifier("_generator"), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + ts.factory.createIdentifier(composed.method), + ), + props.context.importer.internal(composed.internal), ), + undefined, + composed.arguments, ); + }); + }; - const decode_array = - (importer: FunctionImporter) => - (explore: IExplore) => - (array: MetadataArray): ts.Expression[] => { - const fixed: Array< - [ts.Expression | undefined, ts.Expression | undefined] - > = (array.tags.length ? array.tags : [[]]).map((tags) => [ - RandomRanger.length(COALESCE(importer))({ - minimum: 0, - maximum: 3, - gap: 3, - })({ - minimum: "minItems", - maximum: "maxItems", - })(tags), - (() => { - const uniqueItems = tags.find((t) => t.kind === "uniqueItems"); - return uniqueItems === undefined - ? undefined - : uniqueItems.value === false - ? ts.factory.createFalse() - : ts.factory.createTrue(); - })(), - ]); - if (array.type.recursive) - return fixed.map(([len, unique]) => - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(Prefix.array(array.type.index!)), - ), - undefined, - [ - len ?? COALESCE(importer)("length"), - unique ?? ts.factory.createFalse(), - ts.factory.createTrue(), - explore.recursive - ? ts.factory.createAdd( - ExpressionFactory.number(1), - ts.factory.createIdentifier("_depth"), - ) - : ExpressionFactory.number(0), - ], + const decode_template = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + template: MetadataTemplate; + }) => + TemplateFactory.generate( + props.template.row.map((metadata) => + decode({ + ...props, + metadata, + }), + ), + ); + + const decode_array = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + array: MetadataArray; + }): ts.Expression[] => { + const components: OpenApi.IComponents = {}; + const schemaList: OpenApi.IJsonSchema.IArray[] = json_schema_array({ + components, + array: props.array, + }) as OpenApi.IJsonSchema.IArray[]; + if (props.array.type.recursive) + return schemaList.map((schema) => + ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(Prefix.array(props.array.type.index!)), ), - ); - return fixed.map(([len, unique]) => { - const expr: ts.Expression = RandomJoiner.array(COALESCE(importer))( - decode(importer)(explore), - )(explore)( - len, - unique, - )(array.type.value); - return explore.recursive - ? ts.factory.createConditionalExpression( - ts.factory.createLogicalAnd( - ts.factory.createIdentifier("_recursive"), - ts.factory.createLessThan( - ExpressionFactory.number(5), - ts.factory.createIdentifier("_depth"), + undefined, + [ + ts.factory.createObjectLiteralExpression( + Object.entries(schema) + .filter(([key]) => key !== "items") + .map(([key, value]) => + ts.factory.createPropertyAssignment( + key, + LiteralFactory.write(value), + ), ), - ), - undefined, - ts.factory.createIdentifier("[]"), - undefined, - expr, - ) - : expr; - }); - }; - - const decode_tuple = - (importer: FunctionImporter) => - (explore: IExplore) => - (tuple: MetadataTuple): ts.Expression => - tuple.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(Prefix.tuple(tuple.type.index!)), + true, ), - undefined, - [ - ts.factory.createTrue(), - explore.recursive - ? ts.factory.createAdd( - ExpressionFactory.number(1), - ts.factory.createIdentifier("_depth"), - ) - : ExpressionFactory.number(0), - ], - ) - : RandomJoiner.tuple(decode(importer)(explore))(tuple.type.elements); - - const decode_object = - (importer: FunctionImporter) => - (explore: IExplore) => - (object: MetadataObject) => - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(Prefix.object(object.index)), + ], ), - undefined, - explore.function - ? [ - explore.recursive - ? ts.factory.createTrue() - : ts.factory.createIdentifier("_recursive"), - ts.factory.createConditionalExpression( - ts.factory.createIdentifier("_recursive"), - undefined, - ts.factory.createAdd( + ); + return schemaList.map((schema) => + RandomJoiner.array({ + decode: (metadata) => + decode({ + ...props, + metadata, + }), + expression: coalesce({ + context: props.context, + method: "array", + internal: "randomArray", + }), + array: props.array.type, + recursive: props.explore.recursive, + schema, + }), + ); + }; + + const decode_tuple = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + tuple: MetadataTuple; + }): ts.Expression => + props.tuple.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(Prefix.tuple(props.tuple.type.index!)), + ), + undefined, + [ + ts.factory.createTrue(), + props.explore.recursive + ? ts.factory.createAdd( ExpressionFactory.number(1), ts.factory.createIdentifier("_depth"), - ), - undefined, + ) + : ExpressionFactory.number(0), + ], + ) + : RandomJoiner.tuple({ + decode: (metadata) => + decode({ + ...props, + metadata, + }), + elements: props.tuple.type.elements, + }); + + const decode_object = (props: { + functor: FunctionProgrammer; + explore: IExplore; + object: MetadataObjectType; + }) => + ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(Prefix.object(props.object.index)), + ), + undefined, + props.explore.function + ? [ + props.explore.recursive + ? ts.factory.createTrue() + : ts.factory.createIdentifier("_recursive"), + ts.factory.createConditionalExpression( + ts.factory.createIdentifier("_recursive"), + undefined, + ts.factory.createAdd( + ExpressionFactory.number(1), ts.factory.createIdentifier("_depth"), ), - ] - : undefined, - ); + undefined, + ts.factory.createIdentifier("_depth"), + ), + ] + : undefined, + ); /* ----------------------------------------------------------- NATIVE CLASSES ----------------------------------------------------------- */ - const decode_set = - (importer: FunctionImporter) => (explore: IExplore) => (meta: Metadata) => - ts.factory.createNewExpression( - ts.factory.createIdentifier("Set"), - undefined, - [ - decode_array(importer)(explore)( - MetadataArray.create({ - tags: [], - type: MetadataArrayType.create({ - value: meta, - recursive: false, - index: null, - nullables: [], - name: `Set<${meta.getName()}>`, - }), + const decode_set = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + set: MetadataSet; + }) => + ts.factory.createNewExpression( + ts.factory.createIdentifier("Set"), + undefined, + [ + decode_array({ + ...props, + array: MetadataArray.create({ + tags: [], + type: MetadataArrayType.create({ + value: props.set.value, + recursive: false, + index: null, + nullables: [], + name: props.set.getName(), }), - )[0]!, - ], - ); + }), + })[0]!, + ], + ); - const decode_map = - (importer: FunctionImporter) => - (explore: IExplore) => - (map: Metadata.Entry) => - ts.factory.createNewExpression( - ts.factory.createIdentifier("Map"), - undefined, - [ - decode_array(importer)(explore)( - MetadataArray.create({ - tags: [], - type: MetadataArrayType.create({ - name: `Map<${map.key.getName()}, ${map.value.getName()}>`, - index: null, - recursive: false, - nullables: [], - value: Metadata.create({ - ...Metadata.initialize(), - tuples: [ - (() => { - const type = MetadataTupleType.create({ - name: `[${map.key.getName()}, ${map.value.getName()}]`, - index: null, - recursive: false, - nullables: [], - elements: [map.key, map.value], - }); - type.of_map = true; - return MetadataTuple.create({ - type, - tags: [], - }); - })(), - ], - }), + const decode_map = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + map: MetadataMap; + }) => + ts.factory.createNewExpression( + ts.factory.createIdentifier("Map"), + undefined, + [ + decode_array({ + ...props, + array: MetadataArray.create({ + tags: [], + type: MetadataArrayType.create({ + name: props.map.getName(), + index: null, + recursive: false, + nullables: [], + value: Metadata.create({ + ...Metadata.initialize(), + tuples: [ + (() => { + const type = MetadataTupleType.create({ + name: `[${props.map.key.getName()}, ${props.map.value.getName()}]`, + index: null, + recursive: false, + nullables: [], + elements: [props.map.key, props.map.value], + }); + type.of_map = true; + return MetadataTuple.create({ + type, + tags: [], + }); + })(), + ], }), }), - )[0]!, - ], - ); - - const decode_native = - (importer: FunctionImporter) => - (type: string): ts.Expression => { - if (type === "Boolean") return decode_boolean(importer); - else if (type === "Number") - return decode_number(importer)( - MetadataAtomic.create({ - type: "number", - tags: [], - }), - )[0]!; - else if (type === "String") - return decode_string(importer)( - MetadataAtomic.create({ - type: "string", - tags: [], }), - )[0]!; - else if (type === "Date") return decode_native_date(importer); - else if ( - type === "Uint8Array" || - type === "Uint8ClampedArray" || - type === "Uint16Array" || - type === "Uint32Array" || - type === "BigUint64Array" || - type === "Int8Array" || - type === "Int16Array" || - type === "Int32Array" || - type === "BigInt64Array" || - type === "Float32Array" || - type === "Float64Array" - ) - return decode_native_byte_array(importer)(type); - else if (type === "ArrayBuffer" || type === "SharedArrayBuffer") - return decode_native_array_buffer(importer)(type); - else if (type === "DataView") return decode_native_data_view(importer); - else if (type === "Blob") return decode_native_blob(importer); - else if (type === "File") return decode_native_file(importer); - else if (type === "RegExp") return decode_regexp(); - else - return ts.factory.createNewExpression( - ts.factory.createIdentifier(type), - undefined, - [], - ); - }; + })[0]!, + ], + ); + + const decode_native = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + name: string; + }): ts.Expression => { + if ( + props.name === "Boolean" || + props.name === "Number" || + props.name === "BigInt" || + props.name === "String" + ) + return decode_atomic({ + context: props.context, + atomic: MetadataAtomic.create({ + type: props.name.toLowerCase() as "string", + tags: [], + }), + })[0]!; + else if (props.name === "Date") return decode_native_date(props.context); + else if ( + props.name === "Uint8Array" || + props.name === "Uint8ClampedArray" || + props.name === "Uint16Array" || + props.name === "Uint32Array" || + props.name === "BigUint64Array" || + props.name === "Int8Array" || + props.name === "Int16Array" || + props.name === "Int32Array" || + props.name === "BigInt64Array" || + props.name === "Float32Array" || + props.name === "Float64Array" + ) + return decode_native_byte_array({ + ...props, + name: props.name, + }); + else if (props.name === "ArrayBuffer" || props.name === "SharedArrayBuffer") + return decode_native_array_buffer({ + ...props, + name: props.name, + }); + else if (props.name === "DataView") return decode_native_data_view(props); + else if (props.name === "Blob") return decode_native_blob(props); + else if (props.name === "File") return decode_native_file(props); + else if (props.name === "RegExp") return decode_regexp(props.context); + else + return ts.factory.createNewExpression( + ts.factory.createIdentifier(props.name), + undefined, + [], + ); + }; - const decode_native_date = (importer: FunctionImporter) => + const decode_native_date = (context: ITypiaContext) => ts.factory.createNewExpression( ts.factory.createIdentifier("Date"), undefined, [ ts.factory.createCallExpression( - COALESCE(importer)("datetime"), + coalesce({ + context, + method: "datetime", + internal: "randomFormatDatetime", + }), undefined, [], ), ], ); - const decode_native_byte_array = - (importer: FunctionImporter) => - ( - type: - | "Uint8Array" - | "Uint8ClampedArray" - | "Uint16Array" - | "Uint32Array" - | "BigUint64Array" - | "Int8Array" - | "Int16Array" - | "Int32Array" - | "BigInt64Array" - | "Float32Array" - | "Float64Array", - ): ts.Expression => { - new BigInt64Array(); - const [minimum, maximum]: [number, number] = (() => { - if (type === "Uint8Array" || type === "Uint8ClampedArray") - return [0, 255]; - else if (type === "Uint16Array") return [0, 65535]; - else if (type === "Uint32Array") return [0, 4294967295]; - else if (type === "BigUint64Array") return [0, 18446744073709551615]; - else if (type === "Int8Array") return [-128, 127]; - else if (type === "Int16Array") return [-32768, 32767]; - else if (type === "Int32Array") return [-2147483648, 2147483647]; - else if (type === "BigInt64Array") - return [-9223372036854775808, 9223372036854775807]; - else if (type === "Float32Array") - return [-1.175494351e38, 3.4028235e38]; - return [Number.MIN_VALUE, Number.MAX_VALUE]; - })(); - const literal = - type === "BigInt64Array" || type === "BigUint64Array" - ? ExpressionFactory.bigint - : ExpressionFactory.number; - return ts.factory.createNewExpression( - ts.factory.createIdentifier(type), - [], - [ - ts.factory.createCallExpression( - COALESCE(importer)("array"), - undefined, + const decode_native_byte_array = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + name: + | "Uint8Array" + | "Uint8ClampedArray" + | "Uint16Array" + | "Uint32Array" + | "BigUint64Array" + | "Int8Array" + | "Int16Array" + | "Int32Array" + | "BigInt64Array" + | "Float32Array" + | "Float64Array"; + }): ts.Expression => { + new BigInt64Array(); + const [type, minimum, maximum]: [string, number, number] = (() => { + if (props.name === "Uint8Array" || props.name === "Uint8ClampedArray") + return ["uint32", 0, 255]; + else if (props.name === "Uint16Array") return ["uint32", 0, 65535]; + else if (props.name === "Uint32Array") return ["uint32", 0, 4294967295]; + else if (props.name === "BigUint64Array") + return ["uint64", 0, 18446744073709551615]; + else if (props.name === "Int8Array") return ["int32", -128, 127]; + else if (props.name === "Int16Array") return ["int32", -32768, 32767]; + else if (props.name === "Int32Array") + return ["int32", -2147483648, 2147483647]; + else if (props.name === "BigInt64Array") + return ["uint64", -9223372036854775808, 9223372036854775807]; + else if (props.name === "Float32Array") + return ["float", -1.175494351e38, 3.4028235e38]; + return ["double", Number.MIN_VALUE, Number.MAX_VALUE]; + })(); + const atomic: "bigint" | "number" = + props.name === "BigInt64Array" || props.name === "BigUint64Array" + ? "bigint" + : "number"; + const value: Metadata = Metadata.create({ + ...Metadata.initialize(), + atomics: [ + MetadataAtomic.create({ + type: atomic, + tags: [ [ - ts.factory.createArrowFunction( - undefined, - undefined, - [], - TypeFactory.keyword("any"), - undefined, - ts.factory.createCallExpression( - COALESCE(importer)( - type === "Float32Array" || type === "Float64Array" - ? "number" - : type === "BigInt64Array" || type === "BigUint64Array" - ? "bigint" - : "integer", - ), - undefined, - [literal(minimum), literal(maximum)], - ), - ), + ...MetadataCommentTagFactory.get({ + kind: "type", + type: atomic, + value: type, + }), + ...MetadataCommentTagFactory.get({ + kind: "minimum", + type: "number", + value: minimum.toString(), + }), + ...MetadataCommentTagFactory.get({ + kind: "maximum", + type: "number", + value: maximum.toString(), + }), ], - ), - ], - ); - }; + ], + }), + ], + }); + return ts.factory.createNewExpression( + ts.factory.createIdentifier(props.name), + [], + decode_array({ + context: props.context, + functor: props.functor, + explore: props.explore, + array: MetadataArray.create({ + tags: [], + type: MetadataArrayType.create({ + name: `${props.name}<${atomic}>`, + value, + recursive: false, + index: null, + nullables: [], + }), + }), + }), + ); + }; - const decode_native_blob = (importer: FunctionImporter) => + const decode_native_blob = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + }) => ts.factory.createNewExpression( ts.factory.createIdentifier("Blob"), undefined, [ ts.factory.createArrayLiteralExpression( - [decode_native_byte_array(importer)("Uint8Array")], + [ + decode_native_byte_array({ + context: props.context, + functor: props.functor, + explore: props.explore, + name: "Uint8Array", + }), + ], true, ), ], ); - const decode_native_file = (importer: FunctionImporter) => + const decode_native_file = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + }) => ts.factory.createNewExpression( ts.factory.createIdentifier("File"), undefined, [ ts.factory.createArrayLiteralExpression( - [decode_native_byte_array(importer)("Uint8Array")], + [ + decode_native_byte_array({ + context: props.context, + functor: props.functor, + explore: props.explore, + name: "Uint8Array", + }), + ], true, ), ts.factory.createTemplateExpression(ts.factory.createTemplateHead(""), [ ts.factory.createTemplateSpan( - ts.factory.createCallExpression( - COALESCE(importer)("string"), - undefined, - [ts.factory.createNumericLiteral(8)], - ), + writeRangedString({ + context: props.context, + minLength: 1, + maxLength: 8, + }), ts.factory.createTemplateMiddle("."), ), ts.factory.createTemplateSpan( - ts.factory.createCallExpression( - COALESCE(importer)("string"), - undefined, - [ts.factory.createNumericLiteral(3)], - ), + writeRangedString({ + context: props.context, + minLength: 3, + maxLength: 3, + }), ts.factory.createTemplateTail(""), ), ]), ], ); - const decode_native_array_buffer = - (importer: FunctionImporter) => - (type: "ArrayBuffer" | "SharedArrayBuffer"): ts.Expression => - type === "ArrayBuffer" - ? IdentifierFactory.access( - decode_native_byte_array(importer)("Uint8Array"), - )("buffer") - : ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - StatementFactory.constant( - "length", - ts.factory.createCallExpression( - COALESCE(importer)("integer"), - undefined, - [], - ), + const decode_native_array_buffer = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + name: "ArrayBuffer" | "SharedArrayBuffer"; + }): ts.Expression => + props.name === "ArrayBuffer" + ? IdentifierFactory.access( + decode_native_byte_array({ + context: props.context, + functor: props.functor, + explore: props.explore, + name: "Uint8Array", + }), + "buffer", + ) + : ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + StatementFactory.constant({ + name: "length", + value: decode_atomic({ + context: props.context, + atomic: MetadataAtomic.create({ + type: "number", + tags: [ + MetadataCommentTagFactory.get({ + type: "number", + kind: "type", + value: "uint32", + }), + ], + }), + })[0]!, + }), + StatementFactory.constant({ + name: "buffer", + value: ts.factory.createNewExpression( + ts.factory.createIdentifier("SharedArrayBuffer"), + [], + [ts.factory.createIdentifier("length")], ), - StatementFactory.constant( - "buffer", - ts.factory.createNewExpression( - ts.factory.createIdentifier("SharedArrayBuffer"), - [], - [ts.factory.createIdentifier("length")], - ), + }), + StatementFactory.constant({ + name: "bytes", + value: ts.factory.createNewExpression( + ts.factory.createIdentifier("Uint8Array"), + [], + [ts.factory.createIdentifier("buffer")], ), - StatementFactory.constant( - "bytes", - ts.factory.createNewExpression( - ts.factory.createIdentifier("Uint8Array"), - [], - [ts.factory.createIdentifier("buffer")], + }), + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier("bytes"), + "set", ), - ), - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createIdentifier("bytes"), - )("set"), - undefined, - [ - ts.factory.createCallExpression( - COALESCE(importer)("array"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [], - TypeFactory.keyword("any"), - undefined, - ts.factory.createCallExpression( - COALESCE(importer)("integer"), + undefined, + [ + ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression( + ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression( + ts.factory.createNewExpression( + ts.factory.createIdentifier("Array"), undefined, - [ - ExpressionFactory.number(0), - ExpressionFactory.number(255), - ], + [ts.factory.createIdentifier("length")], ), + ts.factory.createIdentifier("fill"), ), - ts.factory.createIdentifier("length"), - ], + undefined, + [ts.factory.createNumericLiteral("0")], + ), + ts.factory.createIdentifier("map"), ), - ExpressionFactory.number(0), - ], - ), - ), - ts.factory.createReturnStatement( - ts.factory.createIdentifier("buffer"), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [], + undefined, + undefined, + decode_atomic({ + context: props.context, + atomic: MetadataAtomic.create({ + type: "number", + tags: [ + [ + ...MetadataCommentTagFactory.get({ + kind: "type", + type: "number", + value: "uint32", + }), + ...MetadataCommentTagFactory.get({ + kind: "minimum", + type: "number", + value: "0", + }), + ...MetadataCommentTagFactory.get({ + kind: "maximum", + type: "number", + value: "255", + }), + ], + ], + }), + })[0]!, + ), + ], + ), + ExpressionFactory.number(0), + ], ), - ], - true, - ), - ); + ), + ts.factory.createReturnStatement( + ts.factory.createIdentifier("buffer"), + ), + ], + true, + ), + ); - const decode_native_data_view = (importer: FunctionImporter) => + const decode_native_data_view = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + explore: IExplore; + }) => ts.factory.createNewExpression( ts.factory.createIdentifier("DataView"), [], [ IdentifierFactory.access( - decode_native_byte_array(importer)("Uint8Array"), - )("buffer"), + decode_native_byte_array({ + context: props.context, + functor: props.functor, + explore: props.explore, + name: "Uint8Array", + }), + "buffer", + ), ], ); - const decode_regexp = () => + const decode_regexp = (context: ITypiaContext) => ts.factory.createNewExpression( ts.factory.createIdentifier("RegExp"), [], - [ts.factory.createIdentifier("/(?:)/")], + [ + ts.factory.createCallExpression( + coalesce({ + context, + method: "regex", + internal: "randomFormatRegex", + }), + undefined, + undefined, + ), + ], ); + + const writeRangedString = (props: { + context: ITypiaContext; + minLength: number; + maxLength: number; + }): ts.CallExpression => + decode_atomic({ + context: props.context, + atomic: MetadataAtomic.create({ + type: "string", + tags: [ + [ + ...MetadataCommentTagFactory.get({ + kind: "minLength", + type: "string", + value: props.minLength.toString(), + }), + ...MetadataCommentTagFactory.get({ + kind: "maxLength", + type: "string", + value: props.maxLength.toString(), + }), + ], + ], + }), + })[0]!; } -type Atomic = boolean | number | string | bigint; +const coalesce = (props: { + context: ITypiaContext; + method: string; + internal: string; +}): ts.Expression => + ExpressionFactory.coalesce( + ts.factory.createPropertyAccessChain( + ts.factory.createIdentifier("_generator"), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + ts.factory.createIdentifier(props.method), + ), + props.context.importer.internal(props.internal), + ); + interface IExplore { function: boolean; recursive: boolean; } const Prefix = { - object: (i: number) => `$ro${i}`, - array: (i: number) => `$ra${i}`, - tuple: (i: number) => `$rt${i}`, + object: (i: number) => `_ro${i}`, + array: (i: number) => `_ra${i}`, + tuple: (i: number) => `_rt${i}`, }; - -const COALESCE = (importer: FunctionImporter) => (name: string) => - ExpressionFactory.coalesce( - Escaper.variable(name) - ? ts.factory.createPropertyAccessChain( - ts.factory.createIdentifier("_generator"), - ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), - ts.factory.createIdentifier(name), - ) - : ts.factory.createElementAccessChain( - ts.factory.createIdentifier("_generator"), - ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), - ts.factory.createStringLiteral(name), - ), - )(IdentifierFactory.access(importer.use("generator"))(name)); - -const emendFormat = (key: keyof Format.Validator) => - key === "date-time" - ? "datetime" - : key - .split("-") - .map((str, i) => - i === 0 || str.length === 0 - ? str - : str[0]!.toUpperCase() + str.substring(1), - ) - .join(""); diff --git a/src/programmers/TypiaProgrammer.ts b/src/programmers/TypiaProgrammer.ts index 67d9fc1384..b1742649b7 100644 --- a/src/programmers/TypiaProgrammer.ts +++ b/src/programmers/TypiaProgrammer.ts @@ -7,47 +7,54 @@ import { ImportTransformer } from "../transformers/ImportTransformer"; import transform from "../transform"; export namespace TypiaProgrammer { - export interface IProps { + export interface ILocation { input: string; output: string; project: string; } - export const build = async (props: TypiaProgrammer.IProps): Promise => { - props.input = path.resolve(props.input); - props.output = path.resolve(props.output); + export const build = async ( + location: TypiaProgrammer.ILocation, + ): Promise => { + location.input = path.resolve(location.input); + location.output = path.resolve(location.output); - if ((await is_directory(props.input)) === false) + if ((await is_directory(location.input)) === false) throw new URIError( "Error on TypiaGenerator.generate(): input path is not a directory.", ); - else if (fs.existsSync(props.output) === false) - await fs.promises.mkdir(props.output, { recursive: true }); - else if ((await is_directory(props.output)) === false) { - const parent: string = path.join(props.output, ".."); + else if (fs.existsSync(location.output) === false) + await fs.promises.mkdir(location.output, { recursive: true }); + else if ((await is_directory(location.output)) === false) { + const parent: string = path.join(location.output, ".."); if ((await is_directory(parent)) === false) throw new URIError( "Error on TypiaGenerator.generate(): output path is not a directory.", ); - await fs.promises.mkdir(props.output); + await fs.promises.mkdir(location.output); } // CREATE PROGRAM const { options: compilerOptions } = ts.parseJsonConfigFileContent( - ts.readConfigFile(props.project, ts.sys.readFile).config, + ts.readConfigFile(location.project, ts.sys.readFile).config, { fileExists: ts.sys.fileExists, readFile: ts.sys.readFile, readDirectory: ts.sys.readDirectory, useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, }, - path.dirname(props.project), + path.dirname(location.project), ); const program: ts.Program = ts.createProgram( await (async () => { const container: string[] = []; - await gather(props)(container)(props.input)(props.output); + await gather({ + location, + container, + from: location.input, + to: location.output, + }); return container; })(), compilerOptions, @@ -61,10 +68,13 @@ export namespace TypiaProgrammer { .filter( (file) => !file.isDeclarationFile && - path.resolve(file.fileName).indexOf(props.input) !== -1, + path.resolve(file.fileName).indexOf(location.input) !== -1, ), [ - ImportTransformer.transform(props.input)(props.output), + ImportTransformer.transform({ + from: location.input, + to: location.output, + }), transform( program, ((compilerOptions.plugins as any[]) ?? []).find( @@ -117,7 +127,7 @@ export namespace TypiaProgrammer { for (const file of result.transformed) { const to: string = path .resolve(file.fileName) - .replace(props.input, props.output); + .replace(location.input, location.output); const content: string = printer.printFile(file); await fs.promises.writeFile(to, content, "utf8"); @@ -129,24 +139,31 @@ export namespace TypiaProgrammer { return stat.isDirectory(); }; - const gather = - (props: IProps) => - (container: string[]) => - (from: string) => - async (to: string) => { - if (from === props.output) return; - else if (fs.existsSync(to) === false) await fs.promises.mkdir(to); - - for (const file of await fs.promises.readdir(from)) { - const next: string = path.join(from, file); - const stat: fs.Stats = await fs.promises.stat(next); - - if (stat.isDirectory()) { - await gather(props)(container)(next)(path.join(to, file)); - continue; - } else if (is_supported_extension(file)) container.push(next); - } - }; + const gather = async (props: { + location: ILocation; + container: string[]; + from: string; + to: string; + }) => { + if (props.from === props.location.output) return; + else if (fs.existsSync(props.to) === false) + await fs.promises.mkdir(props.to); + + for (const file of await fs.promises.readdir(props.from)) { + const next: string = path.join(props.from, file); + const stat: fs.Stats = await fs.promises.stat(next); + + if (stat.isDirectory()) { + await gather({ + location: props.location, + container: props.container, + from: next, + to: path.join(props.to, file), + }); + continue; + } else if (is_supported_extension(file)) props.container.push(next); + } + }; const is_supported_extension = (filename: string): boolean => { return ( diff --git a/src/programmers/ValidateProgrammer.ts b/src/programmers/ValidateProgrammer.ts index 62b10c76e4..c359f710c1 100644 --- a/src/programmers/ValidateProgrammer.ts +++ b/src/programmers/ValidateProgrammer.ts @@ -5,22 +5,31 @@ import { IdentifierFactory } from "../factories/IdentifierFactory"; import { StatementFactory } from "../factories/StatementFactory"; import { TypeFactory } from "../factories/TypeFactory"; -import { IProject } from "../transformers/IProject"; +import { IProgrammerProps } from "../transformers/IProgrammerProps"; +import { ITypiaContext } from "../transformers/ITypiaContext"; import { CheckerProgrammer } from "./CheckerProgrammer"; import { FeatureProgrammer } from "./FeatureProgrammer"; import { IsProgrammer } from "./IsProgrammer"; -import { FunctionImporter } from "./helpers/FunctionImporter"; +import { FunctionProgrammer } from "./helpers/FunctionProgrammer"; +import { IExpressionEntry } from "./helpers/IExpressionEntry"; import { OptionPredicator } from "./helpers/OptionPredicator"; import { check_everything } from "./internal/check_everything"; import { check_object } from "./internal/check_object"; export namespace ValidateProgrammer { + export interface IConfig { + equals: boolean; + } + export interface IProps extends IProgrammerProps { + config: IConfig; + } + export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; - equals: boolean; + functor: FunctionProgrammer; + config: IConfig; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { @@ -28,38 +37,38 @@ export namespace ValidateProgrammer { const composed: FeatureProgrammer.IComposed = CheckerProgrammer.compose({ ...props, config: { - prefix: "$v", + prefix: "_v", path: true, trace: true, - numeric: OptionPredicator.numeric(props.project.options), - equals: props.equals, - atomist: (explore) => (entry) => (input) => + numeric: OptionPredicator.numeric(props.context.options), + equals: props.config.equals, + atomist: (next) => [ - ...(entry.expression ? [entry.expression] : []), - ...(entry.conditions.length === 0 + ...(next.entry.expression ? [next.entry.expression] : []), + ...(next.entry.conditions.length === 0 ? [] - : entry.conditions.length === 1 - ? entry.conditions[0]!.map((cond) => + : next.entry.conditions.length === 1 + ? next.entry.conditions[0]!.map((cond) => ts.factory.createLogicalOr( cond.expression, - create_report_call( - explore.from === "top" - ? ts.factory.createTrue() - : ts.factory.createIdentifier("_exceptionable"), - )( - ts.factory.createIdentifier( - explore.postfix - ? `_path + ${explore.postfix}` + create_report_call({ + exceptionable: + next.explore.from === "top" + ? ts.factory.createTrue() + : ts.factory.createIdentifier("_exceptionable"), + path: ts.factory.createIdentifier( + next.explore.postfix + ? `_path + ${next.explore.postfix}` : "_path", ), - cond.expected, - input, - ), + expected: cond.expected, + input: next.input, + }), ), ) : [ ts.factory.createLogicalOr( - entry.conditions + next.entry.conditions .map((set) => set .map((s) => s.expression) @@ -68,24 +77,24 @@ export namespace ValidateProgrammer { ), ) .reduce((a, b) => ts.factory.createLogicalOr(a, b)), - create_report_call( - explore.from === "top" - ? ts.factory.createTrue() - : ts.factory.createIdentifier("_exceptionable"), - )( - ts.factory.createIdentifier( - explore.postfix - ? `_path + ${explore.postfix}` + create_report_call({ + exceptionable: + next.explore.from === "top" + ? ts.factory.createTrue() + : ts.factory.createIdentifier("_exceptionable"), + path: ts.factory.createIdentifier( + next.explore.postfix + ? `_path + ${next.explore.postfix}` : "_path", ), - entry.expected, - input, - ), + expected: next.entry.expected, + input: next.input, + }), ), ]), ].reduce((x, y) => ts.factory.createLogicalAnd(x, y)), - combiner: combine(props.equals)(props.project)(props.importer), - joiner: joiner(props.equals)(props.project)(props.importer), + combiner: combine(props), + joiner: joiner(props), success: ts.factory.createTrue(), }, }); @@ -93,12 +102,19 @@ export namespace ValidateProgrammer { undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - ts.factory.createTypeReferenceNode( - `typia.IValidation<${ - props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type) - }>`, - ), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [ + ts.factory.createTypeReferenceNode( + props.name ?? + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), + ), + ], + }), undefined, ts.factory.createBlock( [ @@ -126,14 +142,10 @@ export namespace ValidateProgrammer { ts.factory.createIdentifier("$report"), ts.factory.createToken(ts.SyntaxKind.EqualsToken), ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createParenthesizedExpression( - ts.factory.createAsExpression( - props.modulo, - TypeFactory.keyword("any"), - ), - ), - )("report"), + ts.factory.createAsExpression( + props.context.importer.internal("validateReport"), + TypeFactory.keyword("any"), + ), [], [ts.factory.createIdentifier("errors")], ), @@ -157,13 +169,13 @@ export namespace ValidateProgrammer { ], ), ), - StatementFactory.constant( - "success", - ts.factory.createStrictEquality( + StatementFactory.constant({ + name: "success", + value: ts.factory.createStrictEquality( ExpressionFactory.number(0), ts.factory.createIdentifier("errors.length"), ), - ), + }), ts.factory.createReturnStatement( ts.factory.createAsExpression( create_output(), @@ -206,97 +218,126 @@ export namespace ValidateProgrammer { statements: [ ...is.statements, ...composed.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.mut("errors"), - StatementFactory.mut("$report"), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.mut({ name: "errors" }), + StatementFactory.mut({ name: "$report" }), ], arrow, }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - (type: ts.Type, name?: string) => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - equals, - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps) => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + config: props.config, + context: props.context, + modulo: props.modulo, + functor, + type: props.type, + name: props.name, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } const combine = - (equals: boolean) => - (project: IProject) => - (importer: FunctionImporter): CheckerProgrammer.IConfig.Combiner => - (explore: CheckerProgrammer.IExplore) => { - if (explore.tracable === false) + (props: { + config: ValidateProgrammer.IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + }): CheckerProgrammer.IConfig.Combiner => + (next) => { + if (next.explore.tracable === false) return IsProgrammer.configure({ - object: validate_object(equals)(project)(importer), - numeric: true, - })(project)(importer).combiner(explore); + options: { + object: (v) => + validate_object({ + context: props.context, + functor: props.functor, + config: props.config, + entries: v.entries, + input: v.input, + }), + numeric: true, + }, + context: props.context, + functor: props.functor, + }).combiner(next); - const path: string = explore.postfix - ? `_path + ${explore.postfix}` + const path: string = next.explore.postfix + ? `_path + ${next.explore.postfix}` : "_path"; - return (logic) => (input, binaries, expected) => - logic === "and" - ? binaries - .map((binary) => - binary.combined - ? binary.expression - : ts.factory.createLogicalOr( - binary.expression, - create_report_call( - explore.source === "top" + return next.logic === "and" + ? next.binaries + .map((binary) => + binary.combined + ? binary.expression + : ts.factory.createLogicalOr( + binary.expression, + create_report_call({ + exceptionable: + next.explore.source === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )(ts.factory.createIdentifier(path), expected, input), - ), - ) - .reduce(ts.factory.createLogicalAnd) - : ts.factory.createLogicalOr( - binaries - .map((binary) => binary.expression) - .reduce(ts.factory.createLogicalOr), - create_report_call( - explore.source === "top" + path: ts.factory.createIdentifier(path), + expected: next.expected, + input: next.input, + }), + ), + ) + .reduce(ts.factory.createLogicalAnd) + : ts.factory.createLogicalOr( + next.binaries + .map((binary) => binary.expression) + .reduce(ts.factory.createLogicalOr), + create_report_call({ + exceptionable: + next.explore.source === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )(ts.factory.createIdentifier(path), expected, input), - ); + path: ts.factory.createIdentifier(path), + expected: next.expected, + input: next.input, + }), + ); }; -const validate_object = - (equals: boolean) => (project: IProject) => (importer: FunctionImporter) => - check_object({ - equals, +const validate_object = (props: { + config: ValidateProgrammer.IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; + entries: IExpressionEntry[]; + input: ts.Expression; +}) => + check_object({ + config: { + equals: props.config.equals, undefined: true, assert: false, reduce: ts.factory.createLogicalAnd, positive: ts.factory.createTrue(), - superfluous: (value) => - create_report_call()( - ts.factory.createAdd( + superfluous: (input) => + create_report_call({ + path: ts.factory.createAdd( ts.factory.createIdentifier("_path"), - ts.factory.createCallExpression(importer.use("join"), undefined, [ - ts.factory.createIdentifier("key"), - ]), + ts.factory.createCallExpression( + props.context.importer.internal("accessExpressionAsString"), + undefined, + [ts.factory.createIdentifier("key")], + ), ), - "undefined", - value, - ), + expected: "undefined", + input, + }), halt: (expr) => ts.factory.createLogicalOr( ts.factory.createStrictEquality( @@ -305,36 +346,48 @@ const validate_object = ), expr, ), - })(project)(importer); + }, + context: props.context, + entries: props.entries, + input: props.input, + }); -const joiner = - (equals: boolean) => - (project: IProject) => - (importer: FunctionImporter): CheckerProgrammer.IConfig.IJoiner => ({ - object: validate_object(equals)(project)(importer), - array: (input, arrow) => - check_everything( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("map"), - undefined, - [arrow], - ), +const joiner = (props: { + config: ValidateProgrammer.IConfig; + context: ITypiaContext; + functor: FunctionProgrammer; +}): CheckerProgrammer.IConfig.IJoiner => ({ + object: (v) => + validate_object({ + context: props.context, + functor: props.functor, + config: props.config, + entries: v.entries, + input: v.input, + }), + array: (props) => + check_everything( + ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "map"), + undefined, + [props.arrow], ), - failure: (value, expected, explore) => - create_report_call( - explore?.from === "top" + ), + failure: (next) => + create_report_call({ + exceptionable: + next.explore?.from === "top" ? ts.factory.createTrue() : ts.factory.createIdentifier("_exceptionable"), - )( - ts.factory.createIdentifier( - explore?.postfix ? `_path + ${explore.postfix}` : "_path", - ), - expected, - value, + path: ts.factory.createIdentifier( + next.explore?.postfix ? `_path + ${next.explore.postfix}` : "_path", ), - tuple: (binaries) => - check_everything(ts.factory.createArrayLiteralExpression(binaries, true)), - }); + expected: next.expected, + input: next.input, + }), + tuple: (binaries) => + check_everything(ts.factory.createArrayLiteralExpression(binaries, true)), +}); const create_output = () => ts.factory.createObjectLiteralExpression( @@ -355,28 +408,27 @@ const create_output = () => true, ); -const create_report_call = - (exceptionable?: ts.Expression) => - ( - path: ts.Expression, - expected: string, - value: ts.Expression, - ): ts.Expression => - ts.factory.createCallExpression( - ts.factory.createIdentifier("$report"), - undefined, - [ - exceptionable ?? ts.factory.createIdentifier("_exceptionable"), - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment("path", path), - ts.factory.createPropertyAssignment( - "expected", - ts.factory.createStringLiteral(expected), - ), - ts.factory.createPropertyAssignment("value", value), - ], - true, - ), - ], - ); +const create_report_call = (props: { + exceptionable?: ts.Expression; + path: ts.Expression; + expected: string; + input: ts.Expression; +}): ts.Expression => + ts.factory.createCallExpression( + ts.factory.createIdentifier("$report"), + undefined, + [ + props.exceptionable ?? ts.factory.createIdentifier("_exceptionable"), + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment("path", props.path), + ts.factory.createPropertyAssignment( + "expected", + ts.factory.createStringLiteral(props.expected), + ), + ts.factory.createPropertyAssignment("value", props.input), + ], + true, + ), + ], + ); diff --git a/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts b/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts index fbf60276dc..a1a9730f59 100644 --- a/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +++ b/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts @@ -2,9 +2,8 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { IdentifierFactory } from "../../factories/IdentifierFactory"; -import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { StringUtil } from "../../utils/StringUtil"; @@ -13,84 +12,97 @@ import { FunctionalAssertParametersProgrammer } from "./FunctionalAssertParamete import { FunctionAssertReturnProgrammer } from "./FunctionalAssertReturnProgrammer"; export namespace FunctionalAssertFunctionProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - init?: ts.Expression, - ): ts.CallExpression => { - const wrapper = errorFactoryWrapper(modulo)(declaration.parameters)(init); - const p = FunctionalAssertParametersProgrammer.decompose(project)(modulo)( - equals, - )(declaration.parameters, wrapper.name); - const r = FunctionAssertReturnProgrammer.decompose(project)(modulo)( - equals, - )(expression, declaration, wrapper.name); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - wrapper.variable, - ...p.functions, - ...r.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - r.async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - declaration.type, - undefined, - ts.factory.createBlock([ - ...p.expressions.map(ts.factory.createExpressionStatement), - ts.factory.createReturnStatement(r.value), - ]), - ), - ), - ], - true, - ), - ); - }; + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } - export const errorFactoryWrapper = - (modulo: ts.LeftHandSideExpression) => - (paramters: readonly ts.ParameterDeclaration[]) => - ( - init: ts.Expression | undefined, - ): { - name: string; - variable: ts.VariableStatement; - } => { - const name: string = StringUtil.escapeDuplicate( - paramters.map((p) => p.name.getText()), - )("errorFactoryWrapper"); - const variable: ts.VariableStatement = ts.factory.createVariableStatement( - undefined, - ts.factory.createVariableDeclarationList( - [ - ts.factory.createVariableDeclaration( - name, + export const write = (props: IProps): ts.CallExpression => { + const wrapper = errorFactoryWrapper({ + context: props.context, + parameters: props.declaration.parameters, + init: props.init, + }); + const p = FunctionalAssertParametersProgrammer.decompose({ + context: props.context, + modulo: props.modulo, + config: props.config, + parameters: props.declaration.parameters, + wrapper: wrapper.name, + }); + const r = FunctionAssertReturnProgrammer.decompose({ + context: props.context, + modulo: props.modulo, + config: props.config, + expression: props.expression, + declaration: props.declaration, + wrapper: wrapper.name, + }); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + wrapper.variable, + ...p.functions, + ...r.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + r.async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, undefined, - AssertProgrammer.Guardian.type(), - init ?? - ts.factory.createPropertyAccessExpression( - ts.factory.createAsExpression( - modulo, - TypeFactory.keyword("any"), - ), - "errorFactory", - ), + props.declaration.parameters, + props.declaration.type, + undefined, + ts.factory.createBlock([ + ...p.expressions.map(ts.factory.createExpressionStatement), + ts.factory.createReturnStatement(r.value), + ]), ), - ], - ts.NodeFlags.Const, - ), - ); - return { name, variable }; - }; + ), + ], + true, + ), + ); + }; + + export const errorFactoryWrapper = (props: { + context: ITypiaContext; + parameters: readonly ts.ParameterDeclaration[]; + init: ts.Expression | undefined; + }): { + name: string; + variable: ts.VariableStatement; + } => { + const name: string = StringUtil.escapeDuplicate({ + keep: props.parameters.map((p) => p.name.getText()), + input: "errorFactoryWrapper", + }); + const variable: ts.VariableStatement = ts.factory.createVariableStatement( + undefined, + ts.factory.createVariableDeclarationList( + [ + ts.factory.createVariableDeclaration( + name, + undefined, + AssertProgrammer.Guardian.type(props.context), + props.init ?? + props.context.importer.internal( + "functionalTypeGuardErrorFactory", + ), + ), + ], + ts.NodeFlags.Const, + ), + ); + return { name, variable }; + }; export const hookPath = (props: { wrapper: string; diff --git a/src/programmers/functional/FunctionalAssertParametersProgrammer.ts b/src/programmers/functional/FunctionalAssertParametersProgrammer.ts index dd6e454935..12b711f507 100644 --- a/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +++ b/src/programmers/functional/FunctionalAssertParametersProgrammer.ts @@ -4,105 +4,122 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FunctionalAssertFunctionProgrammer } from "./FunctionalAssertFunctionProgrammer"; import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer"; export namespace FunctionalAssertParametersProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - init?: ts.Expression, - ): ts.CallExpression => { - const wrapper = FunctionalAssertFunctionProgrammer.errorFactoryWrapper( - modulo, - )(declaration.parameters)(init); - const { async } = FunctionalGeneralProgrammer.getReturnType( - project.checker, - )(declaration); - const result = decompose(project)(modulo)(equals)( - declaration.parameters, - wrapper.name, - ); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - wrapper.variable, - ...result.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - declaration.type, - undefined, - ts.factory.createBlock( - [ - ...result.expressions.map( - ts.factory.createExpressionStatement, - ), - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - expression, - undefined, - declaration.parameters.map((p) => - ts.factory.createIdentifier(p.name.getText()), - ), + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + export interface IDecomposeProps { + context: ITypiaContext; + config: IConfig; + modulo: ts.LeftHandSideExpression; + parameters: readonly ts.ParameterDeclaration[]; + wrapper: string; + } + export interface IDecomposeOutput { + functions: ts.Statement[]; + expressions: ts.Expression[]; + } + + export const write = (props: IProps): ts.CallExpression => { + const wrapper = FunctionalAssertFunctionProgrammer.errorFactoryWrapper({ + context: props.context, + parameters: props.declaration.parameters, + init: props.init, + }); + const { async } = FunctionalGeneralProgrammer.getReturnType({ + checker: props.context.checker, + declaration: props.declaration, + }); + const result = decompose({ + context: props.context, + modulo: props.modulo, + config: props.config, + parameters: props.declaration.parameters, + wrapper: wrapper.name, + }); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + wrapper.variable, + ...result.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, + undefined, + props.declaration.parameters, + props.declaration.type, + undefined, + ts.factory.createBlock( + [ + ...result.expressions.map( + ts.factory.createExpressionStatement, + ), + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + props.expression, + undefined, + props.declaration.parameters.map((p) => + ts.factory.createIdentifier(p.name.getText()), ), ), - ], - true, - ), + ), + ], + true, ), ), - ], - true, - ), - ); - }; - - export const decompose = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - parameters: readonly ts.ParameterDeclaration[], - wrapper: string, - ): { - functions: ts.Statement[]; - expressions: ts.Expression[]; - } => ({ - functions: parameters.map((p, i) => - StatementFactory.constant( - `__assert_param_${i}`, - AssertProgrammer.write(project)(modulo)(equals)( - p.type - ? project.checker.getTypeFromTypeNode(p.type) - : project.checker.getTypeFromTypeNode(TypeFactory.keyword("any")), - undefined, - FunctionalAssertFunctionProgrammer.hookPath({ - wrapper, - replacer: `$input.parameters[${i}]`, - }), ), - // undefined, - // [ts.factory.createIdentifier(p.name.getText())], - ), + ], + true, ), - expressions: parameters.map((p, i) => - ts.factory.createCallExpression( - ts.factory.createIdentifier(`__assert_param_${i}`), - undefined, - [ts.factory.createIdentifier(p.name.getText())], - ), + ); + }; + + export const decompose = (props: IDecomposeProps): IDecomposeOutput => ({ + functions: props.parameters.map((p, i) => + StatementFactory.constant({ + name: `__assert_param_${i}`, + value: AssertProgrammer.write({ + context: props.context, + modulo: props.modulo, + config: { + equals: props.config.equals, + guard: false, + }, + type: p.type + ? props.context.checker.getTypeFromTypeNode(p.type) + : props.context.checker.getTypeFromTypeNode( + TypeFactory.keyword("any"), + ), + name: undefined, + init: FunctionalAssertFunctionProgrammer.hookPath({ + wrapper: props.wrapper, + replacer: `$input.parameters[${i}]`, + }), + }), + }), + ), + expressions: props.parameters.map((p, i) => + ts.factory.createCallExpression( + ts.factory.createIdentifier(`__assert_param_${i}`), + undefined, + [ts.factory.createIdentifier(p.name.getText())], ), - }); + ), + }); } diff --git a/src/programmers/functional/FunctionalAssertReturnProgrammer.ts b/src/programmers/functional/FunctionalAssertReturnProgrammer.ts index 4d6d5fd958..d6f81a41c7 100644 --- a/src/programmers/functional/FunctionalAssertReturnProgrammer.ts +++ b/src/programmers/functional/FunctionalAssertReturnProgrammer.ts @@ -3,96 +3,113 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { StatementFactory } from "../../factories/StatementFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FunctionalAssertFunctionProgrammer } from "./FunctionalAssertFunctionProgrammer"; import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer"; export namespace FunctionAssertReturnProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - init?: ts.Expression, - ): ts.CallExpression => { - const wrapper = FunctionalAssertFunctionProgrammer.errorFactoryWrapper( - modulo, - )(declaration.parameters)(init); - const result = decompose(project)(modulo)(equals)( - expression, - declaration, - wrapper.name, - ); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - wrapper.variable, - ...result.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - result.async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - declaration.type, - undefined, - result.value, - ), - ), - ], - true, - ), - ); - }; + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + expression: ts.Expression; + declaration: ts.FunctionDeclaration; + init?: ts.Expression | undefined; + } + export interface IDecomposeProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + expression: ts.Expression; + declaration: ts.FunctionDeclaration; + wrapper: string; + } + export interface IDecomposeOutput { + async: boolean; + functions: ts.Statement[]; + value: ts.Expression; + } - export const decompose = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - wrapper: string, - ): { - async: boolean; - functions: ts.Statement[]; - value: ts.Expression; - } => { - const { type, async } = FunctionalGeneralProgrammer.getReturnType( - project.checker, - )(declaration); - const caller: ts.CallExpression = ts.factory.createCallExpression( - expression, - undefined, - declaration.parameters.map((p) => - ts.factory.createIdentifier(p.name.getText()), - ), - ); - return { - async, - functions: [ - StatementFactory.constant( - "__assert_return", - AssertProgrammer.write(project)(modulo)(equals)( - type, + export const write = (props: IProps): ts.CallExpression => { + const wrapper = FunctionalAssertFunctionProgrammer.errorFactoryWrapper({ + context: props.context, + parameters: props.declaration.parameters, + init: props.init, + }); + const result = decompose({ + context: props.context, + modulo: props.modulo, + config: props.config, + expression: props.expression, + declaration: props.declaration, + wrapper: wrapper.name, + }); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + wrapper.variable, + ...result.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + result.async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, undefined, - FunctionalAssertFunctionProgrammer.hookPath({ - wrapper, - replacer: "$input.return", - }), + props.declaration.parameters, + props.declaration.type, + undefined, + result.value, ), ), ], - value: ts.factory.createCallExpression( - ts.factory.createIdentifier("__assert_return"), - undefined, - [async ? ts.factory.createAwaitExpression(caller) : caller], - ), - }; + true, + ), + ); + }; + + export const decompose = (props: IDecomposeProps): IDecomposeOutput => { + const { type, async } = FunctionalGeneralProgrammer.getReturnType({ + checker: props.context.checker, + declaration: props.declaration, + }); + const caller: ts.CallExpression = ts.factory.createCallExpression( + props.expression, + undefined, + props.declaration.parameters.map((p) => + ts.factory.createIdentifier(p.name.getText()), + ), + ); + return { + async, + functions: [ + StatementFactory.constant({ + name: "__assert_return", + value: AssertProgrammer.write({ + context: props.context, + modulo: props.modulo, + config: { + equals: props.config.equals, + guard: false, + }, + type, + name: undefined, + init: FunctionalAssertFunctionProgrammer.hookPath({ + wrapper: props.wrapper, + replacer: "$input.return", + }), + }), + }), + ], + value: ts.factory.createCallExpression( + ts.factory.createIdentifier("__assert_return"), + undefined, + [async ? ts.factory.createAwaitExpression(caller) : caller], + ), }; + }; } diff --git a/src/programmers/functional/FunctionalIsFunctionProgrammer.ts b/src/programmers/functional/FunctionalIsFunctionProgrammer.ts index 66aef151f4..44efe4fcb6 100644 --- a/src/programmers/functional/FunctionalIsFunctionProgrammer.ts +++ b/src/programmers/functional/FunctionalIsFunctionProgrammer.ts @@ -2,70 +2,70 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FunctionalIsParametersProgrammer } from "./FunctionalIsParametersProgrammer"; import { FunctionalIsReturnProgrammer } from "./FunctionalIsReturnProgrammer"; export namespace FunctionalIsFunctionProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): ts.CallExpression => { - const p = - FunctionalIsParametersProgrammer.decompose(project)(modulo)(equals)( - declaration, - ); - const r = FunctionalIsReturnProgrammer.decompose(project)(modulo)(equals)( - expression, - declaration, - ); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - ...p.functions, - ...r.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - r.async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - getReturnTypeNode(declaration, r.async), - undefined, - ts.factory.createBlock( - [...p.statements, ...r.statements], - true, - ), - ), + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + + export const write = (props: IProps): ts.CallExpression => { + const p = FunctionalIsParametersProgrammer.decompose(props); + const r = FunctionalIsReturnProgrammer.decompose(props); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + ...p.functions, + ...r.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + r.async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, + undefined, + props.declaration.parameters, + getReturnTypeNode({ + declaration: props.declaration, + async: r.async, + }), + undefined, + ts.factory.createBlock([...p.statements, ...r.statements], true), ), - ], - true, - ), - ); - }; + ), + ], + true, + ), + ); + }; - export const getReturnTypeNode = ( - declaration: ts.FunctionDeclaration, - async: boolean, - ): ts.TypeNode | undefined => - declaration.type - ? async - ? !!(declaration.type! as ts.TypeReferenceNode).typeArguments?.[0] + export const getReturnTypeNode = (props: { + declaration: ts.FunctionDeclaration; + async: boolean; + }): ts.TypeNode | undefined => + props.declaration.type + ? props.async + ? !!(props.declaration.type! as ts.TypeReferenceNode).typeArguments?.[0] ? ts.factory.createTypeReferenceNode("Promise", [ ts.factory.createUnionTypeNode([ - (declaration.type! as ts.TypeReferenceNode).typeArguments![0]!, + (props.declaration.type! as ts.TypeReferenceNode) + .typeArguments![0]!, ts.factory.createTypeReferenceNode("null"), ]), ]) : undefined : ts.factory.createUnionTypeNode([ - declaration.type, + props.declaration.type, ts.factory.createTypeReferenceNode("null"), ]) : undefined; diff --git a/src/programmers/functional/FunctionalIsParametersProgrammer.ts b/src/programmers/functional/FunctionalIsParametersProgrammer.ts index 2ed0650166..2e5dd28319 100644 --- a/src/programmers/functional/FunctionalIsParametersProgrammer.ts +++ b/src/programmers/functional/FunctionalIsParametersProgrammer.ts @@ -4,98 +4,110 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { IsProgrammer } from "../IsProgrammer"; import { FunctionalIsFunctionProgrammer } from "./FunctionalIsFunctionProgrammer"; import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer"; export namespace FunctionalIsParametersProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): ts.CallExpression => { - const { async } = FunctionalGeneralProgrammer.getReturnType( - project.checker, - )(declaration); - const result = decompose(project)(modulo)(equals)(declaration); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - ...result.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - FunctionalIsFunctionProgrammer.getReturnTypeNode( - declaration, - async, - ), - undefined, - ts.factory.createBlock( - [ - ...result.statements, - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - expression, - undefined, - declaration.parameters.map((p) => - ts.factory.createIdentifier(p.name.getText()), - ), + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + export interface IDecomposeProps { + context: ITypiaContext; + config: IConfig; + modulo: ts.LeftHandSideExpression; + declaration: ts.FunctionDeclaration; + } + export interface IDecomposeOutput { + functions: ts.Statement[]; + statements: ts.Statement[]; + } + + export const write = (props: IProps): ts.CallExpression => { + const { async } = FunctionalGeneralProgrammer.getReturnType({ + checker: props.context.checker, + declaration: props.declaration, + }); + const result = decompose(props); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + ...result.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, + undefined, + props.declaration.parameters, + FunctionalIsFunctionProgrammer.getReturnTypeNode({ + declaration: props.declaration, + async, + }), + undefined, + ts.factory.createBlock( + [ + ...result.statements, + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + props.expression, + undefined, + props.declaration.parameters.map((p) => + ts.factory.createIdentifier(p.name.getText()), ), ), - ], - true, - ), + ), + ], + true, ), ), - ], - true, - ), - ); - }; - - export const decompose = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - declaration: ts.FunctionDeclaration, - ): { - functions: ts.Statement[]; - statements: ts.Statement[]; - } => ({ - functions: declaration.parameters.map((p, i) => - StatementFactory.constant( - `__is_param_${i}`, - IsProgrammer.write(project)(modulo)(equals)( - project.checker.getTypeFromTypeNode( - p.type ?? TypeFactory.keyword("any"), - ), ), - ), + ], + true, ), - statements: declaration.parameters - .map((p, i) => [ - ts.factory.createIfStatement( - ts.factory.createStrictEquality( - ts.factory.createFalse(), - ts.factory.createCallExpression( - ts.factory.createIdentifier(`__is_param_${i}`), - undefined, - [ts.factory.createIdentifier(p.name.getText())], - ), + ); + }; + + export const decompose = (props: IDecomposeProps): IDecomposeOutput => ({ + functions: props.declaration.parameters.map((p, i) => + StatementFactory.constant({ + name: `__is_param_${i}`, + value: IsProgrammer.write({ + context: props.context, + modulo: props.modulo, + config: props.config, + type: props.context.checker.getTypeFromTypeNode( + p.type ?? TypeFactory.keyword("any"), + ), + init: undefined, + name: undefined, + }), + }), + ), + statements: props.declaration.parameters + .map((p, i) => [ + ts.factory.createIfStatement( + ts.factory.createStrictEquality( + ts.factory.createFalse(), + ts.factory.createCallExpression( + ts.factory.createIdentifier(`__is_param_${i}`), + undefined, + [ts.factory.createIdentifier(p.name.getText())], ), - ts.factory.createReturnStatement(ts.factory.createNull()), ), - ]) - .flat(), - }); + ts.factory.createReturnStatement(ts.factory.createNull()), + ), + ]) + .flat(), + }); } diff --git a/src/programmers/functional/FunctionalIsReturnProgrammer.ts b/src/programmers/functional/FunctionalIsReturnProgrammer.ts index d68f8737cb..598c214c8b 100644 --- a/src/programmers/functional/FunctionalIsReturnProgrammer.ts +++ b/src/programmers/functional/FunctionalIsReturnProgrammer.ts @@ -3,7 +3,7 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { StatementFactory } from "../../factories/StatementFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { StringUtil } from "../../utils/StringUtil"; @@ -12,95 +12,105 @@ import { FunctionalIsFunctionProgrammer } from "./FunctionalIsFunctionProgrammer import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer"; export namespace FunctionalIsReturnProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): ts.CallExpression => { - const result = decompose(project)(modulo)(equals)( - expression, - declaration, - ); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - ...result.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - result.async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - FunctionalIsFunctionProgrammer.getReturnTypeNode( - declaration, - result.async, - ), - undefined, - ts.factory.createBlock(result.statements, true), - ), - ), - ], - true, - ), - ); - }; + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + export interface IDecomposeProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + expression: ts.Expression; + declaration: ts.FunctionDeclaration; + } + export interface IDecomposeOutput { + async: boolean; + functions: ts.Statement[]; + statements: ts.Statement[]; + } - export const decompose = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): { - async: boolean; - functions: ts.Statement[]; - statements: ts.Statement[]; - } => { - const { type, async } = FunctionalGeneralProgrammer.getReturnType( - project.checker, - )(declaration); - const caller: ts.CallExpression = ts.factory.createCallExpression( - expression, - undefined, - declaration.parameters.map((p) => - ts.factory.createIdentifier(p.name.getText()), - ), - ); - const name: string = StringUtil.escapeDuplicate( - declaration.parameters.map((p) => p.name.getText()), - )("result"); - return { - async, - functions: [ - StatementFactory.constant( - "__is_return", - IsProgrammer.write(project)(modulo)(equals)(type), - ), - ], - statements: [ - StatementFactory.constant( - name, - async ? ts.factory.createAwaitExpression(caller) : caller, - ), + export const write = (props: IProps): ts.CallExpression => { + const result = decompose(props); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + ...result.functions, ts.factory.createReturnStatement( - ts.factory.createConditionalExpression( - ts.factory.createCallExpression( - ts.factory.createIdentifier("__is_return"), - undefined, - [ts.factory.createIdentifier(name)], - ), + ts.factory.createArrowFunction( + result.async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, undefined, - ts.factory.createIdentifier(name), + props.declaration.parameters, + FunctionalIsFunctionProgrammer.getReturnTypeNode({ + declaration: props.declaration, + async: result.async, + }), undefined, - ts.factory.createNull(), + ts.factory.createBlock(result.statements, true), ), ), ], - }; + true, + ), + ); + }; + + export const decompose = (props: IDecomposeProps): IDecomposeOutput => { + const { type, async } = FunctionalGeneralProgrammer.getReturnType({ + checker: props.context.checker, + declaration: props.declaration, + }); + const caller: ts.CallExpression = ts.factory.createCallExpression( + props.expression, + undefined, + props.declaration.parameters.map((p) => + ts.factory.createIdentifier(p.name.getText()), + ), + ); + const name: string = StringUtil.escapeDuplicate({ + keep: props.declaration.parameters.map((p) => p.name.getText()), + input: "result", + }); + return { + async, + functions: [ + StatementFactory.constant({ + name: "__is_return", + value: IsProgrammer.write({ + ...props, + type, + name: undefined, + init: undefined, + }), + }), + ], + statements: [ + StatementFactory.constant({ + name, + value: async ? ts.factory.createAwaitExpression(caller) : caller, + }), + ts.factory.createReturnStatement( + ts.factory.createConditionalExpression( + ts.factory.createCallExpression( + ts.factory.createIdentifier("__is_return"), + undefined, + [ts.factory.createIdentifier(name)], + ), + undefined, + ts.factory.createIdentifier(name), + undefined, + ts.factory.createNull(), + ), + ), + ], }; + }; } diff --git a/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts b/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts index cbf4a38ed0..2f9af4185a 100644 --- a/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts +++ b/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts @@ -3,52 +3,53 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { IdentifierFactory } from "../../factories/IdentifierFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FunctionalValidateParametersProgrammer } from "./FunctionalValidateParametersProgrammer"; import { FunctionalValidateReturnProgrammer } from "./FunctionalValidateReturnProgrammer"; export namespace FunctionalValidateFunctionProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): ts.CallExpression => { - const p = - FunctionalValidateParametersProgrammer.decompose(project)(modulo)( - equals, - )(declaration); - const r = FunctionalValidateReturnProgrammer.decompose(project)(modulo)( - equals, - )(expression, declaration); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - ...p.functions, - ...r.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - r.async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - getReturnTypeNode(declaration, r.async), - undefined, - ts.factory.createBlock( - [...p.statements, ...r.statements], - true, - ), - ), + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + + export const write = (props: IProps): ts.CallExpression => { + const p = FunctionalValidateParametersProgrammer.decompose(props); + const r = FunctionalValidateReturnProgrammer.decompose(props); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + ...p.functions, + ...r.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + r.async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, + undefined, + props.declaration.parameters, + getReturnTypeNode({ + context: props.context, + declaration: props.declaration, + async: r.async, + }), + undefined, + ts.factory.createBlock([...p.statements, ...r.statements], true), ), - ], - true, - ), - ); - }; + ), + ], + true, + ), + ); + }; export const hookErrors = (props: { expression: ts.Expression; @@ -90,34 +91,29 @@ export namespace FunctionalValidateFunctionProgrammer { ], ); - export const getReturnTypeNode = ( - declaration: ts.FunctionDeclaration, - async: boolean, - ): ts.TypeNode | undefined => - declaration.type - ? async - ? !!(declaration.type! as ts.TypeReferenceNode).typeArguments?.[0] + export const getReturnTypeNode = (props: { + context: ITypiaContext; + declaration: ts.FunctionDeclaration; + async: boolean; + }): ts.TypeNode | undefined => + props.declaration.type + ? props.async + ? !!(props.declaration.type! as ts.TypeReferenceNode).typeArguments?.[0] ? ts.factory.createTypeReferenceNode("Promise", [ - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("IValidation"), - [ - (declaration.type! as ts.TypeReferenceNode) + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [ + (props.declaration.type! as ts.TypeReferenceNode) .typeArguments![0]!, ], - ), + }), ]) : undefined - : ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("IValidation"), - [declaration.type], - ) + : props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [props.declaration.type], + }) : undefined; } diff --git a/src/programmers/functional/FunctionalValidateParametersProgrammer.ts b/src/programmers/functional/FunctionalValidateParametersProgrammer.ts index 316b9dbeab..fd4078f81c 100644 --- a/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +++ b/src/programmers/functional/FunctionalValidateParametersProgrammer.ts @@ -5,7 +5,7 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { StringUtil } from "../../utils/StringUtil"; @@ -14,160 +14,81 @@ import { FunctionalValidateFunctionProgrammer } from "./FunctionalValidateFuncti import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer"; export namespace FunctionalValidateParametersProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): ts.CallExpression => { - const { async } = FunctionalGeneralProgrammer.getReturnType( - project.checker, - )(declaration); - const result = decompose(project)(modulo)(equals)(declaration); - const caller: ts.CallExpression = ts.factory.createCallExpression( - expression, - undefined, - declaration.parameters.map((p) => - ts.factory.createIdentifier(p.name.getText()), - ), - ); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - ...result.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - FunctionalValidateFunctionProgrammer.getReturnTypeNode( - declaration, - async, - ), - undefined, - ts.factory.createBlock( - [ - ...result.statements, - ts.factory.createReturnStatement( - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "success", - ts.factory.createTrue(), - ), - ts.factory.createPropertyAssignment( - "data", - async - ? ts.factory.createAwaitExpression(caller) - : caller, - ), - ts.factory.createPropertyAssignment( - "errors", - ts.factory.createArrayLiteralExpression([]), - ), - ], - true, - ), - ), - ], - true, - ), - ), - ), - ], - true, - ), - ); - }; + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + export interface IDecomposeProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + } + export interface IDecomposeOutput { + functions: ts.Statement[]; + statements: ts.Statement[]; + } - export const decompose = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - declaration: ts.FunctionDeclaration, - ): { - functions: ts.Statement[]; - statements: ts.Statement[]; - } => { - const resultName: string = StringUtil.escapeDuplicate( - declaration.parameters.map((p) => p.name.getText()), - )("paramErrorResults"); - const validationResultArray: ts.ArrayLiteralExpression = - ts.factory.createArrayLiteralExpression( - declaration.parameters.map((p, i) => - ts.factory.createAsExpression( - ts.factory.createCallExpression( - ts.factory.createIdentifier(`__validate_param_${i}`), - undefined, - [ts.factory.createIdentifier(p.name.getText())], - ), - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createQualifiedName( - ts.factory.createIdentifier("IValidation"), - ts.factory.createIdentifier("IFailure"), - ), - undefined, - false, - ), - ), - ), - true, - ); - const errorMatrix = ts.factory.createCallExpression( - ts.factory.createPropertyAccessExpression(validationResultArray, "map"), - undefined, + export const write = (props: IProps): ts.CallExpression => { + const { async } = FunctionalGeneralProgrammer.getReturnType({ + checker: props.context.checker, + declaration: props.declaration, + }); + const result = decompose(props); + const caller: ts.CallExpression = ts.factory.createCallExpression( + props.expression, + undefined, + props.declaration.parameters.map((p) => + ts.factory.createIdentifier(p.name.getText()), + ), + ); + return ExpressionFactory.selfCall( + ts.factory.createBlock( [ - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter("r"), - IdentifierFactory.parameter("i"), - ], - undefined, - undefined, - ts.factory.createConditionalExpression( - ts.factory.createStrictEquality( - ts.factory.createTrue(), - ts.factory.createPropertyAccessExpression( - ts.factory.createIdentifier("r"), - "success", - ), - ), + ...result.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, undefined, - ts.factory.createIdentifier("r"), + props.declaration.parameters, + FunctionalValidateFunctionProgrammer.getReturnTypeNode({ + context: props.context, + declaration: props.declaration, + async, + }), undefined, - ts.factory.createObjectLiteralExpression( + ts.factory.createBlock( [ - ts.factory.createSpreadAssignment( - ts.factory.createIdentifier("r"), - ), - ts.factory.createPropertyAssignment( - "errors", - FunctionalValidateFunctionProgrammer.hookErrors({ - expression: ts.factory.createPropertyAccessExpression( - ts.factory.createIdentifier("r"), - "errors", - ), - replacer: ts.factory.createTemplateExpression( - ts.factory.createTemplateHead("$input.parameters["), - [ - ts.factory.createTemplateSpan( - ts.factory.createIdentifier("i"), - ts.factory.createTemplateTail("]"), - ), - ], - ), - }), + ...result.statements, + ts.factory.createReturnStatement( + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "success", + ts.factory.createTrue(), + ), + ts.factory.createPropertyAssignment( + "data", + async + ? ts.factory.createAwaitExpression(caller) + : caller, + ), + ts.factory.createPropertyAssignment( + "errors", + ts.factory.createArrayLiteralExpression([]), + ), + ], + true, + ), ), ], true, @@ -175,93 +96,179 @@ export namespace FunctionalValidateParametersProgrammer { ), ), ], + true, + ), + ); + }; + + export const decompose = (props: IDecomposeProps): IDecomposeOutput => { + const resultName: string = StringUtil.escapeDuplicate({ + keep: props.declaration.parameters.map((p) => p.name.getText()), + input: "paramErrorResults", + }); + const validationResultArray: ts.ArrayLiteralExpression = + ts.factory.createArrayLiteralExpression( + props.declaration.parameters.map((p, i) => + ts.factory.createAsExpression( + ts.factory.createCallExpression( + ts.factory.createIdentifier(`__validate_param_${i}`), + undefined, + [ts.factory.createIdentifier(p.name.getText())], + ), + props.context.importer.type({ + file: "typia", + name: "IValidation.IFailure", + }), + ), + ), + true, ); - const failures = ts.factory.createCallExpression( - ts.factory.createPropertyAccessExpression(errorMatrix, "filter"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("r")], - undefined, - undefined, + const errorMatrix = ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(validationResultArray, "map"), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("r"), IdentifierFactory.parameter("i")], + undefined, + undefined, + ts.factory.createConditionalExpression( ts.factory.createStrictEquality( - ts.factory.createFalse(), + ts.factory.createTrue(), ts.factory.createPropertyAccessExpression( ts.factory.createIdentifier("r"), "success", ), ), + undefined, + ts.factory.createIdentifier("r"), + undefined, + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createSpreadAssignment( + ts.factory.createIdentifier("r"), + ), + ts.factory.createPropertyAssignment( + "errors", + FunctionalValidateFunctionProgrammer.hookErrors({ + expression: ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("r"), + "errors", + ), + replacer: ts.factory.createTemplateExpression( + ts.factory.createTemplateHead("$input.parameters["), + [ + ts.factory.createTemplateSpan( + ts.factory.createIdentifier("i"), + ts.factory.createTemplateTail("]"), + ), + ], + ), + }), + ), + ], + true, + ), ), - ], - ); - return { - functions: declaration.parameters.map((p, i) => - StatementFactory.constant( - `__validate_param_${i}`, - ValidateProgrammer.write(project)(modulo)(equals)( - project.checker.getTypeFromTypeNode( - p.type ?? TypeFactory.keyword("any"), - ), + ), + ], + ); + const failures = ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression(errorMatrix, "filter"), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("r")], + undefined, + undefined, + ts.factory.createStrictEquality( + ts.factory.createFalse(), + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("r"), + "success", ), ), ), - statements: [ - StatementFactory.constant(resultName, failures), - ts.factory.createIfStatement( - ts.factory.createStrictInequality( - ts.factory.createNumericLiteral("0"), - ts.factory.createPropertyAccessExpression( - ts.factory.createIdentifier(resultName), - "length", - ), + ], + ); + return { + functions: props.declaration.parameters.map((p, i) => + StatementFactory.constant({ + name: `__validate_param_${i}`, + value: ValidateProgrammer.write({ + ...props, + type: props.context.checker.getTypeFromTypeNode( + p.type ?? TypeFactory.keyword("any"), ), - ts.factory.createReturnStatement( - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "success", - ts.factory.createFalse(), - ), - ts.factory.createPropertyAssignment( - "errors", - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createIdentifier(resultName), - )("map"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "r", - TypeFactory.keyword("any"), - ), - ], - undefined, - undefined, - IdentifierFactory.access( - ts.factory.createIdentifier("r"), - )("errors"), - ), - ], + name: undefined, + init: undefined, + }), + }), + ), + statements: [ + StatementFactory.constant({ + name: resultName, + value: failures, + }), + ts.factory.createIfStatement( + ts.factory.createStrictInequality( + ts.factory.createNumericLiteral("0"), + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier(resultName), + "length", + ), + ), + ts.factory.createReturnStatement( + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "success", + ts.factory.createFalse(), + ), + ts.factory.createPropertyAssignment( + "errors", + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier(resultName), + "map", ), - )("flat"), - undefined, - undefined, + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "r", + TypeFactory.keyword("any"), + ), + ], + undefined, + undefined, + IdentifierFactory.access( + ts.factory.createIdentifier("r"), + "errors", + ), + ), + ], + ), + "flat", ), + undefined, + undefined, ), - ], - true, - ), + ), + ], + true, ), ), - ], - }; + ), + ], }; + }; } diff --git a/src/programmers/functional/FunctionalValidateReturnProgrammer.ts b/src/programmers/functional/FunctionalValidateReturnProgrammer.ts index 6f33d8d453..ca81be10ce 100644 --- a/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +++ b/src/programmers/functional/FunctionalValidateReturnProgrammer.ts @@ -3,7 +3,7 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { StatementFactory } from "../../factories/StatementFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { StringUtil } from "../../utils/StringUtil"; @@ -12,115 +12,124 @@ import { FunctionalValidateFunctionProgrammer } from "./FunctionalValidateFuncti import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer"; export namespace FunctionalValidateReturnProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): ts.CallExpression => { - const result = decompose(project)(modulo)(equals)( - expression, - declaration, - ); - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - ...result.functions, - ts.factory.createReturnStatement( - ts.factory.createArrowFunction( - result.async - ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] - : undefined, - undefined, - declaration.parameters, - FunctionalValidateFunctionProgrammer.getReturnTypeNode( - declaration, - result.async, - ), - undefined, - ts.factory.createBlock(result.statements, true), - ), + export interface IConfig { + equals: boolean; + } + export interface IProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + declaration: ts.FunctionDeclaration; + expression: ts.Expression; + init?: ts.Expression | undefined; + } + export interface IDecomposeProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + config: IConfig; + expression: ts.Expression; + declaration: ts.FunctionDeclaration; + } + export interface IDecomposeOutput { + async: boolean; + functions: ts.Statement[]; + statements: ts.Statement[]; + } + + export const write = (props: IProps): ts.CallExpression => { + const result = decompose(props); + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + ...result.functions, + ts.factory.createReturnStatement( + ts.factory.createArrowFunction( + result.async + ? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)] + : undefined, + undefined, + props.declaration.parameters, + FunctionalValidateFunctionProgrammer.getReturnTypeNode({ + context: props.context, + declaration: props.declaration, + async: result.async, + }), + undefined, + ts.factory.createBlock(result.statements, true), ), - ], - true, - ), - ); - }; + ), + ], + true, + ), + ); + }; - export const decompose = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (equals: boolean) => - ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - ): { - async: boolean; - functions: ts.Statement[]; - statements: ts.Statement[]; - } => { - const { type, async } = FunctionalGeneralProgrammer.getReturnType( - project.checker, - )(declaration); - const caller: ts.CallExpression = ts.factory.createCallExpression( - expression, - undefined, - declaration.parameters.map((p) => - ts.factory.createIdentifier(p.name.getText()), - ), - ); + export const decompose = (props: IDecomposeProps): IDecomposeOutput => { + const { type, async } = FunctionalGeneralProgrammer.getReturnType({ + checker: props.context.checker, + declaration: props.declaration, + }); + const caller: ts.CallExpression = ts.factory.createCallExpression( + props.expression, + undefined, + props.declaration.parameters.map((p) => + ts.factory.createIdentifier(p.name.getText()), + ), + ); - const name: string = StringUtil.escapeDuplicate( - declaration.parameters.map((p) => p.name.getText()), - )("result"); - return { - async, - functions: [ - StatementFactory.constant( - "__validate_return", - ValidateProgrammer.write(project)(modulo)(equals)(type), + const name: string = StringUtil.escapeDuplicate({ + keep: props.declaration.parameters.map((p) => p.name.getText()), + input: "result", + }); + return { + async, + functions: [ + StatementFactory.constant({ + name: "__validate_return", + value: ValidateProgrammer.write({ + ...props, + type, + name: undefined, + init: undefined, + }), + }), + ], + statements: [ + StatementFactory.constant({ + name, + value: ts.factory.createCallExpression( + ts.factory.createIdentifier("__validate_return"), + undefined, + [async ? ts.factory.createAwaitExpression(caller) : caller], ), - ], - statements: [ - StatementFactory.constant( - name, - ts.factory.createCallExpression( - ts.factory.createIdentifier("__validate_return"), - undefined, - [async ? ts.factory.createAwaitExpression(caller) : caller], + }), + ts.factory.createIfStatement( + ts.factory.createStrictEquality( + ts.factory.createFalse(), + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier(name), + ts.factory.createIdentifier("success"), ), ), - ts.factory.createIfStatement( - ts.factory.createStrictEquality( - ts.factory.createFalse(), + ts.factory.createExpressionStatement( + ts.factory.createBinaryExpression( ts.factory.createPropertyAccessExpression( ts.factory.createIdentifier(name), - ts.factory.createIdentifier("success"), + ts.factory.createIdentifier("errors"), ), - ), - ts.factory.createExpressionStatement( - ts.factory.createBinaryExpression( - ts.factory.createPropertyAccessExpression( + ts.factory.createToken(ts.SyntaxKind.EqualsToken), + FunctionalValidateFunctionProgrammer.hookErrors({ + expression: ts.factory.createPropertyAccessExpression( ts.factory.createIdentifier(name), ts.factory.createIdentifier("errors"), ), - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - FunctionalValidateFunctionProgrammer.hookErrors({ - expression: ts.factory.createPropertyAccessExpression( - ts.factory.createIdentifier(name), - ts.factory.createIdentifier("errors"), - ), - replacer: ts.factory.createStringLiteral("$input.return"), - }), - ), + replacer: ts.factory.createStringLiteral("$input.return"), + }), ), ), - ts.factory.createReturnStatement( - ts.factory.createIdentifier("result"), - ), - ], - }; + ), + ts.factory.createReturnStatement(ts.factory.createIdentifier("result")), + ], }; + }; } diff --git a/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts b/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts index fa7851b10c..4e8ace8b2e 100644 --- a/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts +++ b/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts @@ -3,32 +3,32 @@ import ts from "typescript"; import { TypeFactory } from "../../../factories/TypeFactory"; export namespace FunctionalGeneralProgrammer { + export interface IProps { + checker: ts.TypeChecker; + declaration: ts.FunctionDeclaration | ts.SignatureDeclaration; + } export interface IOutput { type: ts.Type; async: boolean; } - export const getReturnType = - (checker: ts.TypeChecker) => - ( - declaration: ts.FunctionDeclaration | ts.SignatureDeclaration, - ): IOutput => { - const signature: ts.Signature | undefined = - checker.getSignatureFromDeclaration(declaration); - const type: ts.Type = - signature?.getReturnType() ?? - checker.getTypeFromTypeNode(TypeFactory.keyword("any")); + export const getReturnType = (props: IProps): IOutput => { + const signature: ts.Signature | undefined = + props.checker.getSignatureFromDeclaration(props.declaration); + const type: ts.Type = + signature?.getReturnType() ?? + props.checker.getTypeFromTypeNode(TypeFactory.keyword("any")); - if (type.symbol?.name === "Promise") { - const generic: readonly ts.Type[] = checker.getTypeArguments( - type as ts.TypeReference, - ); - return generic.length === 1 - ? { type: generic[0]!, async: true } - : { - type: checker.getTypeFromTypeNode(TypeFactory.keyword("any")), - async: false, - }; - } - return { type, async: false }; - }; + if (type.symbol?.name === "Promise") { + const generic: readonly ts.Type[] = props.checker.getTypeArguments( + type as ts.TypeReference, + ); + return generic.length === 1 + ? { type: generic[0]!, async: true } + : { + type: props.checker.getTypeFromTypeNode(TypeFactory.keyword("any")), + async: false, + }; + } + return { type, async: false }; + }; } diff --git a/src/programmers/helpers/AtomicPredicator.ts b/src/programmers/helpers/AtomicPredicator.ts index d98b907099..c62df14a47 100644 --- a/src/programmers/helpers/AtomicPredicator.ts +++ b/src/programmers/helpers/AtomicPredicator.ts @@ -5,20 +5,31 @@ import { Atomic } from "../../typings/Atomic"; import { ArrayUtil } from "../../utils/ArrayUtil"; export namespace AtomicPredicator { - export const constant = - (meta: Metadata) => - (name: Atomic.Literal): boolean => - !ArrayUtil.has(meta.natives, (native) => native.toLowerCase() === name); + export const constant = (props: { + metadata: Metadata; + name: Atomic.Literal; + }): boolean => + !ArrayUtil.has( + props.metadata.natives, + (native) => native.name.toLowerCase() === props.name, + ); - export const atomic = - (meta: Metadata) => - (name: Atomic.Literal): boolean => - !ArrayUtil.has(meta.natives, (native) => native.toLowerCase() === name); + export const atomic = (props: { + metadata: Metadata; + name: Atomic.Literal; + }): boolean => + !ArrayUtil.has( + props.metadata.natives, + (native) => native.name.toLowerCase() === props.name, + ); export const native = (name: string) => LIKE.has(name.toLowerCase()); - export const template = (meta: Metadata): boolean => - !ArrayUtil.has(meta.natives, (native) => native.toLowerCase() === "string"); + export const template = (metadata: Metadata): boolean => + !ArrayUtil.has( + metadata.natives, + (native) => native.name.toLowerCase() === "string", + ); } const LIKE = new Set(["boolean", "bigint", "number", "string"]); diff --git a/src/programmers/helpers/CloneJoiner.ts b/src/programmers/helpers/CloneJoiner.ts index 42cf731320..1b49cad5f7 100644 --- a/src/programmers/helpers/CloneJoiner.ts +++ b/src/programmers/helpers/CloneJoiner.ts @@ -10,14 +10,14 @@ import { metadata_to_pattern } from "../internal/metadata_to_pattern"; import { IExpressionEntry } from "./IExpressionEntry"; export namespace CloneJoiner { - export const object = ( - input: ts.Expression, - entries: IExpressionEntry[], - ): ts.ConciseBody => { - if (entries.length === 0) return ts.factory.createIdentifier("{}"); + export const object = (props: { + input: ts.Expression; + entries: IExpressionEntry[]; + }): ts.ConciseBody => { + if (props.entries.length === 0) return ts.factory.createIdentifier("{}"); - const regular = entries.filter((e) => e.key.isSoleLiteral()); - const dynamic = entries.filter((e) => !e.key.isSoleLiteral()); + const regular = props.entries.filter((e) => e.key.isSoleLiteral()); + const dynamic = props.entries.filter((e) => !e.key.isSoleLiteral()); const literal = ts.factory.createObjectLiteralExpression( regular.map((entry) => { const str: string = entry.key.getSoleLiteral()!; @@ -44,7 +44,8 @@ export namespace CloneJoiner { ts.factory.createStringLiteral(r.key.getSoleLiteral()!), ), ), - )("some"), + "some", + ), undefined, [ ts.factory.createArrowFunction( @@ -68,7 +69,10 @@ export namespace CloneJoiner { ts.factory.createIfStatement( ts.factory.createCallExpression( ts.factory.createIdentifier( - `RegExp(/${metadata_to_pattern(true)(entry.key)}/).test`, + `RegExp(/${metadata_to_pattern({ + top: true, + metadata: entry.key, + })}/).test`, ), undefined, [key], @@ -88,17 +92,23 @@ export namespace CloneJoiner { ); return ts.factory.createBlock([ - StatementFactory.constant( - "output", - ts.factory.createAsExpression(literal, TypeFactory.keyword("any")), - ), + StatementFactory.constant({ + name: "output", + value: ts.factory.createAsExpression( + literal, + TypeFactory.keyword("any"), + ), + }), ts.factory.createForOfStatement( undefined, - StatementFactory.entry("key")("value"), + StatementFactory.entry({ + key: "key", + value: "value", + }), ts.factory.createCallExpression( ts.factory.createIdentifier("Object.entries"), undefined, - [input], + [props.input], ), ts.factory.createBlock(statements), ), @@ -106,25 +116,28 @@ export namespace CloneJoiner { ]); }; - export const tuple = ( - children: ts.Expression[], - rest: ts.Expression | null, - ): ts.Expression => { + export const tuple = (props: { + elements: ts.Expression[]; + rest: ts.Expression | null; + }): ts.Expression => { return ts.factory.createAsExpression( ts.factory.createArrayLiteralExpression( - rest === null - ? children - : [...children, ts.factory.createSpreadElement(rest)], + props.rest === null + ? props.elements + : [...props.elements, ts.factory.createSpreadElement(props.rest)], true, ), TypeFactory.keyword("any"), ); }; - export const array = (input: ts.Expression, arrow: ts.Expression) => + export const array = (props: { + input: ts.Expression; + arrow: ts.Expression; + }) => ts.factory.createCallExpression( - ts.factory.createPropertyAccessExpression(input, "map"), + ts.factory.createPropertyAccessExpression(props.input, "map"), undefined, - [arrow], + [props.arrow], ); } diff --git a/src/programmers/helpers/FunctionImporeter.ts b/src/programmers/helpers/FunctionImporeter.ts deleted file mode 100644 index 2df1847a28..0000000000 --- a/src/programmers/helpers/FunctionImporeter.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./FunctionImporter"; diff --git a/src/programmers/helpers/FunctionImporter.ts b/src/programmers/helpers/FunctionImporter.ts deleted file mode 100644 index 11e547f057..0000000000 --- a/src/programmers/helpers/FunctionImporter.ts +++ /dev/null @@ -1,97 +0,0 @@ -import ts from "typescript"; - -import { IdentifierFactory } from "../../factories/IdentifierFactory"; -import { StatementFactory } from "../../factories/StatementFactory"; -import { TypeFactory } from "../../factories/TypeFactory"; - -export class FunctionImporter { - private readonly used_: Set = new Set(); - private readonly local_: Set = new Set(); - private readonly unions_: Map = new Map(); - private readonly variables_: Map = new Map(); - private sequence_: number = 0; - - public constructor(public readonly method: string) {} - - public empty(): boolean { - return this.used_.size === 0; - } - - public use(name: string): ts.Identifier { - this.used_.add(name); - return ts.factory.createIdentifier("$" + name); - } - - public useLocal(name: string): string { - this.local_.add(name); - return name; - } - - public hasLocal(name: string): boolean { - return this.local_.has(name); - } - - public declare( - modulo: ts.LeftHandSideExpression, - includeUnions: boolean = true, - ): ts.Statement[] { - return [ - ...[...this.used_].map((name) => - StatementFactory.constant( - "$" + name, - IdentifierFactory.access( - ts.factory.createParenthesizedExpression( - ts.factory.createAsExpression(modulo, TypeFactory.keyword("any")), - ), - )(name), - ), - ), - ...[...this.variables_.entries()].map(([key, value]) => - StatementFactory.constant(key, value), - ), - ...(includeUnions === true - ? [...this.unions_.values()].map(([key, arrow]) => - StatementFactory.constant(key, arrow), - ) - : []), - ]; - } - - public declareUnions(): ts.Statement[] { - return [...this.unions_.values()].map(([key, arrow]) => - StatementFactory.constant(key, arrow), - ); - } - - public increment(): number { - return ++this.sequence_; - } - - public emplaceUnion( - prefix: string, - name: string, - factory: () => ts.ArrowFunction, - ): string { - const key: string = `${prefix}::${name}`; - const oldbie = this.unions_.get(key); - if (oldbie) return oldbie[0]; - - const index: number = this.unions_.size; - const accessor: string = `${prefix}p${index}`; - - const tuple: [string, ReturnType] = [accessor, null!]; - this.unions_.set(key, tuple); - tuple[1] = factory(); - return accessor; - } - - public emplaceVariable(name: string, value: ts.Expression): ts.Expression { - this.variables_.set(name, value); - return ts.factory.createIdentifier(name); - } - - public trace(): void { - console.log(...this.used_); - console.log(...this.local_); - } -} diff --git a/src/programmers/helpers/FunctionProgrammer.ts b/src/programmers/helpers/FunctionProgrammer.ts new file mode 100644 index 0000000000..68a45de08f --- /dev/null +++ b/src/programmers/helpers/FunctionProgrammer.ts @@ -0,0 +1,67 @@ +import ts from "typescript"; + +import { StatementFactory } from "../../factories/StatementFactory"; + +export class FunctionProgrammer { + private readonly local_: Set = new Set(); + private readonly unions_: Map = new Map(); + private readonly variables_: Map = new Map(); + private sequence_: number = 0; + + public constructor(public readonly method: string) {} + + public useLocal(name: string): string { + this.local_.add(name); + return name; + } + + public hasLocal(name: string): boolean { + return this.local_.has(name); + } + + public declare(includeUnions: boolean = true): ts.Statement[] { + return [ + ...[...this.variables_.entries()].map(([name, value]) => + StatementFactory.constant({ name, value }), + ), + ...(includeUnions === true + ? [...this.unions_.values()].map(([name, value]) => + StatementFactory.constant({ name, value }), + ) + : []), + ]; + } + + public declareUnions(): ts.Statement[] { + return [...this.unions_.values()].map(([name, value]) => + StatementFactory.constant({ name, value }), + ); + } + + public increment(): number { + return ++this.sequence_; + } + + public emplaceUnion( + prefix: string, + name: string, + factory: () => ts.ArrowFunction, + ): string { + const key: string = `${prefix}::${name}`; + const oldbie = this.unions_.get(key); + if (oldbie) return oldbie[0]; + + const index: number = this.unions_.size; + const accessor: string = `${prefix}p${index}`; + + const tuple: [string, ReturnType] = [accessor, null!]; + this.unions_.set(key, tuple); + tuple[1] = factory(); + return accessor; + } + + public emplaceVariable(name: string, value: ts.Expression): ts.Expression { + this.variables_.set(name, value); + return ts.factory.createIdentifier(name); + } +} diff --git a/src/programmers/helpers/HttpMetadataUtil.ts b/src/programmers/helpers/HttpMetadataUtil.ts index 6460470ab6..8e563dc472 100644 --- a/src/programmers/helpers/HttpMetadataUtil.ts +++ b/src/programmers/helpers/HttpMetadataUtil.ts @@ -2,20 +2,20 @@ import { Metadata } from "../../schemas/metadata/Metadata"; export namespace HttpMetadataUtil { export const atomics = ( - meta: Metadata, + metadata: Metadata, ): Set<"boolean" | "bigint" | "number" | "string"> => new Set([ - ...meta.atomics.map((a) => a.type), - ...meta.constants.map((c) => c.type), - ...(meta.templates.length ? (["string"] as const) : []), + ...metadata.atomics.map((a) => a.type), + ...metadata.constants.map((c) => c.type), + ...(metadata.templates.length ? (["string"] as const) : []), ]); - export const isUnion = (meta: Metadata): boolean => - atomics(meta).size + - meta.arrays.length + - meta.tuples.length + - meta.natives.length + - meta.maps.length + - meta.objects.length > + export const isUnion = (metadata: Metadata): boolean => + atomics(metadata).size + + metadata.arrays.length + + metadata.tuples.length + + metadata.natives.length + + metadata.maps.length + + metadata.objects.length > 1; } diff --git a/src/programmers/helpers/NotationJoiner.ts b/src/programmers/helpers/NotationJoiner.ts index 258eb7ad40..1bf335a09b 100644 --- a/src/programmers/helpers/NotationJoiner.ts +++ b/src/programmers/helpers/NotationJoiner.ts @@ -10,123 +10,135 @@ import { metadata_to_pattern } from "../internal/metadata_to_pattern"; import { IExpressionEntry } from "./IExpressionEntry"; export namespace NotationJoiner { - export const object = - (rename: (str: string) => string) => - ( - input: ts.Expression, - entries: IExpressionEntry[], - ): ts.ConciseBody => { - if (entries.length === 0) return ts.factory.createIdentifier("{}"); + export const object = (props: { + rename: (str: string) => string; + input: ts.Expression; + entries: IExpressionEntry[]; + }): ts.ConciseBody => { + if (props.entries.length === 0) return ts.factory.createIdentifier("{}"); - const regular = entries.filter((e) => e.key.isSoleLiteral()); - const dynamic = entries.filter((e) => !e.key.isSoleLiteral()); - const literal = ts.factory.createObjectLiteralExpression( - regular.map((entry) => { - const str: string = rename(entry.key.getSoleLiteral()!); - return ts.factory.createPropertyAssignment( - Escaper.variable(str) ? str : ts.factory.createStringLiteral(str), - entry.expression, - ); - }), - true, - ); - if (dynamic.length === 0) return literal; + const regular = props.entries.filter((e) => e.key.isSoleLiteral()); + const dynamic = props.entries.filter((e) => !e.key.isSoleLiteral()); + const literal = ts.factory.createObjectLiteralExpression( + regular.map((entry) => { + const str: string = props.rename(entry.key.getSoleLiteral()!); + return ts.factory.createPropertyAssignment( + Escaper.variable(str) ? str : ts.factory.createStringLiteral(str), + entry.expression, + ); + }), + true, + ); + if (dynamic.length === 0) return literal; - const key = ts.factory.createIdentifier("key"); - const output = ts.factory.createIdentifier("output"); + const key = ts.factory.createIdentifier("key"); + const output = ts.factory.createIdentifier("output"); - const statements: ts.Statement[] = []; - if (regular.length !== 0) - statements.push( - ts.factory.createIfStatement( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createArrayLiteralExpression( - regular.map((r) => - ts.factory.createStringLiteral(r.key.getSoleLiteral()!), - ), - ), - )("some"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("regular")], - undefined, - undefined, - ts.factory.createStrictEquality( - ts.factory.createIdentifier("regular"), - ts.factory.createIdentifier("key"), - ), - ), - ], - ), - ts.factory.createContinueStatement(), - ), - ); + const statements: ts.Statement[] = []; + if (regular.length !== 0) statements.push( - ...dynamic.map((entry) => - ts.factory.createIfStatement( - ts.factory.createCallExpression( - ts.factory.createIdentifier( - `RegExp(/${metadata_to_pattern(true)(entry.key)}/).test`, + ts.factory.createIfStatement( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createArrayLiteralExpression( + regular.map((r) => + ts.factory.createStringLiteral(r.key.getSoleLiteral()!), + ), ), - undefined, - [key], + "some", ), - ts.factory.createBlock([ - ts.factory.createExpressionStatement( - ts.factory.createBinaryExpression( - ts.factory.createElementAccessExpression(output, key), - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - entry.expression, + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("regular")], + undefined, + undefined, + ts.factory.createStrictEquality( + ts.factory.createIdentifier("regular"), + ts.factory.createIdentifier("key"), ), ), - ts.factory.createContinueStatement(), - ]), + ], ), + ts.factory.createContinueStatement(), ), ); - - return ts.factory.createBlock([ - StatementFactory.constant( - "output", - ts.factory.createAsExpression(literal, TypeFactory.keyword("any")), - ), - ts.factory.createForOfStatement( - undefined, - StatementFactory.entry("key")("value"), + statements.push( + ...dynamic.map((entry) => + ts.factory.createIfStatement( ts.factory.createCallExpression( - ts.factory.createIdentifier("Object.entries"), + ts.factory.createIdentifier( + `RegExp(/${metadata_to_pattern({ + top: true, + metadata: entry.key, + })}/).test`, + ), undefined, - [input], + [key], ), - ts.factory.createBlock(statements), + ts.factory.createBlock([ + ts.factory.createExpressionStatement( + ts.factory.createBinaryExpression( + ts.factory.createElementAccessExpression(output, key), + ts.factory.createToken(ts.SyntaxKind.EqualsToken), + entry.expression, + ), + ), + ts.factory.createContinueStatement(), + ]), ), - ts.factory.createReturnStatement(output), - ]); - }; + ), + ); + + return ts.factory.createBlock([ + StatementFactory.constant({ + name: "output", + value: ts.factory.createAsExpression( + literal, + TypeFactory.keyword("any"), + ), + }), + ts.factory.createForOfStatement( + undefined, + StatementFactory.entry({ + key: "key", + value: "value", + }), + ts.factory.createCallExpression( + ts.factory.createIdentifier("Object.entries"), + undefined, + [props.input], + ), + ts.factory.createBlock(statements), + ), + ts.factory.createReturnStatement(output), + ]); + }; - export const tuple = ( - children: ts.Expression[], - rest: ts.Expression | null, - ): ts.Expression => { + export const tuple = (props: { + elements: ts.Expression[]; + rest: ts.Expression | null; + }): ts.Expression => { return ts.factory.createAsExpression( ts.factory.createArrayLiteralExpression( - rest === null - ? children - : [...children, ts.factory.createSpreadElement(rest)], + props.rest === null + ? props.elements + : [...props.elements, ts.factory.createSpreadElement(props.rest)], true, ), TypeFactory.keyword("any"), ); }; - export const array = (input: ts.Expression, arrow: ts.Expression) => + export const array = (props: { + input: ts.Expression; + arrow: ts.Expression; + }) => ts.factory.createCallExpression( - ts.factory.createPropertyAccessExpression(input, "map"), + ts.factory.createPropertyAccessExpression(props.input, "map"), undefined, - [arrow], + [props.arrow], ); } diff --git a/src/programmers/helpers/ProtobufUtil.ts b/src/programmers/helpers/ProtobufUtil.ts index dd8b1f9f4b..25ad2bf0ee 100644 --- a/src/programmers/helpers/ProtobufUtil.ts +++ b/src/programmers/helpers/ProtobufUtil.ts @@ -1,65 +1,162 @@ import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { ProtobufAtomic } from "../../typings/ProtobufAtomic"; export namespace ProtobufUtil { - export const isStaticObject = (obj: MetadataObject): boolean => + export const isStaticObject = (obj: MetadataObjectType): boolean => obj.properties.length >= 1 && obj.properties.every((p) => p.key.isSoleLiteral()); export const size = (meta: Metadata): number => - getAtomics(meta).length + + getAtomics(meta).size + meta.arrays.length + meta.tuples.length + meta.natives.length + meta.objects.length + meta.maps.length; + export const getSequence = (tags: IMetadataTypeTag[]): number | null => { + const sequence = tags.find( + (t) => + t.kind === "sequence" && + typeof (t.schema as any)?.["x-protobuf-sequence"] === "number", + ); + if (sequence === undefined) return null; + const value: number = Number( + (sequence.schema as any)["x-protobuf-sequence"], + ); + return Number.isNaN(value) ? null : value; + }; + export const isUnion = (meta: Metadata): boolean => size(meta) > 1; - export const getAtomics = (meta: Metadata): ProtobufAtomic[] => { - const set: Set = new Set(); - if (meta.templates.length) set.add("string"); + export const getAtomics = ( + meta: Metadata, + union?: Map, + ): Map => { + const map: Map = union ?? new Map(); + + // CONSTANTS for (const c of meta.constants) - if (c.type === "boolean") set.add("bool"); - else if (c.type === "bigint") set.add("uint64"); - else if (c.type === "number") - set.add(deduce_numeric_type(c.values.map((v) => v.value) as number[])); - else if (c.type === "string") set.add("string"); + if (c.type === "boolean") + map.set("bool", getSequence(c.values[0]?.tags[0] ?? [])); + else if (c.type === "bigint") { + const init: ProtobufAtomic.BigNumeric = deduce_bigint_type( + c.values.map((v) => BigInt(v.value)), + ); + for (const value of c.values) + decode_bigint({ + map, + tags: value.tags, + default: init, + }); + } else if (c.type === "number") { + const init: ProtobufAtomic.Numeric = deduce_numeric_type( + c.values.map((v) => v.value) as number[], + ); + for (const value of c.values) + decode_number({ + map, + tags: value.tags, + default: init, + }); + } else if (c.type === "string") + map.set("string", getSequence(c.values[0]?.tags[0] ?? [])); + if (meta.templates.length) + map.set("string", getSequence(meta.templates[0]?.tags[0] ?? [])); + + // ATOMICS for (const atomic of meta.atomics) - if (atomic.type === "boolean") set.add("bool"); + if (atomic.type === "boolean") + map.set("bool", getSequence(atomic.tags[0] ?? [])); else if (atomic.type === "bigint") - decode_bigint(atomic.tags).forEach((t) => set.add(t)); + decode_bigint({ + map, + tags: atomic.tags, + default: "int64", + }); else if (atomic.type === "number") - decode_number(atomic.tags).forEach((t) => set.add(t)); - else if (atomic.type === "string") set.add("string"); + decode_number({ + map, + tags: atomic.tags, + default: "double", + }); + else if (atomic.type === "string") + map.set("string", getSequence(atomic.tags[0] ?? [])); - return [...set].sort(compare); + // SORTING IF REQUIRED + if (Array.from(map.values()).some((v) => v === null)) arrange(map); + return map; }; - export const getNumbers = (meta: Metadata) => { - const set: Set = new Set(); + export const getNumbers = ( + meta: Metadata, + union?: Map, + ): Map => { + const map: Map = union ?? new Map(); for (const c of meta.constants) - if (c.type === "number") - set.add(deduce_numeric_type(c.values.map((v) => v.value) as number[])); + if (c.type === "number") { + const init: ProtobufAtomic.Numeric = deduce_numeric_type( + c.values.map((v) => v.value) as number[], + ); + for (const value of c.values) + decode_number({ + map, + tags: value.tags, + default: init, + }); + } for (const atomic of meta.atomics) if (atomic.type === "number") - decode_number(atomic.tags).forEach((t) => set.add(t)); - return [...set].sort(compare); + decode_number({ + map, + tags: atomic.tags, + default: "double", + }); + if (Array.from(map.values()).some((v) => v === null)) arrange(map); + return map; }; - export const getBigints = (meta: Metadata) => { - const set: Set = new Set(); - for (const c of meta.constants) if (c.type === "bigint") set.add("uint64"); + export const getBigints = ( + meta: Metadata, + union?: Map, + ): Map => { + const map: Map = + union ?? new Map(); + for (const c of meta.constants) + if (c.type === "bigint") { + const init: ProtobufAtomic.BigNumeric = deduce_bigint_type( + c.values.map((v) => BigInt(v.value)), + ); + for (const value of c.values) + decode_bigint({ + map, + tags: value.tags, + default: init, + }); + } for (const atomic of meta.atomics) if (atomic.type === "bigint") - decode_bigint(atomic.tags).forEach((t) => set.add(t)); - return [...set].sort(compare); + decode_bigint({ + map, + tags: atomic.tags, + default: "int64", + }); + if (Array.from(map.values()).some((v) => v === null)) arrange(map); + return map; }; - const compare = (x: ProtobufAtomic, y: ProtobufAtomic): number => + const arrange = (map: Map): void => { + const entries = Array.from(map.entries()).sort((a, b) => + compare(a[0], b[0]), + ); + map.clear(); + for (const [key, value] of entries) map.set(key, value); + }; + + export const compare = (x: ProtobufAtomic, y: ProtobufAtomic): number => ATOMIC_ORDER.get(x)! - ATOMIC_ORDER.get(y)!; } @@ -78,6 +175,8 @@ const ATOMIC_ORDER = new Map( ).map((str, i) => [str, i]), ); +const deduce_bigint_type = (values: bigint[]): ProtobufAtomic.BigNumeric => + values.some((v) => v < 0) ? "int64" : "uint64"; const deduce_numeric_type = (values: number[]): ProtobufAtomic.Numeric => values.every((v) => Math.floor(v) === v) ? values.every((v) => -2147483648 <= v && v <= 2147483647) @@ -85,30 +184,35 @@ const deduce_numeric_type = (values: number[]): ProtobufAtomic.Numeric => : "int64" : "double"; -const decode_bigint = ( - typeTags: IMetadataTypeTag[][], -): ProtobufAtomic.BigNumeric[] => { - if (typeTags.length === 0) return ["int64"]; - - const types: Set = new Set(); - for (const row of typeTags) { +const decode_bigint = (next: { + map: Map; + tags: IMetadataTypeTag[][]; + default: ProtobufAtomic.BigNumeric; +}): void => { + if (next.tags.length === 0) { + next.map.set(next.default, null); + return; + } + for (const row of next.tags) { const value: ProtobufAtomic.BigNumeric | undefined = row.find( (tag) => tag.kind === "type" && (tag.value === "int64" || tag.value === "uint64"), )?.value; - types.add(value ?? "int64"); + next.map.set(value ?? "int64", ProtobufUtil.getSequence(row)); } - return [...types]; }; -const decode_number = ( - typeTags: IMetadataTypeTag[][], -): ProtobufAtomic.Numeric[] => { - if (typeTags.length === 0) return ["double"]; - - const types: Set = new Set(); - for (const row of typeTags) { +const decode_number = (next: { + map: Map; + tags: IMetadataTypeTag[][]; + default: ProtobufAtomic.Numeric; +}): void => { + if (next.tags.length === 0) { + next.map.set(next.default, null); + return; + } + for (const row of next.tags) { const value: ProtobufAtomic.Numeric | undefined = row.find( (tag) => tag.kind === "type" && @@ -119,7 +223,6 @@ const decode_number = ( tag.value === "float" || tag.value === "double"), )?.value; - types.add(value ?? "double"); + next.map.set(value ?? "double", ProtobufUtil.getSequence(row)); } - return [...types]; }; diff --git a/src/programmers/helpers/PruneJoiner.ts b/src/programmers/helpers/PruneJoiner.ts index 09f427a5f8..79f0aedc32 100644 --- a/src/programmers/helpers/PruneJoiner.ts +++ b/src/programmers/helpers/PruneJoiner.ts @@ -2,21 +2,21 @@ import ts from "typescript"; import { IdentifierFactory } from "../../factories/IdentifierFactory"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { metadata_to_pattern } from "../internal/metadata_to_pattern"; import { prune_object_properties } from "../internal/prune_object_properties"; import { IExpressionEntry } from "./IExpressionEntry"; export namespace PruneJoiner { - export const object = ( - input: ts.Expression, - entries: IExpressionEntry[], - obj: MetadataObject, - ): ts.ConciseBody => { + export const object = (props: { + input: ts.Expression; + entries: IExpressionEntry[]; + object: MetadataObjectType; + }): ts.ConciseBody => { // PREPARE ASSETS - const regular = entries.filter((entry) => entry.key.isSoleLiteral()); - const dynamic = entries.filter((entry) => !entry.key.isSoleLiteral()); + const regular = props.entries.filter((entry) => entry.key.isSoleLiteral()); + const dynamic = props.entries.filter((entry) => !entry.key.isSoleLiteral()); const statements: ts.Statement[] = regular .map((entry) => @@ -28,27 +28,34 @@ export namespace PruneJoiner { if (dynamic.length) statements.push( ts.factory.createExpressionStatement( - iterate_dynamic_properties({ regular, dynamic })(input), + iterate_dynamic_properties({ + regular, + dynamic, + input: props.input, + }), ), ); - statements.push(prune_object_properties(obj)); + statements.push(prune_object_properties(props.object)); return ts.factory.createBlock(statements, true); }; - export const array = (input: ts.Expression, arrow: ts.ArrowFunction) => + export const array = (props: { + input: ts.Expression; + arrow: ts.ArrowFunction; + }) => ts.factory.createCallExpression( - IdentifierFactory.access(input)("forEach"), + IdentifierFactory.access(props.input, "forEach"), undefined, - [arrow], + [props.arrow], ); - export const tuple = ( - children: ts.ConciseBody[], - rest: ts.ConciseBody | null, - ): ts.Block => { - const entire: ts.ConciseBody[] = [...children]; - if (rest !== null) entire.push(rest); + export const tuple = (props: { + elements: ts.ConciseBody[]; + rest: ts.ConciseBody | null; + }): ts.Block => { + const entire: ts.ConciseBody[] = [...props.elements]; + if (props.rest !== null) entire.push(props.rest); const statements: ts.Statement[] = entire .map((elem) => @@ -61,79 +68,81 @@ export namespace PruneJoiner { }; } -const iterate_dynamic_properties = - (props: { regular: IExpressionEntry[]; dynamic: IExpressionEntry[] }) => - (input: ts.Expression) => - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createCallExpression( - ts.factory.createIdentifier("Object.entries"), - undefined, - [input], - ), - )("forEach"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - ts.factory.createArrayBindingPattern( - ["key", "value"].map((l) => - ts.factory.createBindingElement( - undefined, - undefined, - ts.factory.createIdentifier(l), - undefined, - ), +const iterate_dynamic_properties = (props: { + regular: IExpressionEntry[]; + dynamic: IExpressionEntry[]; + input: ts.Expression; +}) => + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createCallExpression( + ts.factory.createIdentifier("Object.entries"), + undefined, + [props.input], + ), + "forEach", + ), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + ts.factory.createArrayBindingPattern( + ["key", "value"].map((l) => + ts.factory.createBindingElement( + undefined, + undefined, + ts.factory.createIdentifier(l), + undefined, ), ), ), - ], - undefined, - undefined, - ts.factory.createBlock( - [ + ), + ], + undefined, + undefined, + ts.factory.createBlock( + [ + ts.factory.createIfStatement( + ts.factory.createStrictEquality( + ts.factory.createIdentifier("undefined"), + ts.factory.createIdentifier("value"), + ), + ts.factory.createReturnStatement(), + ), + ...props.regular.map(({ key }) => ts.factory.createIfStatement( ts.factory.createStrictEquality( - ts.factory.createIdentifier("undefined"), - ts.factory.createIdentifier("value"), + ts.factory.createStringLiteral(key.getSoleLiteral()!), + ts.factory.createIdentifier("key"), ), ts.factory.createReturnStatement(), ), - ...props.regular.map(({ key }) => - ts.factory.createIfStatement( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral(key.getSoleLiteral()!), - ts.factory.createIdentifier("key"), - ), - ts.factory.createReturnStatement(), - ), - ), - ...props.dynamic.map((dynamic) => - ts.factory.createIfStatement( - ts.factory.createCallExpression( - ts.factory.createIdentifier( - `RegExp(/${metadata_to_pattern(true)( - dynamic.key, - )}/).test`, - ), - undefined, - [ts.factory.createIdentifier("key")], + ), + ...props.dynamic.map((dynamic) => + ts.factory.createIfStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier( + `RegExp(/${metadata_to_pattern({ + top: true, + metadata: dynamic.key, + })}/).test`, ), - ts.isBlock(dynamic.expression) - ? dynamic.expression - : ts.factory.createBlock([ - ts.factory.createExpressionStatement( - dynamic.expression, - ), - ]), + undefined, + [ts.factory.createIdentifier("key")], ), + ts.isBlock(dynamic.expression) + ? dynamic.expression + : ts.factory.createBlock([ + ts.factory.createExpressionStatement(dynamic.expression), + ]), ), - ], - true, - ), + ), + ], + true, ), - ], - ); + ), + ], + ); diff --git a/src/programmers/helpers/RandomJoiner.ts b/src/programmers/helpers/RandomJoiner.ts index aed9a1e3b1..e0eb35e055 100644 --- a/src/programmers/helpers/RandomJoiner.ts +++ b/src/programmers/helpers/RandomJoiner.ts @@ -1,145 +1,168 @@ +import { OpenApi } from "@samchon/openapi"; import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; -import { StatementFactory } from "../../factories/StatementFactory"; -import { TypeFactory } from "../../factories/TypeFactory"; +import { IdentifierFactory } from "../../factories/IdentifierFactory"; +import { LiteralFactory } from "../../factories/LiteralFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataArray } from "../../schemas/metadata/MetadataArray"; +import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; +import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; +import { MetadataTupleType } from "../../schemas/metadata/MetadataTupleType"; import { Escaper } from "../../utils/Escaper"; export namespace RandomJoiner { - export type Decoder = (meta: Metadata) => ts.Expression; + export type Decoder = (metadata: Metadata) => ts.Expression; - export const array = - (coalesce: (method: string) => ts.Expression) => - (decoder: Decoder) => - (explore: IExplore) => - (length: ts.Expression | undefined, unique: ts.Expression | undefined) => - (item: Metadata): ts.Expression => { - const generator: ts.Expression = ts.factory.createCallExpression( - coalesce("array"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [], - undefined, - undefined, - decoder(item), - ), - ...(length - ? [length] - : unique - ? [ts.factory.createIdentifier("undefined")] + export const array = (props: { + decode: Decoder; + recursive: boolean; + expression: ts.Expression; + array: MetadataArrayType; + schema: Omit | undefined; + }): ts.Expression => { + const call: ts.Expression = ts.factory.createCallExpression( + props.expression, + undefined, + [ + ts.factory.createObjectLiteralExpression( + [ + ...(props.schema + ? Object.entries(props.schema) + .filter(([key]) => key !== "items") + .map(([key, value]) => + ts.factory.createPropertyAssignment( + IdentifierFactory.identifier(key), + LiteralFactory.write(value), + ), + ) : []), - ...(unique ? [unique] : []), - ], - ); - if (explore.recursive === false) return generator; - return ts.factory.createConditionalExpression( - ts.factory.createGreaterThanEquals( - ExpressionFactory.number(5), - ts.factory.createIdentifier("_depth"), + ...(props.schema + ? [] + : [ + ts.factory.createSpreadAssignment( + ts.factory.createIdentifier("_schema"), + ), + ]), + ts.factory.createPropertyAssignment( + "element", + ts.factory.createArrowFunction( + undefined, + undefined, + [], + undefined, + undefined, + props.decode(props.array.value), + ), + ), + ], + true, ), - undefined, - generator, - undefined, - ts.factory.createArrayLiteralExpression([]), - ); - }; + ], + ); + if (props.recursive === false) return call; + return ts.factory.createConditionalExpression( + ts.factory.createGreaterThanEquals( + ExpressionFactory.number(5), + ts.factory.createIdentifier("_depth"), + ), + undefined, + call, + undefined, + ts.factory.createArrayLiteralExpression([]), + ); + }; - export const tuple = (decoder: Decoder) => (elements: Metadata[]) => + export const tuple = (props: { + decode: Decoder; + elements: Metadata[]; + }): ts.ArrayLiteralExpression => ts.factory.createArrayLiteralExpression( - elements.map((elem) => decoder(elem.rest ?? elem)), + props.elements.map((elem) => props.decode(elem.rest ?? elem)), true, ); - export const object = - (coalesce: (method: string) => ts.Expression) => - (decoder: Decoder) => - (obj: MetadataObject): ts.ConciseBody => { - if (obj.properties.length === 0) return ts.factory.createIdentifier("{}"); + export const object = (props: { + decode: Decoder; + object: MetadataObjectType; + }): ts.ConciseBody => { + if (props.object.properties.length === 0) return LiteralFactory.write({}); - // LIST UP PROPERTIES - const regular = obj.properties.filter((p) => p.key.isSoleLiteral()); - const dynamic = obj.properties.filter((p) => !p.key.isSoleLiteral()); - - // REGULAR OBJECT - const literal: ts.ObjectLiteralExpression = - ts.factory.createObjectLiteralExpression( - regular.map((p) => { - const str: string = p.key.getSoleLiteral()!; - return ts.factory.createPropertyAssignment( - Escaper.variable(str) ? str : ts.factory.createStringLiteral(str), - decoder(p.value), - ); - }), - true, - ); - if (dynamic.length === 0) return literal; - - const properties: ts.Statement[] = dynamic.map((p) => - ts.factory.createExpressionStatement( - dynamicProperty(coalesce)(decoder)(p), - ), - ); - return ts.factory.createBlock( - [ - StatementFactory.constant( - "output", - ts.factory.createAsExpression(literal, TypeFactory.keyword("any")), - ), - ...(obj.recursive - ? [ - ts.factory.createIfStatement( - ts.factory.createGreaterThanEquals( - ExpressionFactory.number(5), - ts.factory.createIdentifier("_depth"), - ), - ts.factory.createBlock(properties, true), - ), - ] - : properties), - ts.factory.createReturnStatement( - ts.factory.createIdentifier("output"), - ), - ], - true, - ); - }; + // LIST UP PROPERTIES + const regular = props.object.properties.filter((p) => + p.key.isSoleLiteral(), + ); + const dynamic = props.object.properties.filter( + (p) => !p.key.isSoleLiteral(), + ); - const dynamicProperty = - (coalesce: (method: string) => ts.Expression) => - (decoder: Decoder) => - (p: MetadataProperty) => - ts.factory.createCallExpression(coalesce("array"), undefined, [ - ts.factory.createArrowFunction( - undefined, - undefined, - [], - undefined, - undefined, - ts.factory.createBinaryExpression( - ts.factory.createElementAccessExpression( - ts.factory.createIdentifier("output"), - decoder(p.key), - ), - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - decoder(p.value), + return ts.factory.createObjectLiteralExpression( + [ + ...regular.map((p) => { + const str: string = p.key.getSoleLiteral()!; + return ts.factory.createPropertyAssignment( + Escaper.variable(str) ? str : ts.factory.createStringLiteral(str), + props.decode(p.value), + ); + }), + ...dynamic.map((property) => + ts.factory.createSpreadAssignment( + dynamicProperty({ + decode: props.decode, + property: property, + }), ), ), - ts.factory.createCallExpression(coalesce("integer"), undefined, [ - ExpressionFactory.number(0), - ExpressionFactory.number(3), - ]), - ]); -} + ], + true, + ); + }; -interface IExplore { - function: boolean; - recursive: boolean; + const dynamicProperty = (props: { + decode: Decoder; + property: MetadataProperty; + }) => { + const tuple: MetadataTuple = MetadataTuple.create({ + type: MetadataTupleType.create({ + name: `[${props.property.key.getName()}, ${props.property.value.getName()}]`, + elements: [props.property.key, props.property.value], + index: null, + recursive: false, + nullables: [false], + }), + tags: [], + }); + const array: MetadataArray = MetadataArray.create({ + type: MetadataArrayType.create({ + name: `Array<[${props.property.key.getName()}, ${props.property.value.getName()}]>`, + value: Metadata.create({ + ...Metadata.initialize(), + tuples: [tuple], + }), + nullables: [false], + recursive: false, + index: null, + }), + tags: [[]], + }); + return ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier("Object"), + "fromEntries", + ), + undefined, + [ + props.decode( + Metadata.create({ + ...Metadata.initialize(), + arrays: [array], + }), + ), + ], + ); + }; } diff --git a/src/programmers/helpers/RandomRanger.ts b/src/programmers/helpers/RandomRanger.ts deleted file mode 100644 index dbc7666bc1..0000000000 --- a/src/programmers/helpers/RandomRanger.ts +++ /dev/null @@ -1,171 +0,0 @@ -import ts from "typescript"; - -import { ExpressionFactory } from "../../factories/ExpressionFactory"; - -import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; - -export namespace RandomRanger { - export interface IDefaults { - minimum: number; - maximum: number; - gap: number; - } - - export const length = - (coalesce: (method: string) => ts.Expression) => - (defs: IDefaults) => - (acc: length.IAccessors) => - (tags: IMetadataTypeTag[]): ts.Expression | undefined => { - const props = { - minimum: getter(tags)(acc.minimum), - maximum: getter(tags)(acc.maximum), - }; - if (props.minimum === undefined && props.maximum === undefined) - return undefined; - - if (props.maximum !== undefined && props.minimum === undefined) { - if (props.maximum <= 0) { - props.maximum = 0; - props.minimum = 0; - } else if (props.maximum < defs.gap) - props.minimum = defs.minimum === 0 ? 0 : 1; - } - props.minimum ??= defs.minimum; - props.maximum ??= defs.maximum; - if (props.maximum < props.minimum) (props.maximum as number) += defs.gap; - - return ts.factory.createCallExpression(coalesce("integer"), undefined, [ - ExpressionFactory.number(props.minimum), - ExpressionFactory.number(props.maximum), - ]); - }; - export namespace length { - export interface IAccessors { - minimum: string; - maximum: string; - } - } - - export const number = - (config: number.IConfig) => - (defs: IDefaults) => - (tags: IMetadataTypeTag[]): ts.Expression => { - const range = { - minimum: { - value: getter(tags)("minimum") ?? getter(tags)("exclusiveMinimum"), - exclusive: getter(tags)("exclusiveMinimum") !== undefined, - }, - maximum: { - value: getter(tags)("maximum") ?? getter(tags)("exclusiveMaximum"), - exclusive: getter(tags)("exclusiveMaximum") !== undefined, - }, - stepper: undefined, - multiply: getter(tags)("multipleOf"), - }; - - //---- - // MULTIPLIERS - //---- - if (range.multiply !== undefined) { - const { minimum, maximum } = multiplier(defs.gap)(range)( - range.multiply, - ); - return ts.factory.createMultiply( - config.transform(range.multiply), - config.setter([minimum, maximum]), - ); - } - - //---- - // RANGE - //---- - // INT - const integer = (value: number) => value === Math.floor(value); - if (config.type === "int" || config.type === "uint") { - if (range.minimum.value !== undefined) { - if (range.minimum.exclusive) { - range.minimum.exclusive = false; - if (integer(range.minimum.value)) range.minimum.value += 1; - } - range.minimum.value = Math.ceil(range.minimum.value); - } - if (range.maximum.value !== undefined) { - if (range.maximum.exclusive) { - range.maximum.exclusive = false; - if (integer(range.maximum.value)) range.maximum.value -= 1; - } - range.maximum.value = Math.floor(range.maximum.value); - } - } - - // UNSIGNED INT - if (config.type === "uint") { - if (range.minimum.value === undefined) range.minimum.value = 0; - else if (range.minimum.value <= 0) { - range.minimum.value = 0; - range.minimum.exclusive = false; - } - } - - const minimum = - range.minimum.value ?? - (range.maximum.value !== undefined - ? range.maximum.value - defs.gap - : defs.minimum); - const maximum = - range.maximum.value ?? - (range.minimum.value !== undefined - ? range.minimum.value + defs.gap - : defs.maximum); - return config.setter([minimum, maximum]); - }; - export namespace number { - export interface IConfig { - setter: (args: number[]) => ts.Expression; - transform: (value: number) => ts.Expression; - type: "int" | "uint" | "double"; - } - } -} - -const getter = - (tags: IMetadataTypeTag[]) => - (kind: string): number | undefined => { - const value: bigint | number | undefined = tags.find( - (t) => - t.kind === kind && - (typeof t.value === "number" || typeof t.value === "bigint"), - )?.value; - return value !== undefined ? Number(value) : undefined; - }; - -const multiplier = (gap: number) => (range: IRange) => (m: number) => { - const minimum: number = - range.minimum.value === undefined - ? 0 - : (() => { - const x: number = m * Math.ceil(range.minimum.value / m); - return range.minimum.exclusive && x === range.minimum.value - ? x + m - : x; - })() / m; - const maximum: number = - range.maximum.value === undefined - ? gap - : (() => { - const y: number = m * Math.floor(range.maximum.value / m); - return range.maximum.exclusive && y === range.maximum.value - ? y - m - : y; - })() / m; - return { minimum, maximum }; -}; - -interface IRange { - minimum: IScalar; - maximum: IScalar; -} -interface IScalar { - value?: undefined | number; - exclusive: boolean; -} diff --git a/src/programmers/helpers/StringifyJoinder.ts b/src/programmers/helpers/StringifyJoinder.ts index 8558e7a7d7..7bc8154ea2 100644 --- a/src/programmers/helpers/StringifyJoinder.ts +++ b/src/programmers/helpers/StringifyJoinder.ts @@ -3,73 +3,77 @@ import ts from "typescript"; import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { TemplateFactory } from "../../factories/TemplateFactory"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; + import { stringify_dynamic_properties } from "../internal/stringify_dynamic_properties"; import { stringify_regular_properties } from "../internal/stringify_regular_properties"; -import { FunctionImporter } from "./FunctionImporter"; import { IExpressionEntry } from "./IExpressionEntry"; export namespace StringifyJoiner { - export const object = - (importer: FunctionImporter) => - ( - _input: ts.Expression, - entries: IExpressionEntry[], - ): ts.Expression => { - // CHECK AND SORT ENTRIES - if (entries.length === 0) return ts.factory.createStringLiteral("{}"); + export const object = (props: { + context: ITypiaContext; + entries: IExpressionEntry[]; + }): ts.Expression => { + // CHECK AND SORT ENTRIES + if (props.entries.length === 0) return ts.factory.createStringLiteral("{}"); - // PROPERTIES - const regular: IExpressionEntry[] = entries.filter( - (entry) => entry.key.isSoleLiteral(), - ); - const dynamic: IExpressionEntry[] = entries.filter( - (entry) => !entry.key.isSoleLiteral(), - ); - const expressions: ts.Expression[] = [ - ...stringify_regular_properties(regular, dynamic), - ...(dynamic.length - ? [ - stringify_dynamic_properties( - dynamic, - regular.map((r) => r.key.getSoleLiteral()!), - ), - ] - : []), - ]; + // PROPERTIES + const regular: IExpressionEntry[] = props.entries.filter( + (entry) => entry.key.isSoleLiteral(), + ); + const dynamic: IExpressionEntry[] = props.entries.filter( + (entry) => !entry.key.isSoleLiteral(), + ); + const expressions: ts.Expression[] = [ + ...stringify_regular_properties({ + regular, + dynamic, + }), + ...(dynamic.length + ? [ + stringify_dynamic_properties( + dynamic, + regular.map((r) => r.key.getSoleLiteral()!), + ), + ] + : []), + ]; - // POP LAST COMMA, IF REQUIRED - const filtered: ts.Expression[] = - (regular.length && - regular[regular.length - 1]!.meta.isRequired() && - dynamic.length === 0) || - (regular.length === 0 && dynamic.length) - ? expressions - : [ - ts.factory.createCallExpression(importer.use("tail"), undefined, [ - TemplateFactory.generate(expressions), - ]), - ]; + // POP LAST COMMA, IF REQUIRED + const filtered: ts.Expression[] = + (regular.length && + regular[regular.length - 1]!.meta.isRequired() && + dynamic.length === 0) || + (regular.length === 0 && dynamic.length) + ? expressions + : [ + ts.factory.createCallExpression( + props.context.importer.internal("jsonStringifyTail"), + undefined, + [TemplateFactory.generate(expressions)], + ), + ]; - // RETURNS WITH OBJECT BRACKET - return TemplateFactory.generate([ - ts.factory.createStringLiteral(`{`), - ...filtered, - ts.factory.createStringLiteral(`}`), - ]); - }; + // RETURNS WITH OBJECT BRACKET + return TemplateFactory.generate([ + ts.factory.createStringLiteral(`{`), + ...filtered, + ts.factory.createStringLiteral(`}`), + ]); + }; - export const array = ( - input: ts.Expression, - arrow: ts.ArrowFunction, - ): ts.Expression => + export const array = (props: { + input: ts.Expression; + arrow: ts.ArrowFunction; + }): ts.Expression => TemplateFactory.generate([ ts.factory.createStringLiteral(`[`), ts.factory.createCallExpression( ts.factory.createPropertyAccessExpression( ts.factory.createCallExpression( - IdentifierFactory.access(input)("map"), + IdentifierFactory.access(props.input, "map"), undefined, - [arrow], + [props.arrow], ), ts.factory.createIdentifier("join"), ), @@ -79,27 +83,33 @@ export namespace StringifyJoiner { ts.factory.createStringLiteral(`]`), ]); - export const tuple = ( - children: ts.Expression[], - rest: ts.Expression | null, - ): ts.Expression => { - if (children.length === 0) return ts.factory.createStringLiteral("[]"); - if (rest === null && children.every((child) => ts.isStringLiteral(child))) + export const tuple = (props: { + elements: ts.Expression[]; + rest: ts.Expression | null; + }): ts.Expression => { + if (props.elements.length === 0) + return ts.factory.createStringLiteral("[]"); + if ( + props.rest === null && + props.elements.every((child) => ts.isStringLiteral(child)) + ) return ts.factory.createStringLiteral( "[" + - children.map((child) => (child as ts.StringLiteral).text).join(",") + + props.elements + .map((child) => (child as ts.StringLiteral).text) + .join(",") + "]", ); - const elements: ts.Expression[] = [ts.factory.createStringLiteral(`[`)]; - children.forEach((child, i) => { - elements.push(child); - if (i !== children.length - 1) - elements.push(ts.factory.createStringLiteral(`,`)); + const expressions: ts.Expression[] = [ts.factory.createStringLiteral(`[`)]; + props.elements.forEach((child, i) => { + expressions.push(child); + if (i !== props.elements.length - 1) + expressions.push(ts.factory.createStringLiteral(`,`)); }); - if (rest !== null) elements.push(rest); + if (props.rest !== null) expressions.push(props.rest); - elements.push(ts.factory.createStringLiteral(`]`)); - return TemplateFactory.generate(elements); + expressions.push(ts.factory.createStringLiteral(`]`)); + return TemplateFactory.generate(expressions); }; } diff --git a/src/programmers/helpers/StringifyPredicator.ts b/src/programmers/helpers/StringifyPredicator.ts index b15eb3cc5e..604ab8721a 100644 --- a/src/programmers/helpers/StringifyPredicator.ts +++ b/src/programmers/helpers/StringifyPredicator.ts @@ -4,9 +4,10 @@ export namespace StringifyPredicator { export const require_escape = (value: string): boolean => value.split("").some((ch) => ESCAPED.some((escaped) => escaped === ch)); - export const undefindable = (meta: Metadata): boolean => - meta.isRequired() === false || - (meta.escaped !== null && meta.escaped.returns.isRequired() === false); + export const undefindable = (metadata: Metadata): boolean => + metadata.isRequired() === false || + (metadata.escaped !== null && + metadata.escaped.returns.isRequired() === false); const ESCAPED = ['"', "\\", "\b", "\f", "\n", "\n", "\r", "\t"]; } diff --git a/src/programmers/helpers/UnionExplorer.ts b/src/programmers/helpers/UnionExplorer.ts index 56a7eb1471..f0f896b45e 100644 --- a/src/programmers/helpers/UnionExplorer.ts +++ b/src/programmers/helpers/UnionExplorer.ts @@ -6,7 +6,9 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataMap } from "../../schemas/metadata/MetadataMap"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; +import { MetadataSet } from "../../schemas/metadata/MetadataSet"; import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../../schemas/metadata/MetadataTupleType"; @@ -16,219 +18,316 @@ import { UnionPredicator } from "./UnionPredicator"; export namespace UnionExplorer { export interface Decoder { - ( - input: ts.Expression, - target: T, - explore: FeatureProgrammer.IExplore, - ): ts.Expression; + (props: { + input: ts.Expression; + definition: T; + explore: FeatureProgrammer.IExplore; + }): ts.Expression; } - export type ObjectCombiner = Decoder; + export type ObjectCombiner = Decoder; /* ----------------------------------------------------------- OBJECT ----------------------------------------------------------- */ - export const object = - (config: FeatureProgrammer.IConfig, level: number = 0) => - ( - input: ts.Expression, - targets: MetadataObject[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - // BREAKER - if (targets.length === 1) - return config.objector.decoder()(input, targets[0]!, explore); + export const object = (props: { + config: FeatureProgrammer.IConfig; + level?: number; + objects: MetadataObjectType[]; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + // BREAKER + if (props.objects.length === 1) + return props.config.objector.decoder({ + input: props.input, + object: props.objects[0]!, + explore: props.explore, + }); - const expected: string = `(${targets.map((t) => t.name).join(" | ")})`; + const expected: string = `(${props.objects.map((t) => t.name).join(" | ")})`; - // POSSIBLE TO SPECIALIZE? - const specList = UnionPredicator.object(targets); - if (specList.length === 0) { - const condition: ts.Expression = config.objector.unionizer( - input, - targets, - { - ...explore, - tracable: false, - }, - ); - return config.objector.full - ? config.objector.full(condition)(input, expected, explore) - : condition; - } - const remained: MetadataObject[] = targets.filter( - (t) => specList.find((s) => s.object === t) === undefined, - ); + // POSSIBLE TO SPECIALIZE? + const specList = UnionPredicator.object(props.objects); + if (specList.length === 0) { + const condition: ts.Expression = props.config.objector.unionizer({ + objects: props.objects, + input: props.input, + explore: { + ...props.explore, + tracable: false, + }, + }); + return props.config.objector.full + ? props.config.objector.full({ + condition, + expected, + explore: props.explore, + input: props.input, + }) + : condition; + } + const remained: MetadataObjectType[] = props.objects.filter( + (t) => specList.find((s) => s.object === t) === undefined, + ); - // DO SPECIALIZE - const condition: ts.IfStatement = specList - .filter((spec) => spec.property.key.getSoleLiteral() !== null) - .map((spec, i, array) => { - const key: string = spec.property.key.getSoleLiteral()!; - const accessor: ts.Expression = IdentifierFactory.access(input)(key); - const pred: ts.Expression = spec.neighbour - ? config.objector.checker()(accessor, spec.property.value, { - ...explore, + // DO SPECIALIZE + const condition: ts.IfStatement = specList + .filter((spec) => spec.property.key.getSoleLiteral() !== null) + .map((spec, i, array) => { + const key: string = spec.property.key.getSoleLiteral()!; + const accessor: ts.Expression = IdentifierFactory.access( + props.input, + key, + ); + const pred: ts.Expression = spec.neighbour + ? props.config.objector.checker({ + input: accessor, + metadata: spec.property.value, + explore: { + ...props.explore, tracable: false, postfix: IdentifierFactory.postfix(key), - }) - : (config.objector.required || ((exp) => exp))( - ExpressionFactory.isRequired(accessor), - ); - return ts.factory.createIfStatement( - (config.objector.is || ((exp) => exp))(pred), - ts.factory.createReturnStatement( - config.objector.decoder()(input, spec.object, explore), - ), - i === array.length - 1 - ? remained.length - ? ts.factory.createReturnStatement( - object(config, level + 1)(input, remained, explore), - ) - : config.objector.failure(input, expected, explore) - : undefined, - ); - }) - .reverse() - .reduce((a, b) => - ts.factory.createIfStatement(b.expression, b.thenStatement, a), + }, + }) + : (props.config.objector.required || ((exp) => exp))( + ExpressionFactory.isRequired(accessor), + ); + return ts.factory.createIfStatement( + (props.config.objector.is || ((exp) => exp))(pred), + ts.factory.createReturnStatement( + props.config.objector.decoder({ + object: spec.object, + input: props.input, + explore: props.explore, + }), + ), + i === array.length - 1 + ? remained.length + ? ts.factory.createReturnStatement( + object({ + config: props.config, + level: (props.level ?? 0) + 1, + input: props.input, + objects: remained, + explore: props.explore, + }), + ) + : props.config.objector.failure({ + input: props.input, + explore: props.explore, + expected, + }) + : undefined, ); + }) + .reverse() + .reduce((a, b) => + ts.factory.createIfStatement(b.expression, b.thenStatement, a), + ); - // RETURNS WITH CONDITIONS - return ts.factory.createCallExpression( - ts.factory.createArrowFunction( - undefined, - undefined, - [], - undefined, - undefined, - ts.factory.createBlock([condition], true), - ), + // RETURNS WITH CONDITIONS + return ts.factory.createCallExpression( + ts.factory.createArrowFunction( undefined, undefined, - ); - }; + [], + undefined, + undefined, + ts.factory.createBlock([condition], true), + ), + undefined, + undefined, + ); + }; /* ----------------------------------------------------------- ARRAY LIKE ----------------------------------------------------------- */ - export const tuple = ( - props: check_union_array_like.IProps, - ) => + export const tuple = (props: { + config: check_union_array_like.IConfig; + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + tuples: MetadataTuple[]; + explore: FeatureProgrammer.IExplore; + }) => check_union_array_like({ - transform: (x) => x, - element: (x) => x, - size: null!, - front: (input) => input, - array: (input) => input, - name: (t) => t.type.name, - })(props); + config: props.config, + accessor: { + transform: (x) => x, + element: (x) => x, + size: null!, + front: (input) => input, + array: (input) => input, + name: (t) => t.type.name, + }, + parameters: props.parameters, + input: props.input, + definitions: props.tuples, + explore: props.explore, + }); export namespace tuple { - export type IProps = check_union_array_like.IProps< + export type IConfig = check_union_array_like.IConfig< MetadataTuple, MetadataTuple >; } - export const array = (props: array.IProps) => + export const array = (props: { + config: array.IConfig; + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + arrays: MetadataArray[]; + explore: FeatureProgrammer.IExplore; + }) => check_union_array_like({ - transform: (x) => x, - element: (x) => x.type.value, - size: (input) => IdentifierFactory.access(input)("length"), - front: (input) => ts.factory.createElementAccessExpression(input, 0), - array: (input) => input, - name: (t) => t.type.name, - })(props); + config: props.config, + accessor: { + transform: (x) => x, + element: (x) => x.type.value, + size: (input) => IdentifierFactory.access(input, "length"), + front: (input) => ts.factory.createElementAccessExpression(input, 0), + array: (input) => input, + name: (t) => t.type.name, + }, + parameters: props.parameters, + input: props.input, + definitions: props.arrays, + explore: props.explore, + }); export namespace array { - export type IProps = check_union_array_like.IProps; + export type IConfig = check_union_array_like.IConfig< + MetadataArray, + Metadata + >; } - export const array_or_tuple = (props: array_or_tuple.IProps) => + export const array_or_tuple = (props: { + config: array_or_tuple.IConfig; + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + definitions: (MetadataArray | MetadataTuple)[]; + explore: FeatureProgrammer.IExplore; + }) => check_union_array_like< MetadataArray | MetadataTuple, MetadataArray | MetadataTuple, Metadata | MetadataTuple >({ - transform: (x) => x, - element: (x) => (x instanceof MetadataArray ? x.type.value : x), - size: (input) => IdentifierFactory.access(input)("length"), - front: (input) => ts.factory.createElementAccessExpression(input, 0), - array: (input) => input, - name: (m) => m.type.name, - })(props); + config: props.config, + accessor: { + transform: (x) => x, + element: (x) => (x instanceof MetadataArray ? x.type.value : x), + size: (input) => IdentifierFactory.access(input, "length"), + front: (input) => ts.factory.createElementAccessExpression(input, 0), + array: (input) => input, + name: (m) => m.type.name, + }, + parameters: props.parameters, + input: props.input, + definitions: props.definitions, + explore: props.explore, + }); export namespace array_or_tuple { - export type IProps = check_union_array_like.IProps< + export type IConfig = check_union_array_like.IConfig< MetadataArray | MetadataTuple, - Metadata + Metadata | MetadataTuple >; } - export const set = (props: set.IProps) => + export const set = (props: { + config: set.IConfig; + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + sets: MetadataSet[]; + explore: FeatureProgrammer.IExplore; + }) => check_union_array_like({ - transform: (value: Metadata) => - MetadataArray.create({ - tags: [], - type: MetadataArrayType.create({ - name: `Set<${value.getName()}>`, - index: null, - recursive: false, - nullables: [], - value, + config: props.config, + accessor: { + transform: (value: Metadata) => + MetadataArray.create({ + tags: [], + type: MetadataArrayType.create({ + name: `Set<${value.getName()}>`, + index: null, + recursive: false, + nullables: [], + value, + }), }), - }), - element: (array) => array.type.value, - size: (input) => IdentifierFactory.access(input)("size"), - front: (input) => - IdentifierFactory.access( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("values"), - undefined, - undefined, + element: (array) => array.type.value, + size: (input) => IdentifierFactory.access(input, "size"), + front: (input) => + IdentifierFactory.access( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createCallExpression( + IdentifierFactory.access(input, "values"), + undefined, + undefined, + ), + "next", ), - )("next"), - undefined, - undefined, + undefined, + undefined, + ), + "value", ), - )("value"), - array: (input) => - ts.factory.createArrayLiteralExpression( - [ts.factory.createSpreadElement(input)], - false, - ), - name: (_m, e) => `Set<${e.getName()}>`, - })(props); + array: (input) => + ts.factory.createArrayLiteralExpression( + [ts.factory.createSpreadElement(input)], + false, + ), + name: (_m, e) => `Set<${e.getName()}>`, + }, + parameters: props.parameters, + input: props.input, + definitions: props.sets.map((s) => s.value), + explore: props.explore, + }); export namespace set { - export type IProps = check_union_array_like.IProps; + export type IConfig = check_union_array_like.IConfig< + MetadataArray, + Metadata + >; } - export const map = (props: map.IProps) => - check_union_array_like( - { + export const map = (props: { + config: map.IConfig; + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + maps: MetadataMap[]; + explore: FeatureProgrammer.IExplore; + }) => + check_union_array_like({ + config: props.config, + accessor: { element: (array) => array.type.value.tuples[0]!.type.elements as [Metadata, Metadata], - size: (input) => IdentifierFactory.access(input)("size"), + size: (input) => IdentifierFactory.access(input, "size"), front: (input) => IdentifierFactory.access( ts.factory.createCallExpression( IdentifierFactory.access( ts.factory.createCallExpression( - IdentifierFactory.access(input)("entries"), + IdentifierFactory.access(input, "entries"), undefined, undefined, ), - )("next"), + "next", + ), undefined, undefined, ), - )("value"), + "value", + ), array: (input) => ts.factory.createArrayLiteralExpression( [ts.factory.createSpreadElement(input)], false, ), name: (_m, [k, v]) => `Map<${k.getName()}, ${v.getName()}>`, - transform: (m: Metadata.Entry) => + transform: (m: MetadataMap) => MetadataArray.create({ tags: [], type: MetadataArrayType.create({ @@ -258,10 +357,14 @@ export namespace UnionExplorer { }), }), }, - )(props); + parameters: props.parameters, + input: props.input, + definitions: props.maps, + explore: props.explore, + }); export namespace map { - export type IProps = check_union_array_like.IProps< + export type IConfig = check_union_array_like.IConfig< MetadataArray, [Metadata, Metadata] >; diff --git a/src/programmers/helpers/UnionPredicator.ts b/src/programmers/helpers/UnionPredicator.ts index 6ef60a9203..ce41b7447e 100644 --- a/src/programmers/helpers/UnionPredicator.ts +++ b/src/programmers/helpers/UnionPredicator.ts @@ -1,5 +1,5 @@ import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; import { ArrayUtil } from "../../utils/ArrayUtil"; @@ -8,23 +8,25 @@ import { MapUtil } from "../../utils/MapUtil"; export namespace UnionPredicator { export interface ISpecialized { index: number; - object: MetadataObject; + object: MetadataObjectType; property: MetadataProperty; neighbour: boolean; } - export const object = (targets: MetadataObject[]): Array => { + export const object = ( + objects: MetadataObjectType[], + ): Array => { // PROPERTY MATRIX const matrix: Map> = new Map(); - for (const obj of targets) + for (const obj of objects) for (const prop of obj.properties) { const key: string | null = prop.key.getSoleLiteral(); if (key !== null) - MapUtil.take(matrix)(key, () => - ArrayUtil.repeat(targets.length, () => null), + MapUtil.take(matrix, key, () => + ArrayUtil.repeat(objects.length, () => null), ); } - targets.forEach((obj, i) => { + objects.forEach((obj, i) => { for (const prop of obj.properties) { const key: string | null = prop.key.getSoleLiteral(); if (key !== null) matrix.get(key)![i] = prop; @@ -33,7 +35,7 @@ export namespace UnionPredicator { // EXPLORE SPECIALIZERS const output: ISpecialized[] = []; - targets.forEach((obj, i) => { + objects.forEach((obj, i) => { const children: ISpecializedProperty[] = []; obj.properties.forEach((prop) => { // MUST BE REQUIRED diff --git a/src/programmers/helpers/disable_function_importer_declare.ts b/src/programmers/helpers/disable_function_importer_declare.ts deleted file mode 100644 index 82c2692505..0000000000 --- a/src/programmers/helpers/disable_function_importer_declare.ts +++ /dev/null @@ -1,33 +0,0 @@ -import ts from "typescript"; - -import { FunctionImporter } from "./FunctionImporter"; - -export const disable_function_importer_declare = ( - importer: FunctionImporter, -): FunctionImporter => disable(importer) as FunctionImporter; - -const disable = (importer: FunctionImporter): MethodOnly => ({ - method: importer.method, - empty: (): boolean => importer.empty(), - use: (name: string): ts.Identifier => importer.use(name), - useLocal: (name: string): string => importer.useLocal(name), - hasLocal: (name: string): boolean => importer.hasLocal(name), - declare: (_modulo: ts.LeftHandSideExpression): ts.Statement[] => [], - declareUnions: (): ts.Statement[] => [], - increment: (): number => importer.increment(), - emplaceUnion: ( - prefix: string, - name: string, - factory: () => ts.ArrowFunction, - ): string => importer.emplaceUnion(prefix, name, factory), - emplaceVariable: (key, value) => importer.emplaceVariable(key, value), - trace: (): void => importer.trace(), -}); - -type MethodOnly = { - [P in keyof T]: T[P] extends Function - ? T[P] - : P extends "method" - ? T[P] - : never; -}; diff --git a/src/programmers/helpers/disable_function_programmer_declare.ts b/src/programmers/helpers/disable_function_programmer_declare.ts new file mode 100644 index 0000000000..4f8ad066db --- /dev/null +++ b/src/programmers/helpers/disable_function_programmer_declare.ts @@ -0,0 +1,32 @@ +import ts from "typescript"; + +import { FunctionProgrammer } from "./FunctionProgrammer"; + +export const disable_function_programmer_declare = ( + functor: FunctionProgrammer, +): FunctionProgrammer => disable(functor) as FunctionProgrammer; + +const disable = ( + functor: FunctionProgrammer, +): MethodOnly => ({ + method: functor.method, + useLocal: (name: string): string => functor.useLocal(name), + hasLocal: (name: string): boolean => functor.hasLocal(name), + declare: (): ts.Statement[] => [], + declareUnions: (): ts.Statement[] => [], + increment: (): number => functor.increment(), + emplaceUnion: ( + prefix: string, + name: string, + factory: () => ts.ArrowFunction, + ): string => functor.emplaceUnion(prefix, name, factory), + emplaceVariable: (key, value) => functor.emplaceVariable(key, value), +}); + +type MethodOnly = { + [P in keyof T]: T[P] extends Function + ? T[P] + : P extends "method" + ? T[P] + : never; +}; diff --git a/src/programmers/http/HttpAssertFormDataProgrammer.ts b/src/programmers/http/HttpAssertFormDataProgrammer.ts index a68060d634..1a992cdb96 100644 --- a/src/programmers/http/HttpAssertFormDataProgrammer.ts +++ b/src/programmers/http/HttpAssertFormDataProgrammer.ts @@ -4,33 +4,36 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpFormDataProgrammer } from "./HttpFormDataProgrammer"; export namespace HttpAssertFormDataProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const decode: FeatureProgrammer.IDecomposed = HttpFormDataProgrammer.decompose(props); @@ -42,15 +45,24 @@ export namespace HttpAssertFormDataProgrammer { statements: [ ...assert.statements, ...decode.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], decode.arrow.type, undefined, @@ -70,22 +82,18 @@ export namespace HttpAssertFormDataProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpAssertHeadersProgrammer.ts b/src/programmers/http/HttpAssertHeadersProgrammer.ts index 66f40f54a7..334fa37929 100644 --- a/src/programmers/http/HttpAssertHeadersProgrammer.ts +++ b/src/programmers/http/HttpAssertHeadersProgrammer.ts @@ -4,33 +4,36 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpHeadersProgrammer } from "./HttpHeadersProgrammer"; export namespace HttpAssertHeadersProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const decode: FeatureProgrammer.IDecomposed = HttpHeadersProgrammer.decompose(props); @@ -42,15 +45,24 @@ export namespace HttpAssertHeadersProgrammer { statements: [ ...assert.statements, ...decode.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], decode.arrow.type, undefined, @@ -70,22 +82,18 @@ export namespace HttpAssertHeadersProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpAssertQueryProgrammer.ts b/src/programmers/http/HttpAssertQueryProgrammer.ts index 8b3ee25e4c..dae1005858 100644 --- a/src/programmers/http/HttpAssertQueryProgrammer.ts +++ b/src/programmers/http/HttpAssertQueryProgrammer.ts @@ -4,34 +4,41 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpQueryProgrammer } from "./HttpQueryProgrammer"; export namespace HttpAssertQueryProgrammer { + export interface IProps extends IProgrammerProps { + allowOptional?: boolean; + } + export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; allowOptional: boolean; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const decode: FeatureProgrammer.IDecomposed = HttpQueryProgrammer.decompose(props); @@ -43,15 +50,24 @@ export namespace HttpAssertQueryProgrammer { statements: [ ...assert.statements, ...decode.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], decode.arrow.type, undefined, @@ -71,23 +87,19 @@ export namespace HttpAssertQueryProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression, allowOptional: boolean = false) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - allowOptional, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + allowOptional: !!props.allowOptional, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpFormDataProgrammer.ts b/src/programmers/http/HttpFormDataProgrammer.ts index cbdd66f75e..097f04d8e7 100644 --- a/src/programmers/http/HttpFormDataProgrammer.ts +++ b/src/programmers/http/HttpFormDataProgrammer.ts @@ -8,46 +8,55 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { Atomic } from "../../typings/Atomic"; import { Escaper } from "../../utils/Escaper"; +import { StringUtil } from "../../utils/StringUtil"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpMetadataUtil } from "../helpers/HttpMetadataUtil"; export namespace HttpFormDataProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { // ANALYZE TYPE const collection: MetadataCollection = new MetadataCollection(); - const result = MetadataFactory.analyze( - props.project.checker, - props.project.context, - )({ - escape: false, - constant: true, - absorb: true, - validate, - })(collection)(props.type); + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: false, + constant: true, + absorb: true, + validate, + }, + collection, + type: props.type, + }); if (result.success === false) - throw TransformerError.from(`typia.http.${props.importer.method}`)( - result.errors, - ); + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); // DO TRANSFORM - const object: MetadataObject = result.data.objects[0]!; - const statements: ts.Statement[] = decode_object(props.importer)(object); + const object: MetadataObjectType = result.data.objects[0]!.type; + const statements: ts.Statement[] = decode_object({ + context: props.context, + object, + }); return { functions: {}, statements: [], @@ -60,43 +69,39 @@ export namespace HttpFormDataProgrammer { ts.factory.createTypeReferenceNode("FormData"), ), ], - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Resolved"), - [ + props.context.importer.type({ + file: "typia", + name: "Resolved", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - false, - ), + }), undefined, ts.factory.createBlock(statements, true), ), }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; export const validate = ( meta: Metadata, @@ -124,7 +129,9 @@ export namespace HttpFormDataProgrammer { meta.atomics.length + meta.templates.length + meta.constants.map((c) => c.values.length).reduce((a, b) => a + b, 0) + - meta.natives.filter((n) => n === "Blob" || n === "File").length; + meta.natives.filter( + (native) => native.name === "Blob" || native.name === "File", + ).length; if (atomics.size > 1) insert("union type is not allowed in array."); if (meta.size() !== expected) insert( @@ -146,133 +153,156 @@ export namespace HttpFormDataProgrammer { meta.objects.length || meta.sets.length || meta.maps.length || - meta.natives.filter((n) => n !== "Blob" && n !== "File").length + meta.natives.filter( + (native) => native.name !== "Blob" && native.name !== "File", + ).length ) insert("nested object type is not allowed."); } return errors; }; - const decode_object = - (importer: FunctionImporter) => - (object: MetadataObject): ts.Statement[] => { - // const input: ts.Identifier = ts.factory.createIdentifier("input"); - const output: ts.Identifier = ts.factory.createIdentifier("output"); - return [ - StatementFactory.constant( - "output", - ts.factory.createObjectLiteralExpression( - object.properties.map((prop) => - decode_regular_property(importer)(prop), - ), - true, + const decode_object = (props: { + context: ITypiaContext; + object: MetadataObjectType; + }): ts.Statement[] => { + // const input: ts.Identifier = ts.factory.createIdentifier("input"); + const output: ts.Identifier = ts.factory.createIdentifier("output"); + return [ + StatementFactory.constant({ + name: "output", + value: ts.factory.createObjectLiteralExpression( + props.object.properties.map((p) => + decode_regular_property({ + context: props.context, + property: p, + }), ), + true, ), - ts.factory.createReturnStatement( - ts.factory.createAsExpression(output, TypeFactory.keyword("any")), - ), - ]; - }; + }), + ts.factory.createReturnStatement( + ts.factory.createAsExpression(output, TypeFactory.keyword("any")), + ), + ]; + }; - const decode_regular_property = - (importer: FunctionImporter) => - (property: MetadataProperty): ts.PropertyAssignment => { - const key: string = property.key.constants[0]!.values[0]!.value as string; - const value: Metadata = property.value; + const decode_regular_property = (props: { + context: ITypiaContext; + property: MetadataProperty; + }): ts.PropertyAssignment => { + const key: string = props.property.key.constants[0]!.values[0]! + .value as string; + const value: Metadata = props.property.value; - const [type, isArray]: [Atomic.Literal | "blob" | "file", boolean] = value - .atomics.length - ? [value.atomics[0]!.type, false] - : value.constants.length - ? [value.constants[0]!.type, false] - : value.templates.length - ? ["string", false] - : value.natives.includes("Blob") - ? ["blob", false] - : value.natives.includes("File") - ? ["file", false] - : (() => { - const meta = - value.arrays[0]?.type.value ?? - value.tuples[0]!.type.elements[0]!; - return meta.atomics.length - ? [meta.atomics[0]!.type, true] - : meta.templates.length - ? ["string", true] - : meta.natives.includes("Blob") - ? ["blob", true] - : meta.natives.includes("File") - ? ["file", true] - : [meta.constants[0]!.type, true]; - })(); - return ts.factory.createPropertyAssignment( - Escaper.variable(key) ? key : ts.factory.createStringLiteral(key), - isArray - ? decode_array(importer)(value)( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createCallExpression( - ts.factory.createIdentifier("input.getAll"), - undefined, - [ts.factory.createStringLiteral(key)], - ), - )("map"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("elem")], - undefined, - undefined, - decode_value(importer)(type)(false)( - ts.factory.createIdentifier("elem"), - ), - ), - ], - ), - ) - : decode_value(importer)(type)( - value.nullable === false && value.isRequired() === false, - )( - ts.factory.createCallExpression( - ts.factory.createIdentifier("input.get"), - undefined, - [ts.factory.createStringLiteral(key)], + const [type, isArray]: [Atomic.Literal | "blob" | "file", boolean] = value + .atomics.length + ? [value.atomics[0]!.type, false] + : value.constants.length + ? [value.constants[0]!.type, false] + : value.templates.length + ? ["string", false] + : value.natives.some((native) => native.name === "Blob") + ? ["blob", false] + : value.natives.some((native) => native.name === "File") + ? ["file", false] + : (() => { + const meta = + value.arrays[0]?.type.value ?? + value.tuples[0]!.type.elements[0]!; + return meta.atomics.length + ? [meta.atomics[0]!.type, true] + : meta.templates.length + ? ["string", true] + : meta.natives.some((native) => native.name === "Blob") + ? ["blob", true] + : meta.natives.some((native) => native.name === "File") + ? ["file", true] + : [meta.constants[0]!.type, true]; + })(); + return ts.factory.createPropertyAssignment( + Escaper.variable(key) ? key : ts.factory.createStringLiteral(key), + isArray + ? decode_array({ + context: props.context, + metadata: value, + input: ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createCallExpression( + ts.factory.createIdentifier("input.getAll"), + undefined, + [ts.factory.createStringLiteral(key)], + ), + "map", ), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("elem")], + undefined, + undefined, + decode_value({ + context: props.context, + type, + coalesce: false, + input: ts.factory.createIdentifier("elem"), + }), + ), + ], ), - ); - }; + }) + : decode_value({ + context: props.context, + type, + coalesce: value.nullable === false && value.isRequired() === false, + input: ts.factory.createCallExpression( + ts.factory.createIdentifier("input.get"), + undefined, + [ts.factory.createStringLiteral(key)], + ), + }), + ); + }; - const decode_value = - (importer: FunctionImporter) => - (type: Atomic.Literal | "blob" | "file") => - (onlyUndefindable: boolean) => - (value: ts.Expression) => { - const call = ts.factory.createCallExpression( - importer.use(type), - undefined, - [value], - ); - return onlyUndefindable - ? ts.factory.createBinaryExpression( - call, - ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), - ts.factory.createIdentifier("undefined"), - ) - : call; - }; + const decode_value = (props: { + context: ITypiaContext; + type: Atomic.Literal | "blob" | "file"; + coalesce: boolean; + input: ts.Expression; + }) => { + const call = ts.factory.createCallExpression( + props.context.importer.internal( + `httpFormDataRead${StringUtil.capitalize(props.type)}`, + ), + undefined, + [props.input], + ); + return props.coalesce + ? ts.factory.createBinaryExpression( + call, + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), + ts.factory.createIdentifier("undefined"), + ) + : call; + }; - const decode_array = - (importer: FunctionImporter) => - (value: Metadata) => - (expression: ts.Expression): ts.Expression => - value.nullable || value.isRequired() === false - ? ts.factory.createCallExpression(importer.use("array"), undefined, [ - expression, - value.nullable + const decode_array = (props: { + context: ITypiaContext; + metadata: Metadata; + input: ts.Expression; + }): ts.Expression => + props.metadata.nullable || props.metadata.isRequired() === false + ? ts.factory.createCallExpression( + props.context.importer.internal("httpFormDataReadArray"), + undefined, + [ + props.input, + props.metadata.nullable ? ts.factory.createNull() : ts.factory.createIdentifier("undefined"), - ]) - : expression; + ], + ) + : props.input; } diff --git a/src/programmers/http/HttpHeadersProgrammer.ts b/src/programmers/http/HttpHeadersProgrammer.ts index a167223bfe..574b2368a5 100644 --- a/src/programmers/http/HttpHeadersProgrammer.ts +++ b/src/programmers/http/HttpHeadersProgrammer.ts @@ -9,49 +9,58 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { Atomic } from "../../typings/Atomic"; import { Escaper } from "../../utils/Escaper"; import { MapUtil } from "../../utils/MapUtil"; +import { StringUtil } from "../../utils/StringUtil"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpMetadataUtil } from "../helpers/HttpMetadataUtil"; export namespace HttpHeadersProgrammer { export const INPUT_TYPE = "Record"; export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { // ANALYZE TYPE const collection: MetadataCollection = new MetadataCollection(); - const result = MetadataFactory.analyze( - props.project.checker, - props.project.context, - )({ - escape: false, - constant: true, - absorb: true, - validate, - })(collection)(props.type); + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: false, + constant: true, + absorb: true, + validate, + }, + collection, + type: props.type, + }); if (result.success === false) - throw TransformerError.from(`typia.http.${props.importer.method}`)( - result.errors, - ); + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); // DO TRANSFORM - const object: MetadataObject = result.data.objects[0]!; - const statements: ts.Statement[] = decode_object(props.importer)(object); + const object: MetadataObjectType = result.data.objects[0]!.type; + const statements: ts.Statement[] = decode_object({ + context: props.context, + object, + }); return { functions: {}, statements: [], @@ -64,46 +73,42 @@ export namespace HttpHeadersProgrammer { ts.factory.createTypeReferenceNode(INPUT_TYPE), ), ], - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Resolved"), - [ + props.context.importer.type({ + file: "typia", + name: "Resolved", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - false, - ), + }), undefined, ts.factory.createBlock(statements, true), ), }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; export const validate = ( - meta: Metadata, + metadata: Metadata, explore: MetadataFactory.IExplore, ): string[] => { const errors: string[] = []; @@ -111,10 +116,10 @@ export namespace HttpHeadersProgrammer { if (explore.top === true) { // TOP MUST BE ONLY OBJECT - if (meta.objects.length !== 1 || meta.bucket() !== 1) + if (metadata.objects.length !== 1 || metadata.bucket() !== 1) insert("only one object type is allowed."); - if (meta.nullable === true) insert("headers cannot be null."); - if (meta.isRequired() === false) insert("headers cannot be null."); + if (metadata.nullable === true) insert("headers cannot be null."); + if (metadata.isRequired() === false) insert("headers cannot be null."); } else if ( explore.nested !== null && explore.nested instanceof MetadataArrayType @@ -122,17 +127,19 @@ export namespace HttpHeadersProgrammer { //---- // ARRAY //---- - const atomics = HttpMetadataUtil.atomics(meta); + const atomics = HttpMetadataUtil.atomics(metadata); const expected: number = - meta.atomics.length + - meta.templates.length + - meta.constants.map((c) => c.values.length).reduce((a, b) => a + b, 0); + metadata.atomics.length + + metadata.templates.length + + metadata.constants + .map((c) => c.values.length) + .reduce((a, b) => a + b, 0); if (atomics.size > 1) insert("union type is not allowed in array."); - if (meta.size() !== expected) + if (metadata.size() !== expected) insert("only atomic or constant types are allowed in array."); - if (meta.nullable === true) + if (metadata.nullable === true) insert("nullable type is not allowed in array."); - if (meta.isRequired() === false) + if (metadata.isRequired() === false) insert("optional type is not allowed in array."); } else if (explore.object && explore.property !== null) { //---- @@ -142,25 +149,26 @@ export namespace HttpHeadersProgrammer { if (typeof explore.property === "object") insert("dynamic property is not allowed."); // DO NOT ALLOW TUPLE TYPE - if (meta.tuples.length) insert("tuple type is not allowed."); + if (metadata.tuples.length) insert("tuple type is not allowed."); // DO NOT ALLOW UNION TYPE - if (HttpMetadataUtil.isUnion(meta)) insert("union type is not allowed."); + if (HttpMetadataUtil.isUnion(metadata)) + insert("union type is not allowed."); // DO NOT ALLOW NESTED OBJECT if ( - meta.objects.length || - meta.sets.length || - meta.maps.length || - meta.natives.length + metadata.objects.length || + metadata.sets.length || + metadata.maps.length || + metadata.natives.length ) insert("nested object type is not allowed."); // DO NOT ALLOW NULLABLE - if (meta.nullable === true) insert("nullable type is not allowed."); + if (metadata.nullable === true) insert("nullable type is not allowed."); //---- // SPECIAL KEY NAMES //---- const isArray: boolean = - meta.arrays.length >= 1 || meta.tuples.length >= 1; + metadata.arrays.length >= 1 || metadata.tuples.length >= 1; // SET-COOKIE MUST BE ARRAY if ( typeof explore.property === "string" && @@ -181,7 +189,7 @@ export namespace HttpHeadersProgrammer { const key: string | null = prop.key.getSoleLiteral(); if (key === null) continue; - MapUtil.take(counter)(key.toLowerCase(), () => new Set()).add(key); + MapUtil.take(counter, key.toLowerCase(), () => new Set()).add(key); } for (const [key, set] of counter) if (set.size > 1) @@ -194,135 +202,180 @@ export namespace HttpHeadersProgrammer { return errors; }; - const decode_object = - (importer: FunctionImporter) => - (object: MetadataObject): ts.Statement[] => { - const output: ts.Identifier = ts.factory.createIdentifier("output"); - const optionals: string[] = []; - return [ - StatementFactory.constant( - "output", - ts.factory.createObjectLiteralExpression( - object.properties.map((prop) => { - if ( - !prop.value.isRequired() && - prop.value.arrays.length + prop.value.tuples.length > 0 - ) - optionals.push( - prop.key.constants[0]!.values[0]!.value as string, - ); - return decode_regular_property(importer)(prop); - }), - true, - ), + const decode_object = (props: { + context: ITypiaContext; + object: MetadataObjectType; + }): ts.Statement[] => { + const output: ts.Identifier = ts.factory.createIdentifier("output"); + const optionals: string[] = []; + return [ + StatementFactory.constant({ + name: "output", + value: ts.factory.createObjectLiteralExpression( + props.object.properties.map((p) => { + if ( + !p.value.isRequired() && + p.value.arrays.length + p.value.tuples.length > 0 + ) + optionals.push(p.key.constants[0]!.values[0]!.value as string); + return decode_regular_property({ + context: props.context, + property: p, + }); + }), + true, ), - ...optionals.map((key) => { - const access = IdentifierFactory.access(output)(key); - return ts.factory.createIfStatement( - ts.factory.createStrictEquality( - ExpressionFactory.number(0), - IdentifierFactory.access(access)("length"), - ), - ts.factory.createExpressionStatement( - ts.factory.createDeleteExpression(access), - ), - ); - }), - ts.factory.createReturnStatement( - ts.factory.createAsExpression(output, TypeFactory.keyword("any")), - ), - ]; - }; + }), + ...optionals.map((key) => { + const access = IdentifierFactory.access(output, key); + return ts.factory.createIfStatement( + ts.factory.createStrictEquality( + ExpressionFactory.number(0), + IdentifierFactory.access(access, "length"), + ), + ts.factory.createExpressionStatement( + ts.factory.createDeleteExpression(access), + ), + ); + }), + ts.factory.createReturnStatement( + ts.factory.createAsExpression(output, TypeFactory.keyword("any")), + ), + ]; + }; - const decode_regular_property = - (importer: FunctionImporter) => - (property: MetadataProperty): ts.PropertyAssignment => { - const key: string = property.key.constants[0]!.values[0]!.value as string; - const value: Metadata = property.value; + const decode_regular_property = (props: { + context: ITypiaContext; + property: MetadataProperty; + }): ts.PropertyAssignment => { + const key: string = props.property.key.constants[0]!.values[0]! + .value as string; + const value: Metadata = props.property.value; - const [type, isArray]: [Atomic.Literal, boolean] = value.atomics.length - ? [value.atomics[0]!.type, false] - : value.constants.length - ? [value.constants[0]!.type, false] - : value.templates.length - ? ["string", false] - : (() => { - const meta: Metadata = - value.arrays[0]?.type.value ?? - value.tuples[0]!.type.elements[0]!; - return meta.atomics.length - ? [meta.atomics[0]!.type, true] - : meta.templates.length - ? ["string", true] - : [meta.constants[0]!.type, true]; - })(); - const accessor = IdentifierFactory.access( - ts.factory.createIdentifier("input"), - )(key.toLowerCase()); + const [type, isArray]: [Atomic.Literal, boolean] = value.atomics.length + ? [value.atomics[0]!.type, false] + : value.constants.length + ? [value.constants[0]!.type, false] + : value.templates.length + ? ["string", false] + : (() => { + const meta: Metadata = + value.arrays[0]?.type.value ?? + value.tuples[0]!.type.elements[0]!; + return meta.atomics.length + ? [meta.atomics[0]!.type, true] + : meta.templates.length + ? ["string", true] + : [meta.constants[0]!.type, true]; + })(); + const input = IdentifierFactory.access( + ts.factory.createIdentifier("input"), + key.toLowerCase(), + ); - return ts.factory.createPropertyAssignment( - Escaper.variable(key) ? key : ts.factory.createStringLiteral(key), - isArray - ? key === "set-cookie" - ? accessor - : decode_array(importer)(type)(key)(value)(accessor) - : decode_value(importer)(type)(accessor), - ); - }; + return ts.factory.createPropertyAssignment( + Escaper.variable(key) ? key : ts.factory.createStringLiteral(key), + isArray + ? key === "set-cookie" + ? input + : decode_array({ + context: props.context, + type, + key, + value, + input, + }) + : decode_value({ + context: props.context, + type, + input, + }), + ); + }; - const decode_value = - (importer: FunctionImporter) => - (type: Atomic.Literal) => - (value: ts.Expression) => - type === "string" - ? value - : ts.factory.createCallExpression(importer.use(type), undefined, [ - value, - ]); + const decode_value = (props: { + context: ITypiaContext; + type: Atomic.Literal; + input: ts.Expression; + }) => + props.type === "string" + ? props.input + : ts.factory.createCallExpression( + props.context.importer.internal( + `httpHeaderRead${StringUtil.capitalize(props.type)}`, + ), + undefined, + [props.input], + ); - const decode_array = - (importer: FunctionImporter) => - (type: Atomic.Literal) => - (key: string) => - (value: Metadata) => - (accessor: ts.Expression) => { - const split: ts.CallChain = ts.factory.createCallChain( - ts.factory.createPropertyAccessChain( - ts.factory.createCallChain( - ts.factory.createPropertyAccessChain( - accessor, - ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), - ts.factory.createIdentifier("split"), - ), + const decode_array = (props: { + context: ITypiaContext; + type: Atomic.Literal; + key: string; + value: Metadata; + input: ts.Expression; + }) => { + const reader = + props.type === "string" + ? ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("str")], undefined, undefined, - [ts.factory.createStringLiteral(key === "cookie" ? "; " : ", ")], + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier("str"), + "trim", + ), + undefined, + undefined, + ), + ) + : props.context.importer.internal( + `httpHeaderRead${StringUtil.capitalize(props.type)}`, + ); + const split: ts.CallChain = ts.factory.createCallChain( + ts.factory.createPropertyAccessChain( + ts.factory.createCallChain( + ts.factory.createPropertyAccessChain( + props.input, + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + ts.factory.createIdentifier("split"), ), - ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), - ts.factory.createIdentifier("map"), - ), - undefined, - undefined, - [importer.use(type)], - ); - return ts.factory.createConditionalExpression( - ExpressionFactory.isArray(accessor), - undefined, - ts.factory.createCallExpression( - IdentifierFactory.access(accessor)("map"), undefined, - [importer.use(type)], + undefined, + [ + ts.factory.createStringLiteral( + props.key === "cookie" ? "; " : ", ", + ), + ], ), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + ts.factory.createIdentifier("map"), + ), + undefined, + undefined, + [reader], + ); + return ts.factory.createConditionalExpression( + ExpressionFactory.isArray(props.input), + undefined, + ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "map"), undefined, - value.isRequired() === false - ? split - : ts.factory.createBinaryExpression( - split, - ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), - ts.factory.createArrayLiteralExpression([], false), - ), - ); - }; + [reader], + ), + undefined, + props.value.isRequired() === false + ? split + : ts.factory.createBinaryExpression( + split, + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), + ts.factory.createArrayLiteralExpression([], false), + ), + ); + }; } const SINGULAR: Set = new Set([ diff --git a/src/programmers/http/HttpIsFormDataProgrammer.ts b/src/programmers/http/HttpIsFormDataProgrammer.ts index 4de53ea2ba..f7b54b2651 100644 --- a/src/programmers/http/HttpIsFormDataProgrammer.ts +++ b/src/programmers/http/HttpIsFormDataProgrammer.ts @@ -3,31 +3,34 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpFormDataProgrammer } from "./HttpFormDataProgrammer"; export namespace HttpIsFormDataProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); const decode: FeatureProgrammer.IDecomposed = HttpFormDataProgrammer.decompose(props); @@ -39,8 +42,14 @@ export namespace HttpIsFormDataProgrammer { statements: [ ...is.statements, ...decode.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -53,14 +62,14 @@ export namespace HttpIsFormDataProgrammer { undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "value", - ts.factory.createCallExpression( + StatementFactory.constant({ + name: "value", + value: ts.factory.createCallExpression( ts.factory.createIdentifier("__decode"), undefined, [ts.factory.createIdentifier("input")], ), - ), + }), ts.factory.createIfStatement( ts.factory.createPrefixUnaryExpression( ts.SyntaxKind.ExclamationToken, @@ -82,21 +91,18 @@ export namespace HttpIsFormDataProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpIsHeadersProgrammer.ts b/src/programmers/http/HttpIsHeadersProgrammer.ts index 2318c7a78d..ce80801a55 100644 --- a/src/programmers/http/HttpIsHeadersProgrammer.ts +++ b/src/programmers/http/HttpIsHeadersProgrammer.ts @@ -3,31 +3,34 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpHeadersProgrammer } from "./HttpHeadersProgrammer"; export namespace HttpIsHeadersProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, + config: { + equals: false, + }, }); const decode: FeatureProgrammer.IDecomposed = HttpHeadersProgrammer.decompose(props); @@ -39,8 +42,14 @@ export namespace HttpIsHeadersProgrammer { statements: [ ...is.statements, ...decode.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -53,14 +62,14 @@ export namespace HttpIsHeadersProgrammer { undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "value", - ts.factory.createCallExpression( + StatementFactory.constant({ + name: "value", + value: ts.factory.createCallExpression( ts.factory.createIdentifier("__decode"), undefined, [ts.factory.createIdentifier("input")], ), - ), + }), ts.factory.createIfStatement( ts.factory.createPrefixUnaryExpression( ts.SyntaxKind.ExclamationToken, @@ -82,21 +91,18 @@ export namespace HttpIsHeadersProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpIsQueryProgrammer.ts b/src/programmers/http/HttpIsQueryProgrammer.ts index 111bb27290..828bce841e 100644 --- a/src/programmers/http/HttpIsQueryProgrammer.ts +++ b/src/programmers/http/HttpIsQueryProgrammer.ts @@ -3,32 +3,39 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpQueryProgrammer } from "./HttpQueryProgrammer"; export namespace HttpIsQueryProgrammer { + export interface IProps extends IProgrammerProps { + allowOptional?: boolean; + } + export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; allowOptional: boolean; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, + config: { + equals: false, + }, }); const decode: FeatureProgrammer.IDecomposed = HttpQueryProgrammer.decompose(props); @@ -40,8 +47,14 @@ export namespace HttpIsQueryProgrammer { statements: [ ...is.statements, ...decode.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -54,14 +67,14 @@ export namespace HttpIsQueryProgrammer { undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "value", - ts.factory.createCallExpression( + StatementFactory.constant({ + name: "value", + value: ts.factory.createCallExpression( ts.factory.createIdentifier("__decode"), undefined, [ts.factory.createIdentifier("input")], ), - ), + }), ts.factory.createIfStatement( ts.factory.createPrefixUnaryExpression( ts.SyntaxKind.ExclamationToken, @@ -83,22 +96,19 @@ export namespace HttpIsQueryProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression, allowOptional: boolean = false) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - allowOptional, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + allowOptional: !!props.allowOptional, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpParameterProgrammer.ts b/src/programmers/http/HttpParameterProgrammer.ts index 0582a90060..23f1ca9d04 100644 --- a/src/programmers/http/HttpParameterProgrammer.ts +++ b/src/programmers/http/HttpParameterProgrammer.ts @@ -8,73 +8,91 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; import { TransformerError } from "../../transformers/TransformerError"; +import { StringUtil } from "../../utils/StringUtil"; + import { AssertProgrammer } from "../AssertProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; import { HttpMetadataUtil } from "../helpers/HttpMetadataUtil"; export namespace HttpParameterProgrammer { - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.ArrowFunction => { - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ + export const write = (props: IProgrammerProps): ts.ArrowFunction => { + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: false, constant: true, absorb: true, validate, - })(new MetadataCollection())(type); - if (result.success === false) - throw TransformerError.from(modulo.getText())(result.errors); + }, + collection: new MetadataCollection(), + type: props.type, + }); + if (result.success === false) + throw TransformerError.from({ + code: props.modulo.getText(), + errors: result.errors, + }); - const atomic = [...HttpMetadataUtil.atomics(result.data)][0]!; - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const block: ts.Statement[] = [ - StatementFactory.constant( - "assert", - AssertProgrammer.write({ - ...project, + const atomic = [...HttpMetadataUtil.atomics(result.data)][0]!; + const block: ts.Statement[] = [ + StatementFactory.constant({ + name: "assert", + value: AssertProgrammer.write({ + ...props, + context: { + ...props.context, options: { numeric: true, }, - })(modulo)(false)(type, name), - ), - StatementFactory.constant( - "value", - ts.factory.createCallExpression(importer.use(atomic), undefined, [ - ts.factory.createIdentifier("input"), - ]), - ), - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - ts.factory.createIdentifier("assert"), - undefined, - [ts.factory.createIdentifier("value")], + }, + config: { + equals: false, + guard: false, + }, + }), + }), + StatementFactory.constant({ + name: "value", + value: ts.factory.createCallExpression( + props.context.importer.internal( + `httpParameterRead${StringUtil.capitalize(atomic)}`, ), + undefined, + [ts.factory.createIdentifier("input")], ), - ]; + }), + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier("assert"), + undefined, + [ts.factory.createIdentifier("value")], + ), + ), + ]; - return ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "input", - ts.factory.createTypeReferenceNode("string"), - ), - ], - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), + return ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "input", + ts.factory.createTypeReferenceNode("string"), ), - undefined, - ts.factory.createBlock([...importer.declare(modulo), ...block], true), - ); - }; + ], + ts.factory.createTypeReferenceNode( + props.name ?? + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), + ), + undefined, + ts.factory.createBlock(block, true), + ); + }; export const validate = (meta: Metadata): string[] => { const errors: string[] = []; diff --git a/src/programmers/http/HttpQueryProgrammer.ts b/src/programmers/http/HttpQueryProgrammer.ts index 25bacedb00..1deee2ad28 100644 --- a/src/programmers/http/HttpQueryProgrammer.ts +++ b/src/programmers/http/HttpQueryProgrammer.ts @@ -8,49 +8,61 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { Atomic } from "../../typings/Atomic"; import { Escaper } from "../../utils/Escaper"; +import { StringUtil } from "../../utils/StringUtil"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpMetadataUtil } from "../helpers/HttpMetadataUtil"; export namespace HttpQueryProgrammer { - export const INPUT_TYPE = "string | URLSearchParams"; + export interface IProps extends IProgrammerProps { + allowOptional?: boolean; + } export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; allowOptional: boolean; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { // ANALYZE TYPE const collection: MetadataCollection = new MetadataCollection(); - const result = MetadataFactory.analyze( - props.project.checker, - props.project.context, - )({ - escape: false, - constant: true, - absorb: true, - validate: (meta, explore) => validate(meta, explore, props.allowOptional), - })(collection)(props.type); + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: false, + constant: true, + absorb: true, + validate: (meta, explore) => + validate(meta, explore, props.allowOptional), + }, + collection, + type: props.type, + }); if (result.success === false) - throw TransformerError.from(`typia.http.${props.importer.method}`)( - result.errors, - ); + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); // DO TRANSFORM - const object: MetadataObject = result.data.objects[0]!; - const statements: ts.Statement[] = decode_object(props.importer)(object); + const object: MetadataObjectType = result.data.objects[0]!.type; + const statements: ts.Statement[] = decode_object({ + context: props.context, + object, + }); return { functions: {}, statements: [], @@ -60,47 +72,49 @@ export namespace HttpQueryProgrammer { [ IdentifierFactory.parameter( "input", - ts.factory.createTypeReferenceNode(INPUT_TYPE), + ts.factory.createUnionTypeNode([ + ts.factory.createTypeReferenceNode("string"), + props.context.importer.type({ + file: "typia", + name: "IReadableURLSearchParams", + }), + ]), ), ], - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Resolved"), - [ + props.context.importer.type({ + file: "typia", + name: "Resolved", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - false, - ), + }), undefined, ts.factory.createBlock(statements, true), ), }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression, allowOptional: boolean = false) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - allowOptional, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + allowOptional: !!props.allowOptional, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; export const validate = ( meta: Metadata, @@ -120,7 +134,7 @@ export namespace HttpQueryProgrammer { const everyPropertiesAreOptional: boolean = meta.size() === 1 && meta.objects.length === 1 && - meta.objects[0]!.properties.every( + meta.objects[0]!.type.properties.every( (p) => p.value.isRequired() === false, ); if (everyPropertiesAreOptional === false) @@ -167,132 +181,156 @@ export namespace HttpQueryProgrammer { return errors; }; - const decode_object = - (importer: FunctionImporter) => - (object: MetadataObject): ts.Statement[] => { - const input: ts.Identifier = ts.factory.createIdentifier("input"); - const output: ts.Identifier = ts.factory.createIdentifier("output"); + const decode_object = (props: { + context: ITypiaContext; + object: MetadataObjectType; + }): ts.Statement[] => { + const input: ts.Identifier = ts.factory.createIdentifier("input"); + const output: ts.Identifier = ts.factory.createIdentifier("output"); - return [ - ts.factory.createExpressionStatement( - ts.factory.createBinaryExpression( - input, - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - ts.factory.createAsExpression( - ts.factory.createCallExpression( - importer.use("params"), - undefined, - [input], - ), - ts.factory.createTypeReferenceNode("URLSearchParams"), + return [ + ts.factory.createExpressionStatement( + ts.factory.createBinaryExpression( + input, + ts.factory.createToken(ts.SyntaxKind.EqualsToken), + ts.factory.createAsExpression( + ts.factory.createCallExpression( + props.context.importer.internal("httpQueryParseURLSearchParams"), + undefined, + [input], ), + props.context.importer.type({ + file: "typia", + name: "IReadableURLSearchParams", + }), ), ), - StatementFactory.constant( - "output", - ts.factory.createObjectLiteralExpression( - object.properties.map((prop) => - decode_regular_property(importer)(prop), - ), - true, + ), + StatementFactory.constant({ + name: "output", + value: ts.factory.createObjectLiteralExpression( + props.object.properties.map((p) => + decode_regular_property({ + context: props.context, + property: p, + }), ), + true, ), - ts.factory.createReturnStatement( - ts.factory.createAsExpression(output, TypeFactory.keyword("any")), - ), - ]; - }; + }), + ts.factory.createReturnStatement( + ts.factory.createAsExpression(output, TypeFactory.keyword("any")), + ), + ]; + }; - const decode_regular_property = - (importer: FunctionImporter) => - (property: MetadataProperty): ts.PropertyAssignment => { - const key: string = property.key.constants[0]!.values[0]!.value as string; - const value: Metadata = property.value; + const decode_regular_property = (props: { + context: ITypiaContext; + property: MetadataProperty; + }): ts.PropertyAssignment => { + const key: string = props.property.key.constants[0]!.values[0]! + .value as string; + const value: Metadata = props.property.value; - const [type, isArray]: [Atomic.Literal, boolean] = value.atomics.length - ? [value.atomics[0]!.type, false] - : value.constants.length - ? [value.constants[0]!.type, false] - : value.templates.length - ? ["string", false] - : (() => { - const meta = - value.arrays[0]?.type.value ?? - value.tuples[0]!.type.elements[0]!; - return meta.atomics.length - ? [meta.atomics[0]!.type, true] - : meta.templates.length - ? ["string", true] - : [meta.constants[0]!.type, true]; - })(); - return ts.factory.createPropertyAssignment( - Escaper.variable(key) ? key : ts.factory.createStringLiteral(key), - isArray - ? decode_array(importer)(value)( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createCallExpression( - ts.factory.createIdentifier("input.getAll"), - undefined, - [ts.factory.createStringLiteral(key)], - ), - )("map"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("elem")], - undefined, - undefined, - decode_value(importer)(type)(false)( - ts.factory.createIdentifier("elem"), - ), - ), - ], - ), - ) - : decode_value(importer)(type)( - value.nullable === false && value.isRequired() === false, - )( - ts.factory.createCallExpression( - ts.factory.createIdentifier("input.get"), - undefined, - [ts.factory.createStringLiteral(key)], + const [type, isArray]: [Atomic.Literal, boolean] = value.atomics.length + ? [value.atomics[0]!.type, false] + : value.constants.length + ? [value.constants[0]!.type, false] + : value.templates.length + ? ["string", false] + : (() => { + const meta = + value.arrays[0]?.type.value ?? + value.tuples[0]!.type.elements[0]!; + return meta.atomics.length + ? [meta.atomics[0]!.type, true] + : meta.templates.length + ? ["string", true] + : [meta.constants[0]!.type, true]; + })(); + return ts.factory.createPropertyAssignment( + Escaper.variable(key) ? key : ts.factory.createStringLiteral(key), + isArray + ? decode_array({ + context: props.context, + metadata: value, + input: ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createCallExpression( + ts.factory.createIdentifier("input.getAll"), + undefined, + [ts.factory.createStringLiteral(key)], + ), + "map", ), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("elem")], + undefined, + undefined, + decode_value({ + context: props.context, + type, + coalesce: false, + input: ts.factory.createIdentifier("elem"), + }), + ), + ], ), - ); - }; + }) + : decode_value({ + context: props.context, + type, + coalesce: value.nullable === false && value.isRequired() === false, + input: ts.factory.createCallExpression( + ts.factory.createIdentifier("input.get"), + undefined, + [ts.factory.createStringLiteral(key)], + ), + }), + ); + }; - const decode_value = - (importer: FunctionImporter) => - (type: Atomic.Literal) => - (onlyUndefindable: boolean) => - (value: ts.Expression) => { - const call = ts.factory.createCallExpression( - importer.use(type), - undefined, - [value], - ); - return onlyUndefindable - ? ts.factory.createBinaryExpression( - call, - ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), - ts.factory.createIdentifier("undefined"), - ) - : call; - }; + const decode_value = (props: { + context: ITypiaContext; + type: Atomic.Literal; + coalesce: boolean; + input: ts.Expression; + }) => { + const call = ts.factory.createCallExpression( + props.context.importer.internal( + `httpQueryRead${StringUtil.capitalize(props.type)}`, + ), + undefined, + [props.input], + ); + return props.coalesce + ? ts.factory.createBinaryExpression( + call, + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), + ts.factory.createIdentifier("undefined"), + ) + : call; + }; - const decode_array = - (importer: FunctionImporter) => - (value: Metadata) => - (expression: ts.Expression): ts.Expression => - value.nullable || value.isRequired() === false - ? ts.factory.createCallExpression(importer.use("array"), undefined, [ - expression, - value.nullable + const decode_array = (props: { + context: ITypiaContext; + metadata: Metadata; + input: ts.Expression; + }): ts.Expression => + props.metadata.nullable || props.metadata.isRequired() === false + ? ts.factory.createCallExpression( + props.context.importer.internal("httpQueryReadArray"), + undefined, + [ + props.input, + props.metadata.nullable ? ts.factory.createNull() : ts.factory.createIdentifier("undefined"), - ]) - : expression; + ], + ) + : props.input; } diff --git a/src/programmers/http/HttpValidateFormDataProgrammer.ts b/src/programmers/http/HttpValidateFormDataProgrammer.ts index 58b5aa3b12..e163fc717b 100644 --- a/src/programmers/http/HttpValidateFormDataProgrammer.ts +++ b/src/programmers/http/HttpValidateFormDataProgrammer.ts @@ -3,32 +3,35 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpFormDataProgrammer } from "./HttpFormDataProgrammer"; export namespace HttpValidateFormDataProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); const decode = HttpFormDataProgrammer.decompose(props); return { @@ -38,16 +41,24 @@ export namespace HttpValidateFormDataProgrammer { }, statements: [ ...validate.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, decode.arrow.parameters, - ts.factory.createTypeReferenceNode("typia.IValidation", [ - decode.arrow.type ?? TypeFactory.keyword("any"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [decode.arrow.type ?? TypeFactory.keyword("any")], + }), undefined, ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), @@ -64,22 +75,18 @@ export namespace HttpValidateFormDataProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpValidateHeadersProgrammer.ts b/src/programmers/http/HttpValidateHeadersProgrammer.ts index 59fa69fc3f..9d3d0edf06 100644 --- a/src/programmers/http/HttpValidateHeadersProgrammer.ts +++ b/src/programmers/http/HttpValidateHeadersProgrammer.ts @@ -3,32 +3,35 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpHeadersProgrammer } from "./HttpHeadersProgrammer"; export namespace HttpValidateHeadersProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); const decode = HttpHeadersProgrammer.decompose(props); return { @@ -38,16 +41,24 @@ export namespace HttpValidateHeadersProgrammer { }, statements: [ ...validate.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, decode.arrow.parameters, - ts.factory.createTypeReferenceNode("typia.IValidation", [ - decode.arrow.type ?? TypeFactory.keyword("any"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [decode.arrow.type ?? TypeFactory.keyword("any")], + }), undefined, ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), @@ -64,22 +75,18 @@ export namespace HttpValidateHeadersProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/http/HttpValidateQueryProgrammer.ts b/src/programmers/http/HttpValidateQueryProgrammer.ts index f82b90cd16..4aa4a18ed6 100644 --- a/src/programmers/http/HttpValidateQueryProgrammer.ts +++ b/src/programmers/http/HttpValidateQueryProgrammer.ts @@ -3,33 +3,40 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { HttpQueryProgrammer } from "./HttpQueryProgrammer"; export namespace HttpValidateQueryProgrammer { + export interface IProps extends IProgrammerProps { + allowOptional?: boolean; + } + export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; allowOptional: boolean; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); const decode = HttpQueryProgrammer.decompose(props); return { @@ -39,16 +46,24 @@ export namespace HttpValidateQueryProgrammer { }, statements: [ ...validate.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, decode.arrow.parameters, - ts.factory.createTypeReferenceNode("typia.IValidation", [ - decode.arrow.type ?? TypeFactory.keyword("any"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [decode.arrow.type ?? TypeFactory.keyword("any")], + }), undefined, ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), @@ -65,23 +80,19 @@ export namespace HttpValidateQueryProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression, allowOptional: boolean = false) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - allowOptional, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + allowOptional: !!props.allowOptional, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/internal/application_array.ts b/src/programmers/internal/application_array.ts deleted file mode 100644 index a4b1e5aeb2..0000000000 --- a/src/programmers/internal/application_array.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataArray } from "../../schemas/metadata/MetadataArray"; - -import { application_plugin } from "./application_plugin"; - -/** - * @internal - */ -export const application_array = - ( - generator: (value: Metadata) => Schema, - ) => - ( - components: Version extends "3.0" - ? OpenApiV3.IComponents - : OpenApi.IComponents, - ) => - ( - array: MetadataArray, - ): Array | OpenApiV3.IJsonSchema.IReference> => { - const factory = (): ArraySchema[] => - application_plugin>( - { - type: "array", - items: generator(array.type.value), - } as ArraySchema, - array.tags, - ); - if (array.type.recursive === true) { - const out = () => [ - { - $ref: `#/components/schemas/${array.type.name}`, - }, - ]; - if (components.schemas?.[array.type.name] !== undefined) return out(); - - components.schemas ??= {}; - components.schemas[array.type.name] ??= {}; - - const oneOf: ArraySchema[] = factory(); - Object.assign( - components.schemas[array.type.name]!, - oneOf.length === 1 ? oneOf[0] : { oneOf }, - ); - return out(); - } - return factory(); - }; - -/** - * @internal - */ -type ArraySchema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IArray - : OpenApi.IJsonSchema.IArray; - -/** - * @internal - */ -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema - : OpenApi.IJsonSchema; diff --git a/src/programmers/internal/application_bigint.ts b/src/programmers/internal/application_bigint.ts deleted file mode 100644 index 30906dca8a..0000000000 --- a/src/programmers/internal/application_bigint.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { application_plugin } from "./application_plugin"; - -/** - * @internal - */ -export const application_bigint = ( - atomic: MetadataAtomic, -): Schema[] => - application_plugin( - { - type: "integer", - } satisfies Schema, - atomic.tags, - ); - -/** - * @internal - */ -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IInteger - : OpenApi.IJsonSchema.IInteger; diff --git a/src/programmers/internal/application_boolean.ts b/src/programmers/internal/application_boolean.ts deleted file mode 100644 index f46f8e8f0e..0000000000 --- a/src/programmers/internal/application_boolean.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { application_plugin } from "./application_plugin"; - -/** - * @internal - */ -export const application_boolean = ( - atomic: MetadataAtomic, -): Schema[] => - application_plugin( - { - type: "boolean", - } satisfies Schema, - atomic.tags, - ); - -/** - * @internal - */ -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IBoolean - : OpenApi.IJsonSchema.IBoolean; diff --git a/src/programmers/internal/application_description.ts b/src/programmers/internal/application_description.ts deleted file mode 100644 index 4a1ff08bf3..0000000000 --- a/src/programmers/internal/application_description.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IJsDocTagInfo } from "../../module"; - -export const application_description = (props: { - description?: string | null | undefined; - jsDocTags?: IJsDocTagInfo[]; -}): string | undefined => - props.jsDocTags - ?.find((tag) => tag.name === "description") - ?.text?.[0]?.text?.split("\r\n") - .join("\n") ?? - props.description ?? - undefined; diff --git a/src/programmers/internal/application_escaped.ts b/src/programmers/internal/application_escaped.ts deleted file mode 100644 index 8005840cfb..0000000000 --- a/src/programmers/internal/application_escaped.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataEscaped } from "../../schemas/metadata/MetadataEscaped"; - -/** - * @internal - */ -export const application_escaped = - ( - generator: (meta: Metadata) => Schema, - ) => - (escaped: MetadataEscaped): Schema[] => { - const output: Schema | null = generator(escaped.returns); - if (output === null) return []; - - if (is_date(new Set())(escaped.original)) { - const string: StringSchema | undefined = is_string(output) - ? output - : is_one_of(output) - ? (output.oneOf.find(is_string) as StringSchema) - : undefined; - if ( - string !== undefined && - string.format !== "date" && - string.format !== "date-time" - ) - string.format = "date-time"; - } - return is_one_of(output) ? (output.oneOf as Schema[]) : [output]; - }; - -/** - * @internal - */ -const is_string = ( - elem: Schema, -): elem is StringSchema => - (elem as StringSchema).type === "string"; - -/** - * @internal - */ -const is_one_of = ( - elem: Schema, -): elem is OneOfSchema => - Array.isArray((elem as OneOfSchema).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)) - ); - }; - -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema - : OpenApi.IJsonSchema; -type StringSchema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IString - : OpenApi.IJsonSchema.IString; -type OneOfSchema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IOneOf - : OpenApi.IJsonSchema.IOneOf; diff --git a/src/programmers/internal/application_number.ts b/src/programmers/internal/application_number.ts deleted file mode 100644 index 7c5fa475f9..0000000000 --- a/src/programmers/internal/application_number.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { application_plugin } from "./application_plugin"; - -/** - * @internal - */ -export const application_number = ( - atomic: MetadataAtomic, -): Schema[] => - application_plugin( - { - type: "number", - } satisfies Schema, - atomic.tags, - ); - -/** - * @internal - */ -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IInteger | OpenApiV3.IJsonSchema.INumber - : OpenApi.IJsonSchema.IInteger | OpenApi.IJsonSchema.INumber; diff --git a/src/programmers/internal/application_plugin.ts b/src/programmers/internal/application_plugin.ts deleted file mode 100644 index 2792ee33a1..0000000000 --- a/src/programmers/internal/application_plugin.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; - -/** - * @internal - */ -export const application_plugin = ( - schema: Schema, - tags: IMetadataTypeTag[][], -): Schema[] => { - const plugins: IMetadataTypeTag[][] = tags - .map((row) => row.filter((t) => t.schema !== undefined)) - .filter((row) => row.length !== 0); - if (plugins.length === 0) return [schema]; - return plugins.map((row) => { - const base: Schema = { ...schema }; - for (const tag of row) Object.assign(base, tag.schema); - return base; - }); -}; diff --git a/src/programmers/internal/application_string.ts b/src/programmers/internal/application_string.ts deleted file mode 100644 index 0f414c011d..0000000000 --- a/src/programmers/internal/application_string.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { application_plugin } from "./application_plugin"; - -/** - * @internal - */ -export const application_string = ( - atomic: MetadataAtomic, -): Schema[] => - application_plugin( - { - type: "string", - } satisfies Schema, - atomic.tags, - ); - -/** - * @internal - */ -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IString - : OpenApi.IJsonSchema.IString; diff --git a/src/programmers/internal/application_templates.ts b/src/programmers/internal/application_templates.ts deleted file mode 100644 index 06cc6728c6..0000000000 --- a/src/programmers/internal/application_templates.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; - -import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataTemplate } from "../../schemas/metadata/MetadataTemplate"; - -import { application_plugin } from "./application_plugin"; -import { metadata_to_pattern } from "./metadata_to_pattern"; - -/** - * @internal - */ -export const application_templates = ( - meta: Metadata, -): Schema[] => { - const pureTemplates: MetadataTemplate[] = meta.templates.filter( - (t) => isPure(t.tags ?? []) === true, - ); - const taggedTemplates: MetadataTemplate[] = meta.templates.filter( - (t) => isPure(t.tags ?? []) === false, - ); - - const output: Schema[] = []; - if (pureTemplates.length) - output.push({ - type: "string", - pattern: metadata_to_pattern(true)( - Metadata.create({ - ...Metadata.initialize(), - templates: pureTemplates, - }), - ), - }); - for (const tpl of taggedTemplates) - output.push( - ...(application_plugin( - { - type: "string", - pattern: metadata_to_pattern(false)( - Metadata.create({ - ...Metadata.initialize(), - templates: [tpl], - }), - ), - }, - tpl.tags ?? [], - ) as Schema[]), - ); - return output; -}; - -const isPure = (matrix: IMetadataTypeTag[][]) => - matrix.every((tags) => filter(tags).length === 0); -const filter = (tags: IMetadataTypeTag[]) => - tags.filter((t) => t.schema !== undefined); - -/** - * @internal - */ -type Schema = Version extends "3.0" - ? OpenApiV3.IJsonSchema.IString - : OpenApi.IJsonSchema.IString; diff --git a/src/programmers/internal/application_title.ts b/src/programmers/internal/application_title.ts deleted file mode 100644 index 44fac1004d..0000000000 --- a/src/programmers/internal/application_title.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CommentFactory } from "../../factories/CommentFactory"; - -import { IJsDocTagInfo } from "../../module"; - -export const application_title = (schema: { - description?: string | null | undefined; - jsDocTags?: IJsDocTagInfo[] | undefined; -}): string | undefined => { - const info: IJsDocTagInfo | undefined = schema.jsDocTags?.find( - (tag) => tag.name === "title", - ); - if (info?.text?.length) return CommentFactory.merge(info.text); - else if (!schema.description?.length) return undefined; - - const index: number = schema.description.indexOf("\n"); - const top: string = ( - index === -1 ? schema.description : schema.description.substring(0, index) - ).trim(); - return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined; -}; diff --git a/src/programmers/internal/application_union_discriminator.ts b/src/programmers/internal/application_union_discriminator.ts deleted file mode 100644 index 08a5f3a296..0000000000 --- a/src/programmers/internal/application_union_discriminator.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; - -import { UnionPredicator } from "../helpers/UnionPredicator"; - -export const application_union_discriminator = ( - meta: Metadata, -): OpenApi.IJsonSchema.IOneOf.IDiscriminator | undefined => { - if ( - meta.size() === 0 || - meta.size() !== meta.objects.length || - meta.objects.some((o) => o.isLiteral()) === true - ) - return undefined; - const specialized: UnionPredicator.ISpecialized[] = UnionPredicator.object( - meta.objects, - ); - const meet: boolean = - specialized.length === meta.objects.length && - specialized.every( - (s) => s.property.key.isSoleLiteral() && s.property.value.isSoleLiteral(), - ) && - new Set(specialized.map((s) => s.property.key.getSoleLiteral())).size === 1; - if (meet === false) return undefined; - return { - propertyName: specialized[0]!.property.key.getSoleLiteral()!, - mapping: Object.fromEntries( - specialized.map((s) => [ - s.property.value.getSoleLiteral()!, - `#/components/schemas/${s.object.name}`, - ]), - ), - }; -}; diff --git a/src/programmers/internal/application_v30_alias.ts b/src/programmers/internal/application_v30_alias.ts deleted file mode 100644 index f796b1f723..0000000000 --- a/src/programmers/internal/application_v30_alias.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { OpenApiV3 } from "@samchon/openapi"; - -import { CommentFactory } from "../../factories/CommentFactory"; - -import { IJsDocTagInfo } from "../../schemas/metadata/IJsDocTagInfo"; -import { MetadataAlias } from "../../schemas/metadata/MetadataAlias"; - -import { application_description } from "./application_description"; -import { application_v30_object } from "./application_v30_object"; -import { application_v30_schema } from "./application_v30_schema"; - -/** - * @internal - */ -export const application_v30_alias = - (blockNever: BlockNever) => - (components: OpenApiV3.IComponents) => - (alias: MetadataAlias) => - (nullable: boolean): OpenApiV3.IJsonSchema.IReference => { - if (alias.value.size() === 1 && alias.value.objects.length === 1) - return application_v30_object(components)(alias.value.objects[0]!)( - nullable, - ) as OpenApiV3.IJsonSchema.IReference; - - const key: string = `${alias.name}${nullable ? ".Nullable" : ""}`; - const $ref: string = `#/components/schemas/${key}`; - - if (components.schemas?.[key] === undefined) { - // TEMPORARY ASSIGNMENT - components.schemas ??= {}; - components.schemas[key] = {}; - - // GENERATE SCHEMA - const schema: OpenApiV3.IJsonSchema | null = application_v30_schema( - blockNever, - )(components)({ - deprecated: - alias.jsDocTags.some((tag) => tag.name === "deprecated") || undefined, - title: (() => { - const info: IJsDocTagInfo | undefined = alias.jsDocTags.find( - (tag) => tag.name === "title", - ); - return info?.text?.length - ? CommentFactory.merge(info.text) - : undefined; - })(), - description: application_description(alias), - })(alias.value); - if (schema !== null) Object.assign(components.schemas[key]!, schema); - } - return { $ref }; - }; diff --git a/src/programmers/internal/application_v30_constant.ts b/src/programmers/internal/application_v30_constant.ts deleted file mode 100644 index 2bff927b92..0000000000 --- a/src/programmers/internal/application_v30_constant.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { OpenApiV3 } from "@samchon/openapi"; - -import { MetadataConstant } from "../../schemas/metadata/MetadataConstant"; - -/** - * @internal - */ -export const application_v30_constant = ( - constant: MetadataConstant, -): - | OpenApiV3.IJsonSchema.IBoolean - | OpenApiV3.IJsonSchema.IInteger - | OpenApiV3.IJsonSchema.INumber - | OpenApiV3.IJsonSchema.IString => ({ - type: constant.type as "string" | "number" | "boolean" | "integer", - enum: constant.values.map((v) => v.value) as any, - // @todo default -}); diff --git a/src/programmers/internal/application_v30_native.ts b/src/programmers/internal/application_v30_native.ts deleted file mode 100644 index 46c77a468a..0000000000 --- a/src/programmers/internal/application_v30_native.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { OpenApiV3 } from "@samchon/openapi"; - -/** - * @internal - */ -export const application_v30_native = - (components: OpenApiV3.IComponents) => - (name: string) => - (nullable: boolean): OpenApiV3.IJsonSchema => { - if (name === "Blob" || name === "File") - return { - type: "string", - format: "binary", - nullable, - }; - const key: string = `${name}${nullable ? ".Nullable" : ""}`; - if (components.schemas?.[key] === undefined) { - components.schemas ??= {}; - components.schemas[key] ??= { - type: "object", - properties: {}, - nullable, - }; - } - return { - $ref: `#/components/schemas/${key}`, - }; - }; diff --git a/src/programmers/internal/application_v30_object.ts b/src/programmers/internal/application_v30_object.ts deleted file mode 100644 index b8cd5dd8b2..0000000000 --- a/src/programmers/internal/application_v30_object.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { OpenApiV3 } 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 { application_v30_schema } from "./application_v30_schema"; -import { metadata_to_pattern } from "./metadata_to_pattern"; - -/** - * @internal - */ -export const application_v30_object = - (components: OpenApiV3.IComponents) => - (obj: MetadataObject) => - ( - nullable: boolean, - ): OpenApiV3.IJsonSchema.IReference | OpenApiV3.IJsonSchema.IObject => { - if (obj.isLiteral() === true) - return create_object_schema(components)(obj)(nullable); - - const key: string = `${obj.name}${nullable ? ".Nullable" : ""}`; - const $ref: string = `#/components/schemas/${key}`; - if (components.schemas?.[key] !== undefined) return { $ref }; - - const object: OpenApiV3.IJsonSchema = {}; - components.schemas ??= {}; - components.schemas[key] = object; - Object.assign(object, create_object_schema(components)(obj)(nullable)); - return { $ref }; - }; - -/** - * @internal - */ -const create_object_schema = - (components: OpenApiV3.IComponents) => - (obj: MetadataObject) => - (nullable: boolean): OpenApiV3.IJsonSchema.IObject => { - // ITERATE PROPERTIES - const properties: Record = {}; - const extraMeta: ISuperfluous = { - patternProperties: {}, - additionalProperties: undefined, - }; - const required: string[] = []; - - for (const property of obj.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: OpenApiV3.IJsonSchema | null = application_v30_schema(true)( - components, - )({ - 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), - })(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, - required: required.length ? required : undefined, - title: (() => { - const info: IJsDocTagInfo | undefined = obj.jsDocTags.find( - (tag) => tag.name === "title", - ); - return info?.text?.length ? CommentFactory.merge(info.text) : undefined; - })(), - description: application_description(obj), - additionalProperties: join(components)(extraMeta), - }; - }; - -/** - * @internal - */ -const join = - (components: OpenApiV3.IComponents) => - (extra: ISuperfluous): OpenApiV3.IJsonSchema | undefined => { - // LIST UP METADATA - const elements: [Metadata, OpenApiV3.IJsonSchema][] = Object.values( - extra.patternProperties || {}, - ); - if (extra.additionalProperties) elements.push(extra.additionalProperties); - - // SHORT RETURN - if (elements.length === 0) return undefined; - 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 application_v30_schema(true)(components)({})(meta) ?? undefined; - }; - -/** - * @internal - */ -interface ISuperfluous { - additionalProperties?: undefined | [Metadata, OpenApiV3.IJsonSchema]; - patternProperties: Record; -} diff --git a/src/programmers/internal/application_v30_schema.ts b/src/programmers/internal/application_v30_schema.ts deleted file mode 100644 index bb0fa6d10c..0000000000 --- a/src/programmers/internal/application_v30_schema.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { OpenApiV3 } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { application_array } from "./application_array"; -import { application_bigint } from "./application_bigint"; -import { application_boolean } from "./application_boolean"; -import { application_escaped } from "./application_escaped"; -import { application_number } from "./application_number"; -import { application_string } from "./application_string"; -import { application_templates } from "./application_templates"; -import { application_union_discriminator } from "./application_union_discriminator"; -import { application_v30_alias } from "./application_v30_alias"; -import { application_v30_constant } from "./application_v30_constant"; -import { application_v30_native } from "./application_v30_native"; -import { application_v30_object } from "./application_v30_object"; -import { application_v30_tuple } from "./application_v30_tuple"; - -/** - * @internal - */ -export const application_v30_schema = - (blockNever: BlockNever) => - (components: OpenApiV3.IComponents) => - (attribute: OpenApiV3.IJsonSchema.__IAttribute) => - ( - meta: Metadata, - ): BlockNever extends true - ? OpenApiV3.IJsonSchema | null - : OpenApiV3.IJsonSchema => { - // VULNERABLE CASE - if (meta.any === true) - return { - ...attribute, - type: undefined, - }; - else if (meta.nullable && meta.empty()) - return { type: "null", ...attribute }; - - //---- - // GATHER UNION SCHEMAS - //---- - const union: OpenApiV3.IJsonSchema[] = []; - const insert = meta.nullable - ? (schema: OpenApiV3.IJsonSchema) => - union.push({ - ...schema, - nullable: (schema as OpenApiV3.IJsonSchema.__ISignificant).type - ? true - : undefined, - } as OpenApiV3.IJsonSchema) - : (schema: OpenApiV3.IJsonSchema) => union.push(schema); - - // toJSON() METHOD - if (meta.escaped !== null) - application_escaped<"3.0">(application_v30_schema(false)(components)({}))( - meta.escaped, - ).forEach(insert); - - // ATOMIC TYPES - if (meta.templates.length && AtomicPredicator.template(meta)) - application_templates(meta).forEach(insert); - for (const constant of meta.constants) - if (AtomicPredicator.constant(meta)(constant.type) === false) continue; - else insert(application_v30_constant(constant)); - for (const a of meta.atomics) - if (a.type === "boolean") application_boolean(a).forEach(insert); - else if (a.type === "bigint") application_bigint(a).forEach(insert); - else if (a.type === "number") application_number(a).forEach(insert); - else if (a.type === "string") application_string(a).forEach(insert); - - // ARRAY - for (const array of meta.arrays) - application_array<"3.0">(application_v30_schema(false)(components)({}))( - components, - )(array).forEach(insert); - - // TUPLE - for (const tuple of meta.tuples) - insert(application_v30_tuple(components)(tuple)(attribute)); - - // NATIVES - for (const native of meta.natives) - if (AtomicPredicator.native(native)) { - const type: string = native.toLowerCase(); - if (meta.atomics.some((a) => a.type === type)) continue; - else if (type === "boolean") - insert( - application_boolean( - MetadataAtomic.create({ - type: "boolean", - tags: [], - }), - )[0]!, - ); - else if (type === "bigint") - insert( - application_bigint( - MetadataAtomic.create({ - type: "bigint", - tags: [], - }), - )[0]! as any, - ); - 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(application_v30_native(components)(native)(meta.nullable)); - if (meta.sets.length) - insert(application_v30_native(components)(`Set`)(meta.nullable)); - if (meta.maps.length) - insert(application_v30_native(components)(`Map`)(meta.nullable)); - - // OBJECT - for (const obj of meta.objects) - insert(application_v30_object(components)(obj)(meta.nullable)); - - // ALIASES - for (const alias of meta.aliases) - insert( - application_v30_alias(blockNever)(components)(alias)(meta.nullable), - ); - - //---- - // RETURNS - //---- - if (union.length === 0 && blockNever === true) return null!; - const schema: OpenApiV3.IJsonSchema = - union.length === 0 - ? { type: undefined } - : union.length === 1 - ? union[0]! - : { - oneOf: union, - discriminator: application_union_discriminator(meta), - }; - return { - ...schema, - ...attribute, - title: attribute.title ?? schema.title, - description: attribute.description ?? schema.description, - deprecated: attribute.deprecated ?? schema.deprecated, - }; - }; diff --git a/src/programmers/internal/application_v30_tuple.ts b/src/programmers/internal/application_v30_tuple.ts deleted file mode 100644 index 233b01646b..0000000000 --- a/src/programmers/internal/application_v30_tuple.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { OpenApiV3 } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; - -import { application_v30_schema } from "./application_v30_schema"; - -/** - * @internal - */ -export const application_v30_tuple = - (components: OpenApiV3.IComponents) => - (tuple: MetadataTuple) => - ( - attribute: OpenApiV3.IJsonSchema.__IAttribute, - ): OpenApiV3.IJsonSchema.IArray => ({ - ...attribute, - type: "array", - items: application_v30_schema(false)(components)( - tuple.type.recursive ? {} : attribute, - )( - tuple.type.elements.reduce( - (x, y) => Metadata.merge(x.rest ?? x, y.rest ?? y), - Metadata.initialize(), - ), - ), - minItems: !!tuple.type.elements.at(-1)?.rest - ? tuple.type.elements.length - 1 - : tuple.type.elements.filter((x) => !x.optional).length, - maxItems: !!tuple.type.elements.at(-1)?.rest - ? undefined! - : tuple.type.elements.length, - }); diff --git a/src/programmers/internal/application_v31_alias.ts b/src/programmers/internal/application_v31_alias.ts deleted file mode 100644 index f1c7a3030b..0000000000 --- a/src/programmers/internal/application_v31_alias.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { MetadataAlias } from "../../schemas/metadata/MetadataAlias"; - -import { application_description } from "./application_description"; -import { application_title } from "./application_title"; -import { application_v31_object } from "./application_v31_object"; -import { application_v31_schema } from "./application_v31_schema"; - -/** - * @internal - */ -export const application_v31_alias = - (blockNever: BlockNever) => - (components: OpenApi.IComponents) => - (alias: MetadataAlias): OpenApi.IJsonSchema.IReference => { - if (alias.value.size() === 1 && alias.value.objects.length === 1) - return application_v31_object(components)( - alias.value.objects[0]!, - ) as OpenApi.IJsonSchema.IReference; - - const $ref: string = `#/components/schemas/${alias.name}`; - if (components.schemas?.[alias.name] === undefined) { - // TEMPORARY ASSIGNMENT - components.schemas ??= {}; - components.schemas[alias.name] = {}; - - // GENERATE SCHEMA - const schema: OpenApi.IJsonSchema | null = application_v31_schema( - blockNever, - )(components)({ - deprecated: - alias.jsDocTags.some((tag) => tag.name === "deprecated") || undefined, - title: application_title(alias), - description: application_description(alias), - })(alias.value); - if (schema !== null) - Object.assign(components.schemas[alias.name]!, schema); - } - return { $ref }; - }; diff --git a/src/programmers/internal/application_v31_constant.ts b/src/programmers/internal/application_v31_constant.ts deleted file mode 100644 index 066f00aa82..0000000000 --- a/src/programmers/internal/application_v31_constant.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { MetadataConstant } from "../../schemas/metadata/MetadataConstant"; - -import { application_description } from "./application_description"; -import { application_plugin } from "./application_plugin"; -import { application_title } from "./application_title"; - -/** - * @internal - */ -export const application_v31_constant = ( - constant: MetadataConstant, -): OpenApi.IJsonSchema.IConstant[] => - constant.values - .map((value) => - application_plugin( - { - const: - typeof value.value === "bigint" - ? Number(value.value) - : (value.value as boolean | number | string), - title: application_title(value), - description: application_description(value), - } satisfies OpenApi.IJsonSchema.IConstant, - value.tags ?? [], - ), - ) - .flat(); diff --git a/src/programmers/internal/application_v31_native.ts b/src/programmers/internal/application_v31_native.ts deleted file mode 100644 index 7d26c5b117..0000000000 --- a/src/programmers/internal/application_v31_native.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -/** - * @internal - */ -export const application_v31_native = - (components: OpenApi.IComponents) => - (name: string): OpenApi.IJsonSchema => { - if (name === "Blob" || name === "File") - return { - type: "string", - format: "binary", - }; - if (components.schemas?.[name] === undefined) { - components.schemas ??= {}; - components.schemas[name] ??= { - type: "object", - properties: {}, - }; - } - return { - $ref: `#/components/schemas/${name}`, - }; - }; diff --git a/src/programmers/internal/application_v31_object.ts b/src/programmers/internal/application_v31_object.ts deleted file mode 100644 index 5a0376f31a..0000000000 --- a/src/programmers/internal/application_v31_object.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { OpenApi, OpenApiV3 } 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 { application_title } from "./application_title"; -import { application_v31_schema } from "./application_v31_schema"; -import { metadata_to_pattern } from "./metadata_to_pattern"; - -/** - * @internal - */ -export const application_v31_object = - (components: OpenApi.IComponents) => - ( - obj: MetadataObject, - ): OpenApi.IJsonSchema.IReference | OpenApi.IJsonSchema.IObject => { - if (obj.isLiteral() === true) return create_object_schema(components)(obj); - - const key: string = obj.name; - const $ref: string = `#/components/schemas/${key}`; - if (components.schemas?.[key] !== undefined) return { $ref }; - - const object: OpenApiV3.IJsonSchema = {}; - components.schemas ??= {}; - components.schemas[key] = object; - Object.assign(object, create_object_schema(components)(obj)); - return { $ref }; - }; - -/** - * @internal - */ -const create_object_schema = - (components: OpenApi.IComponents) => - (obj: MetadataObject): OpenApi.IJsonSchema.IObject => { - // ITERATE PROPERTIES - const properties: Record = {}; - const extraMeta: ISuperfluous = { - patternProperties: {}, - additionalProperties: undefined, - }; - const required: string[] = []; - - for (const property of obj.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: OpenApi.IJsonSchema | null = application_v31_schema(true)( - components, - )({ - deprecated: - property.jsDocTags.some((tag) => tag.name === "deprecated") || - undefined, - title: application_title(property), - description: application_description(property), - })(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, - required: required.length ? required : undefined, - title: (() => { - const info: IJsDocTagInfo | undefined = obj.jsDocTags.find( - (tag) => tag.name === "title", - ); - return info?.text?.length ? CommentFactory.merge(info.text) : undefined; - })(), - description: application_description(obj), - additionalProperties: join(components)(extraMeta), - }; - }; - -/** - * @internal - */ -const join = - (components: OpenApi.IComponents) => - (extra: ISuperfluous): OpenApi.IJsonSchema | undefined => { - // LIST UP METADATA - const elements: [Metadata, OpenApi.IJsonSchema][] = Object.values( - extra.patternProperties || {}, - ); - if (extra.additionalProperties) elements.push(extra.additionalProperties); - - // SHORT RETURN - if (elements.length === 0) return undefined; - 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 application_v31_schema(true)(components)({})(meta) ?? undefined; - }; - -/** - * @internal - */ -interface ISuperfluous { - additionalProperties?: undefined | [Metadata, OpenApi.IJsonSchema]; - patternProperties: Record; -} diff --git a/src/programmers/internal/application_v31_schema.ts b/src/programmers/internal/application_v31_schema.ts deleted file mode 100644 index 826038a502..0000000000 --- a/src/programmers/internal/application_v31_schema.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; - -import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { application_array } from "./application_array"; -import { application_bigint } from "./application_bigint"; -import { application_boolean } from "./application_boolean"; -import { application_escaped } from "./application_escaped"; -import { application_number } from "./application_number"; -import { application_string } from "./application_string"; -import { application_templates } from "./application_templates"; -import { application_union_discriminator } from "./application_union_discriminator"; -import { application_v31_alias } from "./application_v31_alias"; -import { application_v31_constant } from "./application_v31_constant"; -import { application_v31_native } from "./application_v31_native"; -import { application_v31_object } from "./application_v31_object"; -import { application_v31_tuple } from "./application_v31_tuple"; - -/** - * @internal - */ -export const application_v31_schema = - (blockNever: BlockNever) => - (components: OpenApi.IComponents) => - (attribute: OpenApi.IJsonSchema.__IAttribute) => - ( - meta: Metadata, - ): BlockNever extends true - ? OpenApi.IJsonSchema | null - : OpenApi.IJsonSchema => { - if (meta.any === true) - return { - ...attribute, - type: undefined, - }; - - //---- - // GATHER UNION SCHEMAS - //---- - const union: OpenApi.IJsonSchema[] = []; - const insert = (schema: OpenApi.IJsonSchema) => union.push(schema); - - // NULLABLE - if (meta.nullable === true) - insert({ - type: "null", - }); - - // toJSON() METHOD - if (meta.escaped !== null) - application_escaped(application_v31_schema(false)(components)({}))( - meta.escaped, - ).forEach(insert as any); - - // ATOMIC TYPES - if (meta.templates.length && AtomicPredicator.template(meta)) - application_templates(meta).forEach(insert as any); - for (const constant of meta.constants) - if (AtomicPredicator.constant(meta)(constant.type) === false) continue; - else application_v31_constant(constant).forEach(insert); - for (const a of meta.atomics) - if (a.type === "boolean") application_boolean(a).forEach(insert as any); - else if (a.type === "bigint") - application_bigint(a).forEach(insert as any); - else if (a.type === "number") - application_number(a).forEach(insert as any); - else if (a.type === "string") - application_string(a).forEach(insert as any); - - // ARRAY - for (const array of meta.arrays) - application_array(application_v31_schema(false)(components)({}))( - components, - )(array).forEach(insert as any); - - // TUPLE - for (const tuple of meta.tuples) - insert( - application_v31_tuple(application_v31_schema(false)(components)({}))( - tuple, - ), - ); - - // NATIVES - for (const native of meta.natives) - if (AtomicPredicator.native(native)) { - const type: string = native.toLowerCase(); - if (meta.atomics.some((a) => a.type === type)) continue; - else if (type === "boolean") - insert( - application_boolean( - MetadataAtomic.create({ - type: "boolean", - tags: [], - }), - )[0]! as any, - ); - else if (type === "bigint") - insert( - application_bigint( - MetadataAtomic.create({ - type: "bigint", - tags: [], - }), - )[0]! as any, - ); - else if (type === "number") - insert( - application_number( - MetadataAtomic.create({ - type: "number", - tags: [], - }), - )[0]! as any, - ); - else if (type === "string") - insert( - application_string( - MetadataAtomic.create({ - type: "string", - tags: [], - }), - )[0]! as any, - ); - } else insert(application_v31_native(components)(native)); - if (meta.sets.length) insert(application_v31_native(components)(`Set`)); - if (meta.maps.length) insert(application_v31_native(components)(`Map`)); - - // OBJECT - for (const obj of meta.objects) - insert(application_v31_object(components)(obj)); - - // ALIASES - for (const alias of meta.aliases) - insert(application_v31_alias(blockNever)(components)(alias)); - - //---- - // RETURNS - //---- - if (union.length === 0 && blockNever === true) return null!; - const schema: OpenApi.IJsonSchema = - union.length === 0 - ? { type: undefined } - : union.length === 1 - ? union[0]! - : { - oneOf: union, - discriminator: application_union_discriminator(meta), - }; - return { - ...schema, - ...attribute, - title: attribute.title ?? schema.title, - description: attribute.description ?? schema.description, - deprecated: attribute.deprecated ?? schema.deprecated, - }; - }; diff --git a/src/programmers/internal/application_v31_tuple.ts b/src/programmers/internal/application_v31_tuple.ts deleted file mode 100644 index 426abad342..0000000000 --- a/src/programmers/internal/application_v31_tuple.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; - -/** - * @internal - */ -export const application_v31_tuple = - (generator: (meta: Metadata) => OpenApi.IJsonSchema) => - (tuple: MetadataTuple): OpenApi.IJsonSchema.ITuple => { - const tail: Metadata | null = tuple.type.elements.at(-1)?.rest ?? null; - const prefixItems: Metadata[] = tuple.type.isRest() - ? tuple.type.elements.slice(0, -1) - : tuple.type.elements; - return { - type: "array", - prefixItems: prefixItems.map(generator), - additionalItems: tail ? generator(tail) : false, - }; - }; diff --git a/src/programmers/internal/check_array_length.ts b/src/programmers/internal/check_array_length.ts index d07177e962..54b0996b0a 100644 --- a/src/programmers/internal/check_array_length.ts +++ b/src/programmers/internal/check_array_length.ts @@ -2,44 +2,46 @@ import ts from "typescript"; import { ExpressionFactory } from "../../factories/ExpressionFactory"; -import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { ICheckEntry } from "../helpers/ICheckEntry"; /** * @internal */ -export const check_array_length = - (project: IProject) => - (array: MetadataArray) => - (input: ts.Expression): ICheckEntry => { - const conditions: ICheckEntry.ICondition[][] = check_string_type_tags( - project, - )(array.tags)(input); - - return { - expected: array.getName(), - expression: null, - conditions, - }; +export const check_array_length = (props: { + context: ITypiaContext; + array: MetadataArray; + input: ts.Expression; +}): ICheckEntry => { + const conditions: ICheckEntry.ICondition[][] = check_array_type_tags(props); + return { + expected: props.array.getName(), + expression: null, + conditions, }; +}; -const check_string_type_tags = - (project: IProject) => - (matrix: IMetadataTypeTag[][]) => - (input: ts.Expression): ICheckEntry.ICondition[][] => - matrix - .map((row) => row.filter((tag) => !!tag.validate)) - .filter((row) => !!row.length) - .map((row) => - row.map((tag) => ({ - expected: `Array<> & ${tag.name}`, - expression: ( - tag.predicate ?? - ExpressionFactory.transpile(project.context)(tag.validate!) - )(input), - })), - ); +/** + * @internal + */ +const check_array_type_tags = (props: { + context: ITypiaContext; + array: MetadataArray; + input: ts.Expression; +}): ICheckEntry.ICondition[][] => + props.array.tags + .map((row) => row.filter((tag) => !!tag.validate)) + .filter((row) => !!row.length) + .map((row) => + row.map((tag) => ({ + expected: `Array<> & ${tag.name}`, + expression: ExpressionFactory.transpile({ + transformer: props.context.transformer, + importer: props.context.importer, + script: tag.validate!, + })(props.input), + })), + ); diff --git a/src/programmers/internal/check_bigint.ts b/src/programmers/internal/check_bigint.ts index 69ebd5dcfc..05c94fd602 100644 --- a/src/programmers/internal/check_bigint.ts +++ b/src/programmers/internal/check_bigint.ts @@ -4,46 +4,47 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { ICheckEntry } from "../helpers/ICheckEntry"; /** * @internal */ -export const check_bigint = - (project: IProject) => - (atomic: MetadataAtomic) => - (input: ts.Expression): ICheckEntry => { - const conditions: ICheckEntry.ICondition[][] = - check_bigint_type_tags(project)(atomic)(input); - - return { - expected: atomic.getName(), - expression: ts.factory.createStrictEquality( - ts.factory.createStringLiteral("bigint"), - ts.factory.createTypeOfExpression(input), - ), - conditions, - }; +export const check_bigint = (props: { + context: ITypiaContext; + atomic: MetadataAtomic; + input: ts.Expression; +}): ICheckEntry => { + const conditions: ICheckEntry.ICondition[][] = check_bigint_type_tags(props); + return { + expected: props.atomic.getName(), + expression: ts.factory.createStrictEquality( + ts.factory.createStringLiteral("bigint"), + ts.factory.createTypeOfExpression(props.input), + ), + conditions, }; +}; /** * @internal */ -const check_bigint_type_tags = - (project: IProject) => - (atomic: MetadataAtomic) => - (input: ts.Expression): ICheckEntry.ICondition[][] => - atomic.tags - .map((row) => row.filter((tag) => !!tag.validate)) - .filter((row) => !!row.length) - .map((row) => - row.map((tag) => ({ - expected: `bigint & ${tag.name}`, - expression: ( - tag.predicate ?? - ExpressionFactory.transpile(project.context)(tag.validate!) - )(input), - })), - ); +const check_bigint_type_tags = (props: { + context: ITypiaContext; + atomic: MetadataAtomic; + input: ts.Expression; +}): ICheckEntry.ICondition[][] => + props.atomic.tags + .map((row) => row.filter((tag) => !!tag.validate)) + .filter((row) => !!row.length) + .map((row) => + row.map((tag) => ({ + expected: `bigint & ${tag.name}`, + expression: ExpressionFactory.transpile({ + transformer: props.context.transformer, + importer: props.context.importer, + script: tag.validate!, + })(props.input), + })), + ); diff --git a/src/programmers/internal/check_dynamic_key.ts b/src/programmers/internal/check_dynamic_key.ts index 2b65f3f5f6..1cad3e8796 100644 --- a/src/programmers/internal/check_dynamic_key.ts +++ b/src/programmers/internal/check_dynamic_key.ts @@ -2,161 +2,188 @@ import ts from "typescript"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; -import { FunctionImporter } from "../helpers/FunctionImporter"; import { ICheckEntry } from "../helpers/ICheckEntry"; import { check_bigint } from "./check_bigint"; import { check_number } from "./check_number"; import { check_string } from "./check_string"; import { check_template } from "./check_template"; -export const check_dynamic_key = - (project: IProject) => - (importer: FunctionImporter) => - (input: ts.Expression, metadata: Metadata): ts.Expression => { - // IF PURE STRING EXISTS, THEN SKIP VALIDATION - if ( - (metadata.atomics.length !== 0 && - metadata.atomics.some( - (a) => - a.type === "string" && - a.tags.filter((row) => row.every((t) => t.validate !== undefined)) - .length === 0, - )) || - (metadata.natives.length !== 0 && - metadata.natives.some((type) => type === "String")) - ) - return ts.factory.createTrue(); +/** + * @internal + */ +export const check_dynamic_key = (props: { + context: ITypiaContext; + metadata: Metadata; + input: ts.Expression; +}): ts.Expression => { + // IF PURE STRING EXISTS, THEN SKIP VALIDATION + if ( + (props.metadata.atomics.length !== 0 && + props.metadata.atomics.some( + (a) => + a.type === "string" && + a.tags.filter((row) => row.every((t) => t.validate !== undefined)) + .length === 0, + )) || + (props.metadata.natives.length !== 0 && + props.metadata.natives.some((native) => native.name === "String")) + ) + return ts.factory.createTrue(); - const conditions: ts.Expression[] = []; + const conditions: ts.Expression[] = []; - // NULLISH COALESCING - if (metadata.nullable === true) + // NULLISH COALESCING + if (props.metadata.nullable === true) + conditions.push( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("null"), + props.input, + ), + ); + if (props.metadata.isRequired() === false) + conditions.push( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("undefined"), + props.input, + ), + ); + + // ATOMICS + for (const atom of props.metadata.atomics) + if (atom.type === "boolean") conditions.push( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("null"), - input, + ts.factory.createLogicalOr( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("false"), + props.input, + ), + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("true"), + props.input, + ), ), ); - if (metadata.isRequired() === false) + else if (atom.type === "bigint") conditions.push( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("undefined"), - input, - ), - ); - - // ATOMICS - for (const atom of metadata.atomics) - if (atom.type === "boolean") - conditions.push( - ts.factory.createLogicalOr( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("false"), - input, - ), - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("true"), - input, - ), - ), - ); - else if (atom.type === "bigint") - conditions.push( - ts.factory.createLogicalAnd( - ts.factory.createCallExpression( - importer.use("is_bigint_string"), - undefined, - [input], - ), - atomist( - check_bigint(project)(atom)( - ts.factory.createCallExpression( - ts.factory.createIdentifier("BigInt"), - undefined, - [input], - ), - ), - ), + ts.factory.createLogicalAnd( + ts.factory.createCallExpression( + props.context.importer.internal("isBigintString"), + undefined, + [props.input], ), - ); - else if (atom.type === "number") - conditions.push( atomist( - check_number(project, true)(atom)( - ts.factory.createCallExpression( - ts.factory.createIdentifier("Number"), + check_bigint({ + context: props.context, + atomic: atom, + input: ts.factory.createCallExpression( + ts.factory.createIdentifier("BigInt"), undefined, - [input], + [props.input], ), - ), + }), ), - ); - else conditions.push(atomist(check_string(project)(atom)(input))); + ), + ); + else if (atom.type === "number") + conditions.push( + atomist( + check_number({ + context: props.context, + numeric: true, + atomic: atom, + input: ts.factory.createCallExpression( + ts.factory.createIdentifier("Number"), + undefined, + [props.input], + ), + }), + ), + ); + else + conditions.push( + atomist( + check_string({ + context: props.context, + atomic: atom, + input: props.input, + }), + ), + ); - // CONSTANTS - for (const constant of metadata.constants) - for (const { value } of constant.values) - conditions.push( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral(String(value)), - input, - ), - ); + // CONSTANTS + for (const constant of props.metadata.constants) + for (const { value } of constant.values) + conditions.push( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral(String(value)), + props.input, + ), + ); - // TEMPLATES - if (!!metadata.templates.length) - conditions.push(atomist(check_template(metadata.templates)(input))); + // TEMPLATES + if (!!props.metadata.templates.length) + conditions.push( + atomist( + check_template({ + templates: props.metadata.templates, + input: props.input, + }), + ), + ); - // NATIVES - for (const native of metadata.natives) - if (native === "Boolean") - conditions.push( - ts.factory.createLogicalOr( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("false"), - input, - ), - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("true"), - input, - ), + // NATIVES + for (const native of props.metadata.natives) + if (native.name === "Boolean") + conditions.push( + ts.factory.createLogicalOr( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("false"), + props.input, ), - ); - else if (native === "BigInt") - conditions.push( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("true"), + props.input, + ), + ), + ); + else if (native.name === "BigInt") + conditions.push( + ts.factory.createCallExpression( + props.context.importer.internal("isBigintString"), + undefined, + [props.input], + ), + ); + else if (native.name === "Number") + conditions.push( + ts.factory.createStrictEquality( + ts.factory.createFalse(), ts.factory.createCallExpression( - importer.use("is_bigint_string"), + ts.factory.createIdentifier("Number.isNaN"), undefined, - [input], - ), - ); - else if (native === "Number") - conditions.push( - ts.factory.createStrictEquality( - ts.factory.createFalse(), - ts.factory.createCallExpression( - ts.factory.createIdentifier("Number.isNaN"), - undefined, - [ - ts.factory.createCallExpression( - ts.factory.createIdentifier("Number"), - undefined, - [input], - ), - ], - ), + [ + ts.factory.createCallExpression( + ts.factory.createIdentifier("Number"), + undefined, + [props.input], + ), + ], ), - ); + ), + ); - return conditions.length === 0 - ? ts.factory.createTrue() - : conditions.length === 1 - ? conditions[0]! - : conditions.reduce(ts.factory.createLogicalOr); - }; + return conditions.length === 0 + ? ts.factory.createTrue() + : conditions.length === 1 + ? conditions[0]! + : conditions.reduce(ts.factory.createLogicalOr); +}; +/** + * @internal + */ const atomist = (entry: ICheckEntry) => [ ...(entry.expression ? [entry.expression] : []), diff --git a/src/programmers/internal/check_dynamic_properties.ts b/src/programmers/internal/check_dynamic_properties.ts index 1edc0cddcc..b8fbdbfa11 100644 --- a/src/programmers/internal/check_dynamic_properties.ts +++ b/src/programmers/internal/check_dynamic_properties.ts @@ -4,9 +4,8 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; -import { FunctionImporter } from "../helpers/FunctionImporter"; import { IExpressionEntry } from "../helpers/IExpressionEntry"; import { check_dynamic_key } from "./check_dynamic_key"; import { check_everything } from "./check_everything"; @@ -15,176 +14,173 @@ import { check_object } from "./check_object"; /** * @internal */ -export const check_dynamic_properties = - (props: check_object.IProps) => - (project: IProject) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - regular: IExpressionEntry[], - dynamic: IExpressionEntry[], - ): ts.Expression => { - const length = IdentifierFactory.access( - ts.factory.createCallExpression( - ts.factory.createIdentifier("Object.keys"), - undefined, - [input], - ), - )("length"); - const left: ts.Expression | null = - props.equals === true && dynamic.length === 0 - ? props.undefined === true || regular.every((r) => r.meta.isRequired()) - ? ts.factory.createStrictEquality( +export const check_dynamic_properties = (props: { + config: check_object.IConfig; + context: ITypiaContext; + regular: IExpressionEntry[]; + dynamic: IExpressionEntry[]; + input: ts.Expression; +}): ts.Expression => { + const length = IdentifierFactory.access( + ts.factory.createCallExpression( + ts.factory.createIdentifier("Object.keys"), + undefined, + [props.input], + ), + "length", + ); + const left: ts.Expression | null = + props.config.equals === true && props.dynamic.length === 0 + ? props.config.undefined === true || + props.regular.every((r) => r.meta.isRequired()) + ? ts.factory.createStrictEquality( + ExpressionFactory.number( + props.regular.filter((r) => r.meta.isRequired()).length, + ), + length, + ) + : ts.factory.createCallExpression( + props.context.importer.internal("isBetween"), + [], + [ + length, ExpressionFactory.number( - regular.filter((r) => r.meta.isRequired()).length, + props.regular.filter((r) => r.meta.isRequired()).length, ), - length, - ) - : ts.factory.createCallExpression( - importer.use("is_between"), - [], - [ - length, - ExpressionFactory.number( - regular.filter((r) => r.meta.isRequired()).length, - ), - ExpressionFactory.number(regular.length), - ], - ) - : null; - if ( - props.undefined === false && - left !== null && - regular.every((r) => r.meta.isRequired()) - ) - return left; + ExpressionFactory.number(props.regular.length), + ], + ) + : null; + if ( + left !== null && + props.config.undefined === false && + props.regular.every((r) => r.meta.isRequired()) + ) + return left; - const criteria = props.entries - ? ts.factory.createCallExpression(props.entries, undefined, [ + const criteria: ts.CallExpression = props.config.entries + ? ts.factory.createCallExpression(props.config.entries, undefined, [ + ts.factory.createCallExpression( + ts.factory.createIdentifier("Object.keys"), + undefined, + [props.input], + ), + check_dynamic_property(props), + ]) + : ts.factory.createCallExpression( + IdentifierFactory.access( ts.factory.createCallExpression( ts.factory.createIdentifier("Object.keys"), undefined, - [input], - ), - check_dynamic_property(props)(project)(importer)( - input, - regular, - dynamic, + [props.input], ), - ]) - : ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createCallExpression( - ts.factory.createIdentifier("Object.keys"), - undefined, - [input], - ), - )(props.assert ? "every" : "map"), - undefined, - [ - check_dynamic_property(props)(project)(importer)( - input, - regular, - dynamic, - ), - ], - ); - const right: ts.Expression = (props.halt || ((elem) => elem))( - props.assert ? criteria : check_everything(criteria), - ); - return left - ? (props.undefined - ? ts.factory.createLogicalOr - : ts.factory.createLogicalAnd)(left, right) - : right; - }; - -const check_dynamic_property = - (props: check_object.IProps) => - (project: IProject) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - regular: IExpressionEntry[], - dynamic: IExpressionEntry[], - ) => { - //---- - // IF CONDITIONS - //---- - // PREPARE ASSETS - const key = ts.factory.createIdentifier("key"); - const value = ts.factory.createIdentifier("value"); - - const statements: ts.Statement[] = []; - const add = (exp: ts.Expression, output: ts.Expression) => - statements.push( - ts.factory.createIfStatement( - exp, - ts.factory.createReturnStatement(output), + props.config.assert ? "every" : "map", ), + undefined, + [check_dynamic_property(props)], ); - const broken = { value: false }; + const right: ts.Expression = (props.config.halt || ((elem) => elem))( + props.config.assert ? criteria : check_everything(criteria), + ); + return left + ? (props.config.undefined + ? ts.factory.createLogicalOr + : ts.factory.createLogicalAnd)(left, right) + : right; +}; + +/** + * @internal + */ +const check_dynamic_property = (props: { + config: check_object.IConfig; + context: ITypiaContext; + regular: IExpressionEntry[]; + dynamic: IExpressionEntry[]; + input: ts.Expression; +}) => { + //---- + // IF CONDITIONS + //---- + // PREPARE ASSETS + const key = ts.factory.createIdentifier("key"); + const value = ts.factory.createIdentifier("value"); - // GATHER CONDITIONS - if (regular.length) add(is_regular_property(regular), props.positive); + const statements: ts.Statement[] = []; + const add = (expression: ts.Expression, output: ts.Expression) => statements.push( - StatementFactory.constant( - "value", - ts.factory.createElementAccessExpression(input, key), + ts.factory.createIfStatement( + expression, + ts.factory.createReturnStatement(output), ), ); - if (props.undefined === true) - add( - ts.factory.createStrictEquality( - ts.factory.createIdentifier("undefined"), - value, - ), - props.positive, - ); + const broken = { value: false }; - for (const entry of dynamic) { - const condition: ts.Expression = check_dynamic_key(project)(importer)( - key, - entry.key, - ); - if (condition.kind === ts.SyntaxKind.TrueKeyword) { - statements.push(ts.factory.createReturnStatement(entry.expression)); - broken.value = true; - break; - } else add(condition, entry.expression); - } - - //---- - // FUNCTION BODY - //---- - // CLOSURE BLOCK - const block: ts.Block = ts.factory.createBlock( - [ - ...statements, - ...(broken.value - ? [] - : [ - ts.factory.createReturnStatement( - props.equals === true - ? props.superfluous(value) - : props.positive, - ), - ]), - ], - true, + // GATHER CONDITIONS + if (props.regular.length) + add(is_regular_property(props.regular), props.config.positive); + statements.push( + StatementFactory.constant({ + name: "value", + value: ts.factory.createElementAccessExpression(props.input, key), + }), + ); + if (props.config.undefined === true) + add( + ts.factory.createStrictEquality( + ts.factory.createIdentifier("undefined"), + value, + ), + props.config.positive, ); - // RETURNS - return ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("key")], - undefined, - undefined, - block, - ); - }; + for (const entry of props.dynamic) { + const condition: ts.Expression = check_dynamic_key({ + context: props.context, + metadata: entry.key, + input: key, + }); + if (condition.kind === ts.SyntaxKind.TrueKeyword) { + statements.push(ts.factory.createReturnStatement(entry.expression)); + broken.value = true; + break; + } else add(condition, entry.expression); + } + + //---- + // FUNCTION BODY + //---- + // CLOSURE BLOCK + const block: ts.Block = ts.factory.createBlock( + [ + ...statements, + ...(broken.value + ? [] + : [ + ts.factory.createReturnStatement( + props.config.equals === true + ? props.config.superfluous(value) + : props.config.positive, + ), + ]), + ], + true, + ); + + // RETURNS + return ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("key")], + undefined, + undefined, + block, + ); +}; +/** + * @internal + */ const is_regular_property = (regular: IExpressionEntry[]) => ts.factory.createCallExpression( IdentifierFactory.access( @@ -193,7 +189,8 @@ const is_regular_property = (regular: IExpressionEntry[]) => ts.factory.createStringLiteral(entry.key.getSoleLiteral()!), ), ), - )("some"), + "some", + ), undefined, [ ts.factory.createArrowFunction( diff --git a/src/programmers/internal/check_everything.ts b/src/programmers/internal/check_everything.ts index 130591c504..a77377d861 100644 --- a/src/programmers/internal/check_everything.ts +++ b/src/programmers/internal/check_everything.ts @@ -8,7 +8,7 @@ import { TypeFactory } from "../../factories/TypeFactory"; */ export const check_everything = (array: ts.Expression) => ts.factory.createCallExpression( - IdentifierFactory.access(array)("every"), + IdentifierFactory.access(array, "every"), undefined, [ ts.factory.createArrowFunction( diff --git a/src/programmers/internal/check_native.ts b/src/programmers/internal/check_native.ts index 5dddec567c..48b289fc96 100644 --- a/src/programmers/internal/check_native.ts +++ b/src/programmers/internal/check_native.ts @@ -5,17 +5,23 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; /** * @internal */ -export const check_native = (type: string) => (input: ts.Expression) => { - const instanceOf = ExpressionFactory.isInstanceOf(type)(input); - return ATOMIC_LIKE.has(type) +export const check_native = (props: { + name: string; + input: ts.Expression; +}): ts.Expression => { + const instanceOf = ExpressionFactory.isInstanceOf(props.name, props.input); + return ATOMIC_LIKE.has(props.name) ? ts.factory.createLogicalOr( ts.factory.createStrictEquality( - ts.factory.createStringLiteral(type.toLowerCase()), - ts.factory.createTypeOfExpression(input), + ts.factory.createStringLiteral(props.name.toLowerCase()), + ts.factory.createTypeOfExpression(props.input), ), instanceOf, ) : instanceOf; }; +/** + * @internal + */ const ATOMIC_LIKE = new Set(["Boolean", "Number", "String"]); diff --git a/src/programmers/internal/check_number.ts b/src/programmers/internal/check_number.ts index 2777a2a376..66c574f8d3 100644 --- a/src/programmers/internal/check_number.ts +++ b/src/programmers/internal/check_number.ts @@ -4,7 +4,7 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { ICheckEntry } from "../helpers/ICheckEntry"; import { OptionPredicator } from "../helpers/OptionPredicator"; @@ -12,96 +12,101 @@ import { OptionPredicator } from "../helpers/OptionPredicator"; /** * @internal */ -export const check_number = - (project: IProject, numeric: boolean) => - (atomic: MetadataAtomic) => - (input: ts.Expression): ICheckEntry => { - const base = ts.factory.createStrictEquality( - ts.factory.createStringLiteral("number"), - ts.factory.createTypeOfExpression(input), - ); - const addition: ts.Expression | null = - numeric === true - ? OptionPredicator.finite(project.options) - ? ts.factory.createCallExpression( - ts.factory.createIdentifier("Number.isFinite"), - undefined, - [input], +export const check_number = (props: { + numeric: boolean; + context: ITypiaContext; + atomic: MetadataAtomic; + input: ts.Expression; +}): ICheckEntry => { + const base: ts.BinaryExpression = ts.factory.createStrictEquality( + ts.factory.createStringLiteral("number"), + ts.factory.createTypeOfExpression(props.input), + ); + const addition: ts.Expression | null = + props.numeric === true + ? OptionPredicator.finite(props.context.options) + ? ts.factory.createCallExpression( + ts.factory.createIdentifier("Number.isFinite"), + undefined, + [props.input], + ) + : OptionPredicator.numeric(props.context.options) + ? ts.factory.createLogicalNot( + ts.factory.createCallExpression( + ts.factory.createIdentifier("Number.isNaN"), + undefined, + [props.input], + ), ) - : OptionPredicator.numeric(project.options) - ? ts.factory.createLogicalNot( - ts.factory.createCallExpression( - ts.factory.createIdentifier("Number.isNaN"), - undefined, - [input], - ), - ) - : null - : null; - - const conditions: ICheckEntry.ICondition[][] = - check_numeric_type_tags(project)(atomic)(addition)(input); - - return { - expected: atomic.getName(), - expression: - addition !== null && conditions.length === 0 - ? ts.factory.createLogicalAnd(base, addition) - : base, - conditions, - }; + : null + : null; + const conditions: ICheckEntry.ICondition[][] = check_numeric_type_tags({ + context: props.context, + atomic: props.atomic, + input: props.input, + addition, + }); + return { + expected: props.atomic.getName(), + expression: + addition !== null && conditions.length === 0 + ? ts.factory.createLogicalAnd(base, addition) + : base, + conditions, }; +}; /** * @internal */ -const check_numeric_type_tags = - (project: IProject) => - (atomic: MetadataAtomic) => - (addition: ts.Expression | null) => - (input: ts.Expression): ICheckEntry.ICondition[][] => - atomic.tags - .map((row) => row.filter((tag) => !!tag.validate)) - .filter((row) => !!row.length) - .map((row) => [ - ...(addition === null - ? [] - : row.some( - (tag) => - tag.kind === "type" && - (tag.value === "int32" || - tag.value === "uint32" || - tag.value === "int64" || - tag.value === "uint64" || - tag.value === "float"), - ) || +const check_numeric_type_tags = (props: { + context: ITypiaContext; + atomic: MetadataAtomic; + addition: ts.Expression | null; + input: ts.Expression; +}): ICheckEntry.ICondition[][] => + props.atomic.tags + .map((row) => row.filter((tag) => !!tag.validate)) + .filter((row) => !!row.length) + .map((row) => [ + ...(props.addition === null + ? [] + : row.some( + (tag) => + tag.kind === "type" && + (tag.value === "int32" || + tag.value === "uint32" || + tag.value === "int64" || + tag.value === "uint64" || + tag.value === "float"), + ) || + row.some( + (tag) => + tag.kind === "multipleOf" && typeof tag.value === "number", + ) || + (row.some( + (tag) => + (tag.kind === "minimum" || tag.kind === "exclusiveMinimum") && + typeof tag.value === "number", + ) && row.some( (tag) => - tag.kind === "multipleOf" && typeof tag.value === "number", - ) || - (row.some( - (tag) => - (tag.kind === "minimum" || tag.kind === "exclusiveMinimum") && + (tag.kind === "maximum" || tag.kind === "exclusiveMaximum") && typeof tag.value === "number", - ) && - row.some( - (tag) => - (tag.kind === "maximum" || - tag.kind === "exclusiveMaximum") && - typeof tag.value === "number", - )) - ? [] - : [ - { - expected: "number", - expression: addition!, - }, - ]), - ...row.map((tag) => ({ - expected: `number & ${tag.name}`, - expression: ( - tag.predicate ?? - ExpressionFactory.transpile(project.context)(tag.validate!) - )(input), - })), - ]); + )) + ? [] + : [ + { + expected: "number", + expression: props.addition!, + }, + ]), + ...row.map((tag) => ({ + expected: `number & ${tag.name}`, + expression: ExpressionFactory.transpile({ + transformer: props.context.transformer, + importer: props.context.importer, + script: tag.validate!, + })(props.input), + })), + ]); diff --git a/src/programmers/internal/check_object.ts b/src/programmers/internal/check_object.ts index 5e1650ba44..a6384dc90f 100644 --- a/src/programmers/internal/check_object.ts +++ b/src/programmers/internal/check_object.ts @@ -1,8 +1,7 @@ import ts from "typescript"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; -import { FunctionImporter } from "../helpers/FunctionImporter"; import { IExpressionEntry } from "../helpers/IExpressionEntry"; import { check_dynamic_properties } from "./check_dynamic_properties"; import { check_everything } from "./check_everything"; @@ -10,36 +9,47 @@ import { check_everything } from "./check_everything"; /** * @internal */ -export const check_object = - (props: check_object.IProps) => - (project: IProject) => - (importer: FunctionImporter) => - (input: ts.Expression, entries: IExpressionEntry[]) => { - // PREPARE ASSETS - const regular = entries.filter((entry) => entry.key.isSoleLiteral()); - const dynamic = entries.filter((entry) => !entry.key.isSoleLiteral()); - const flags: ts.Expression[] = regular.map((entry) => entry.expression); +export const check_object = (props: { + config: check_object.IConfig; + context: ITypiaContext; + input: ts.Expression; + entries: IExpressionEntry[]; +}) => { + // PREPARE ASSETS + const regular = props.entries.filter((entry) => entry.key.isSoleLiteral()); + const dynamic = props.entries.filter((entry) => !entry.key.isSoleLiteral()); + const flags: ts.Expression[] = regular.map((entry) => entry.expression); - // REGULAR WITHOUT DYNAMIC PROPERTIES - if (props.equals === false && dynamic.length === 0) - return regular.length === 0 ? props.positive : reduce(props)(flags); + // REGULAR WITHOUT DYNAMIC PROPERTIES + if (props.config.equals === false && dynamic.length === 0) + return regular.length === 0 + ? props.config.positive + : reduce({ + config: props.config, + expressions: flags, + }); - // CHECK DYNAMIC PROPERTIES - flags.push( - check_dynamic_properties(props)(project)(importer)( - input, - regular, - dynamic, - ), - ); - return reduce(props)(flags); - }; + // CHECK DYNAMIC PROPERTIES + flags.push( + check_dynamic_properties({ + config: props.config, + context: props.context, + input: props.input, + regular, + dynamic, + }), + ); + return reduce({ + config: props.config, + expressions: flags, + }); +}; /** * @internal */ export namespace check_object { - export interface IProps { + export interface IConfig { equals: boolean; assert: boolean; undefined: boolean; @@ -54,8 +64,12 @@ export namespace check_object { /** * @internal */ -const reduce = - (props: check_object.IProps) => (expressions: ts.Expression[]) => - props.assert - ? expressions.reduce(props.reduce) - : check_everything(ts.factory.createArrayLiteralExpression(expressions)); +const reduce = (props: { + config: check_object.IConfig; + expressions: ts.Expression[]; +}) => + props.config.assert + ? props.expressions.reduce(props.config.reduce) + : check_everything( + ts.factory.createArrayLiteralExpression(props.expressions), + ); diff --git a/src/programmers/internal/check_string.ts b/src/programmers/internal/check_string.ts index f4f16db601..427302471a 100644 --- a/src/programmers/internal/check_string.ts +++ b/src/programmers/internal/check_string.ts @@ -4,45 +4,47 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory"; import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { ICheckEntry } from "../helpers/ICheckEntry"; /** * @internal */ -export const check_string = - (project: IProject) => - (atomic: MetadataAtomic) => - (input: ts.Expression): ICheckEntry => { - const conditions: ICheckEntry.ICondition[][] = - check_string_type_tags(project)(atomic)(input); - return { - expected: atomic.getName(), - expression: ts.factory.createStrictEquality( - ts.factory.createStringLiteral("string"), - ts.factory.createTypeOfExpression(input), - ), - conditions, - }; +export const check_string = (props: { + context: ITypiaContext; + atomic: MetadataAtomic; + input: ts.Expression; +}): ICheckEntry => { + const conditions: ICheckEntry.ICondition[][] = check_string_type_tags(props); + return { + expected: props.atomic.getName(), + expression: ts.factory.createStrictEquality( + ts.factory.createStringLiteral("string"), + ts.factory.createTypeOfExpression(props.input), + ), + conditions, }; +}; /** * @internal */ -const check_string_type_tags = - (project: IProject) => - (atomic: MetadataAtomic) => - (input: ts.Expression): ICheckEntry.ICondition[][] => - atomic.tags - .map((row) => row.filter((tag) => !!tag.validate)) - .filter((row) => !!row.length) - .map((row) => - row.map((tag) => ({ - expected: `string & ${tag.name}`, - expression: ( - tag.predicate ?? - ExpressionFactory.transpile(project.context)(tag.validate!) - )(input), - })), - ); +const check_string_type_tags = (props: { + context: ITypiaContext; + atomic: MetadataAtomic; + input: ts.Expression; +}): ICheckEntry.ICondition[][] => + props.atomic.tags + .map((row) => row.filter((tag) => !!tag.validate)) + .filter((row) => !!row.length) + .map((row) => + row.map((tag) => ({ + expected: `string & ${tag.name}`, + expression: ExpressionFactory.transpile({ + transformer: props.context.transformer, + importer: props.context.importer, + script: tag.validate!, + })(props.input), + })), + ); diff --git a/src/programmers/internal/check_template.ts b/src/programmers/internal/check_template.ts index ff10fb7345..48cfea0dcc 100644 --- a/src/programmers/internal/check_template.ts +++ b/src/programmers/internal/check_template.ts @@ -8,39 +8,41 @@ import { template_to_pattern } from "./template_to_pattern"; /** * @internal */ -export const check_template = - (templates: MetadataTemplate[]) => - (input: ts.Expression): ICheckEntry => { - // TYPEOF STRING & TAGS - const conditions: ts.Expression[] = [ - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("string"), - ts.factory.createTypeOfExpression(input), - ), - ]; +export const check_template = (props: { + templates: MetadataTemplate[]; + input: ts.Expression; +}): ICheckEntry => { + // TYPEOF STRING & TAGS + const conditions: ts.Expression[] = [ + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("string"), + ts.factory.createTypeOfExpression(props.input), + ), + ]; - // TEMPLATES - const internal: ts.Expression[] = templates.map((tpl) => - ts.factory.createCallExpression( - ts.factory.createIdentifier( - `RegExp(/${template_to_pattern(true)(tpl.row)}/).test`, - ), - undefined, - [input], + // TEMPLATES + const internal: ts.Expression[] = props.templates.map((tpl) => + ts.factory.createCallExpression( + ts.factory.createIdentifier( + `RegExp(/${template_to_pattern({ + top: true, + template: tpl.row, + })}/).test`, ), - ); - conditions.push( - internal.length === 1 - ? internal[0]! - : internal.reduce((x, y) => ts.factory.createLogicalOr(x, y)), - ); + undefined, + [props.input], + ), + ); + conditions.push( + internal.length === 1 + ? internal[0]! + : internal.reduce((x, y) => ts.factory.createLogicalOr(x, y)), + ); - // COMBINATION - return { - expression: conditions.reduce((x, y) => - ts.factory.createLogicalAnd(x, y), - ), - conditions: [], - expected: templates.map((tpl) => tpl.getName()).join(" | "), - }; + // COMBINATION + return { + expression: conditions.reduce((x, y) => ts.factory.createLogicalAnd(x, y)), + conditions: [], + expected: props.templates.map((tpl) => tpl.getName()).join(" | "), }; +}; diff --git a/src/programmers/internal/check_union_array_like.ts b/src/programmers/internal/check_union_array_like.ts index 44ffcce8f8..f48d7dfd63 100644 --- a/src/programmers/internal/check_union_array_like.ts +++ b/src/programmers/internal/check_union_array_like.ts @@ -5,8 +5,10 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; +import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; +import { MetadataMap } from "../../schemas/metadata/MetadataMap"; import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; import { CheckerProgrammer } from "../CheckerProgrammer"; @@ -16,280 +18,306 @@ import { UnionExplorer } from "../helpers/UnionExplorer"; /** * @internal */ -export const check_union_array_like = - ( - accessor: check_union_array_like.IAccessor, - ) => - (props: check_union_array_like.IProps) => - (parameters: ts.ParameterDeclaration[]) => - ( - input: ts.Expression, - origins: Origin[], - explore: FeatureProgrammer.IExplore, - ): ts.ArrowFunction => { - // ONLY ONE TYPE - const targets: Array = origins.map(accessor.transform); - if (targets.length === 1) - return ts.factory.createArrowFunction( - undefined, - undefined, - parameters, - undefined, - undefined, - props.decoder(accessor.array(input), targets[0]!, explore), - ); +export const check_union_array_like = < + Origin extends Metadata | MetadataArray | MetadataTuple | MetadataMap, + Category extends MetadataArray | MetadataTuple, + Element, +>(props: { + config: check_union_array_like.IConfig; + accessor: check_union_array_like.IAccessor; + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + definitions: Origin[]; + explore: FeatureProgrammer.IExplore; +}): ts.ArrowFunction => { + // ONLY ONE TYPE + const targets: Array = props.definitions.map( + props.accessor.transform, + ); + if (targets.length === 1) + return ts.factory.createArrowFunction( + undefined, + undefined, + props.parameters, + undefined, + undefined, + props.config.decoder({ + input: props.accessor.array(props.input), + definition: targets[0]!, + explore: props.explore, + }), + ); - const array = ts.factory.createIdentifier("array"); - const top = ts.factory.createIdentifier("top"); + const array = ts.factory.createIdentifier("array"); + const top = ts.factory.createIdentifier("top"); - const statements: ts.Statement[] = []; - const tupleList: MetadataTuple[] = targets.filter( - (t) => t instanceof MetadataTuple, - ) as MetadataTuple[]; - const arrayList: MetadataArray[] = targets.filter( - (t) => t instanceof MetadataArray, - ) as MetadataArray[]; + const statements: ts.Statement[] = []; + const tupleList: MetadataTuple[] = targets.filter( + (t) => t instanceof MetadataTuple, + ) as MetadataTuple[]; + const arrayList: MetadataArray[] = targets.filter( + (t) => t instanceof MetadataArray, + ) as MetadataArray[]; - const predicate = (meta: Category): ts.Expression => - ts.factory.createAsExpression( - ts.factory.createArrayLiteralExpression( - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "top", - meta instanceof MetadataArrayType - ? TypeFactory.keyword("any") - : ts.factory.createTypeReferenceNode("any[]"), - ), - ], - TypeFactory.keyword("any"), - undefined, - props.checker( - ts.factory.createIdentifier("top"), - accessor.element(meta), - { - ...explore, - tracable: false, - postfix: meta instanceof MetadataArrayType ? `"[0]"` : "", - }, - array, + const predicate = (meta: Category): ts.Expression => + ts.factory.createAsExpression( + ts.factory.createArrayLiteralExpression( + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "top", + meta instanceof MetadataArrayType + ? TypeFactory.keyword("any") + : ts.factory.createTypeReferenceNode("any[]"), ), - ), - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "entire", - ts.factory.createTypeReferenceNode("any[]"), - ), - ], - TypeFactory.keyword("any"), - undefined, - props.decoder(ts.factory.createIdentifier("entire"), meta, { - ...explore, + ], + TypeFactory.keyword("any"), + undefined, + props.config.checker({ + input: ts.factory.createIdentifier("top"), + definition: props.accessor.element(meta), + explore: { + ...props.explore, + tracable: false, + postfix: meta instanceof MetadataArrayType ? `"[0]"` : "", + }, + container: array, + }), + ), + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "entire", + ts.factory.createTypeReferenceNode("any[]"), + ), + ], + TypeFactory.keyword("any"), + undefined, + props.config.decoder({ + input: ts.factory.createIdentifier("entire"), + definition: meta, + explore: { + ...props.explore, tracable: true, - }), - ), - ], - true, - ), - ts.factory.createTypeReferenceNode("const"), - ); - const iterate = - (init: string) => - (from: ts.Expression) => - (stmt: ts.Statement): ts.ForOfStatement => - ts.factory.createForOfStatement( - undefined, - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration(init)], - ts.NodeFlags.Const, + }, + }), ), - from, - stmt, - ); + ], + true, + ), + ts.factory.createTypeReferenceNode("const"), + ); + const iterate = (props: { + init: string; + from: ts.Expression; + if: ts.IfStatement; + }): ts.ForOfStatement => + ts.factory.createForOfStatement( + undefined, + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration(props.init)], + ts.NodeFlags.Const, + ), + props.from, + props.if, + ); - if (tupleList.length) - statements.push( - StatementFactory.constant("array", accessor.array(input)), - StatementFactory.constant( - "tuplePredicators", - ts.factory.createArrayLiteralExpression( - tupleList.map((x) => predicate(x as Category)), - true, - ), + if (tupleList.length) + statements.push( + StatementFactory.constant({ + name: "array", + value: props.accessor.array(props.input), + }), + StatementFactory.constant({ + name: "tuplePredicators", + value: ts.factory.createArrayLiteralExpression( + tupleList.map((x) => predicate(x as Category)), + true, ), - iterate("pred")(ts.factory.createIdentifier("tuplePredicators"))( - ts.factory.createIfStatement( + }), + iterate({ + init: "pred", + from: ts.factory.createIdentifier("tuplePredicators"), + if: ts.factory.createIfStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier("pred[0]"), + undefined, + [array], + ), + ts.factory.createReturnStatement( ts.factory.createCallExpression( - ts.factory.createIdentifier("pred[0]"), + ts.factory.createIdentifier(`pred[1]`), undefined, [array], ), - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - ts.factory.createIdentifier(`pred[1]`), - undefined, - [array], - ), - ), ), ), - ); - if (arrayList.length) { - if (tupleList.length === 0) - statements.push( - StatementFactory.constant("array", accessor.array(input)), - ); + }), + ); + if (arrayList.length) { + if (tupleList.length === 0) statements.push( - StatementFactory.constant("top", accessor.front(input)), - ts.factory.createIfStatement( - ts.factory.createStrictEquality( - ExpressionFactory.number(0), - accessor.size(input), - ), - ts.isReturnStatement(props.empty) - ? props.empty - : ts.factory.createReturnStatement(props.empty), + StatementFactory.constant({ + name: "array", + value: props.accessor.array(props.input), + }), + ); + statements.push( + StatementFactory.constant({ + name: "top", + value: props.accessor.front(props.input), + }), + ts.factory.createIfStatement( + ts.factory.createStrictEquality( + ExpressionFactory.number(0), + props.accessor.size(props.input), ), - StatementFactory.constant( - "arrayPredicators", - ts.factory.createArrayLiteralExpression( - arrayList.map((x) => predicate(x as Category)), - true, + ts.isReturnStatement(props.config.empty) + ? props.config.empty + : ts.factory.createReturnStatement(props.config.empty), + ), + StatementFactory.constant({ + name: "arrayPredicators", + value: ts.factory.createArrayLiteralExpression( + arrayList.map((x) => predicate(x as Category)), + true, + ), + }), + StatementFactory.constant({ + name: "passed", + value: ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier("arrayPredicators"), + "filter", ), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("pred")], + undefined, + undefined, + ts.factory.createCallExpression( + ts.factory.createIdentifier("pred[0]"), + undefined, + [top], + ), + ), + ], + ), + }), + ts.factory.createIfStatement( + ts.factory.createStrictEquality( + ExpressionFactory.number(1), + ts.factory.createIdentifier("passed.length"), ), - StatementFactory.constant( - "passed", + ts.factory.createReturnStatement( ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createIdentifier("arrayPredicators"), - )("filter"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("pred")], - undefined, - undefined, - ts.factory.createCallExpression( - ts.factory.createIdentifier("pred[0]"), - undefined, - [top], - ), + ts.factory.createElementAccessExpression( + ts.factory.createNonNullExpression( + ts.factory.createIdentifier("passed[0]"), ), - ], + 1, + ), + undefined, + [array], ), ), ts.factory.createIfStatement( - ts.factory.createStrictEquality( + ts.factory.createLessThan( ExpressionFactory.number(1), ts.factory.createIdentifier("passed.length"), ), - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - ts.factory.createElementAccessExpression( - ts.factory.createNonNullExpression( - ts.factory.createIdentifier("passed[0]"), - ), - 1, - ), - undefined, - [array], - ), - ), - ts.factory.createIfStatement( - ts.factory.createLessThan( - ExpressionFactory.number(1), - ts.factory.createIdentifier("passed.length"), - ), - iterate("pred")(ts.factory.createIdentifier("passed"))( - ts.factory.createIfStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(array)("every"), - undefined, - [ - ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter( - "value", - TypeFactory.keyword("any"), - ), - ], - undefined, - undefined, - ts.factory.createStrictEquality( - props.success, - ts.factory.createCallExpression( - ts.factory.createIdentifier("pred[0]"), - undefined, - [ts.factory.createIdentifier("value")], - ), + iterate({ + init: "pred", + from: ts.factory.createIdentifier("passed"), + if: ts.factory.createIfStatement( + ts.factory.createCallExpression( + IdentifierFactory.access(array, "every"), + undefined, + [ + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "value", + TypeFactory.keyword("any"), ), - ), - ], - ), - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - ts.factory.createIdentifier(`pred[1]`), + ], + undefined, undefined, - [ts.factory.createIdentifier("array")], + ts.factory.createStrictEquality( + props.config.success, + ts.factory.createCallExpression( + ts.factory.createIdentifier("pred[0]"), + undefined, + [ts.factory.createIdentifier("value")], + ), + ), ), + ], + ), + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier(`pred[1]`), + undefined, + [ts.factory.createIdentifier("array")], ), ), ), - ), + }), ), - ); - } - statements.push( - props.failure( - input, - `(${targets - .map((t) => accessor.name(t, accessor.element(t))) - .join(" | ")})`, - explore, ), ); - return ts.factory.createArrowFunction( - undefined, - undefined, - parameters, - undefined, - undefined, - ts.factory.createBlock(statements, true), - ); - }; + } + statements.push( + props.config.failure({ + input: props.input, + expected: `(${targets + .map((t) => props.accessor.name(t, props.accessor.element(t))) + .join(" | ")})`, + explore: props.explore, + }), + ); + return ts.factory.createArrowFunction( + undefined, + undefined, + props.parameters, + undefined, + undefined, + ts.factory.createBlock(statements, true), + ); +}; /** * @internal */ export namespace check_union_array_like { - export interface IProps< + export interface IConfig< Category extends MetadataArray | MetadataTuple, Element, > { - checker( - front: ts.Expression, - target: Element, - explore: FeatureProgrammer.IExplore, - container: ts.Expression, - ): ts.Expression; + checker(props: { + input: ts.Expression; + definition: Element; + explore: FeatureProgrammer.IExplore; + container: ts.Expression; + }): ts.Expression; decoder: UnionExplorer.Decoder; empty: ts.ReturnStatement | ts.Expression; success: ts.Expression; - failure( - input: ts.Expression, - expected: string, - explore: CheckerProgrammer.IExplore, - ): ts.Statement; + failure(props: { + input: ts.Expression; + expected: string; + explore: CheckerProgrammer.IExplore; + }): ts.Statement; } export interface IAccessor< diff --git a/src/programmers/internal/decode_union_object.ts b/src/programmers/internal/decode_union_object.ts index f60bf69f91..ed491edc3a 100644 --- a/src/programmers/internal/decode_union_object.ts +++ b/src/programmers/internal/decode_union_object.ts @@ -1,97 +1,114 @@ import ts from "typescript"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { FeatureProgrammer } from "../FeatureProgrammer"; /** * @internal */ -export const decode_union_object = - ( - checker: ( - input: ts.Expression, - obj: MetadataObject, - explore: FeatureProgrammer.IExplore, - ) => ts.Expression, - ) => - ( - decoder: ( - input: ts.Expression, - obj: MetadataObject, - explore: FeatureProgrammer.IExplore, - ) => ts.Expression, - ) => - (success: (exp: ts.Expression) => ts.Expression) => - (escaper: (value: ts.Expression, expected: string) => ts.Statement) => - ( - input: ts.Expression, - targets: MetadataObject[], - explore: FeatureProgrammer.IExplore, - ): ts.CallExpression => - ts.factory.createCallExpression( - ts.factory.createArrowFunction( - undefined, - undefined, - [], - undefined, - undefined, - iterate(escaper)( - input, - targets.map((obj) => ({ - type: "object", - is: () => success(checker(input, obj, explore)), - value: () => decoder(input, obj, explore), - })), - `(${targets.map((t) => t.name).join(" | ")})`, - ), - ), +export const decode_union_object = (props: { + checker: (next: { + input: ts.Expression; + object: MetadataObjectType; + explore: FeatureProgrammer.IExplore; + }) => ts.Expression; + decoder: (next: { + input: ts.Expression; + object: MetadataObjectType; + explore: FeatureProgrammer.IExplore; + }) => ts.Expression; + success: (exp: ts.Expression) => ts.Expression; + escaper: (next: { input: ts.Expression; expected: string }) => ts.Statement; + objects: MetadataObjectType[]; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; +}): ts.CallExpression => + ts.factory.createCallExpression( + ts.factory.createArrowFunction( undefined, undefined, - ); + [], + undefined, + undefined, + iterate({ + escaper: props.escaper, + input: props.input, + unions: props.objects.map((object) => ({ + type: "object", + is: () => + props.success( + props.checker({ + input: props.input, + explore: props.explore, + object, + }), + ), + value: () => + props.decoder({ + input: props.input, + explore: props.explore, + object, + }), + })), + expected: `(${props.objects.map((t) => t.name).join(" | ")})`, + }), + ), + undefined, + undefined, + ); -const iterate = - (escaper: (value: ts.Expression, expected: string) => ts.Statement) => - (input: ts.Expression, unions: IUnion[], expected: string) => { - interface IBranch { - condition: null | ts.Expression; - value: ts.Expression; - } - const branches: IBranch[] = []; +/** + * @internal + */ +const iterate = (props: { + escaper: (next: { input: ts.Expression; expected: string }) => ts.Statement; + unions: IUnion[]; + expected: string; + input: ts.Expression; +}) => { + interface IBranch { + condition: null | ts.Expression; + value: ts.Expression; + } + const branches: IBranch[] = []; - for (const u of unions) { - const condition: ts.Expression = u.is(); - if (condition.kind === ts.SyntaxKind.TrueKeyword) { - branches.push({ - condition: null, - value: u.value(), - }); - break; - } + for (const u of props.unions) { + const condition: ts.Expression = u.is(); + if (condition.kind === ts.SyntaxKind.TrueKeyword) { branches.push({ - condition, + condition: null, value: u.value(), }); + break; } - if (branches.length === 0) - return ts.factory.createBlock([escaper(input, expected)], true); - else if (branches.length === 1 && branches[0]!.condition === null) - return branches[0]!.value; + branches.push({ + condition, + value: u.value(), + }); + } + if (branches.length === 0) + return ts.factory.createBlock([props.escaper(props)], true); + else if (branches.length === 1 && branches[0]!.condition === null) + return branches[0]!.value; - const statements: ts.Statement[] = branches.map((b) => - b.condition !== null - ? ts.factory.createIfStatement( - b.condition, - ts.factory.createReturnStatement(b.value), - undefined, - ) - : ts.factory.createReturnStatement(b.value), - ); - if (branches.at(-1)!.condition !== null) - statements.push(escaper(input, expected)); - return ts.factory.createBlock(statements, true); - }; + const statements: ts.Statement[] = branches.map((b) => + b.condition !== null + ? ts.factory.createIfStatement( + b.condition, + ts.factory.createReturnStatement(b.value), + undefined, + ) + : ts.factory.createReturnStatement(b.value), + ); + if (branches.at(-1)!.condition !== null) + statements.push(props.escaper(props)); + return ts.factory.createBlock(statements, true); +}; +/** + * @internal + */ interface IUnion { type: string; is: () => ts.Expression; diff --git a/src/programmers/internal/feature_object_entries.ts b/src/programmers/internal/feature_object_entries.ts index b907f33f17..864b4ace3c 100644 --- a/src/programmers/internal/feature_object_entries.ts +++ b/src/programmers/internal/feature_object_entries.ts @@ -2,57 +2,60 @@ import ts from "typescript"; import { IdentifierFactory } from "../../factories/IdentifierFactory"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; + +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { Escaper } from "../../utils/Escaper"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; /** * @internal */ -export const feature_object_entries = - ( - config: Pick< - FeatureProgrammer.IConfig, - "decoder" | "path" | "trace" - >, - ) => - (importer: FunctionImporter) => - (obj: MetadataObject) => - (input: ts.Expression, from: "object" | "top" | "array" = "object") => - obj.properties.map((prop) => { - const sole: string | null = prop.key.getSoleLiteral(); - const propInput = - sole === null - ? ts.factory.createIdentifier("value") - : Escaper.variable(sole) - ? ts.factory.createPropertyAccessExpression( - input, - ts.factory.createIdentifier(sole), - ) - : ts.factory.createElementAccessExpression( - input, - ts.factory.createStringLiteral(sole), - ); - - return { +export const feature_object_entries = (props: { + config: Pick, "decoder" | "path" | "trace">; + context: ITypiaContext; + object: MetadataObjectType; + input: ts.Expression; + from?: "object" | "top" | "array"; +}) => + props.object.properties.map((next) => { + const sole: string | null = next.key.getSoleLiteral(); + const propInput = + sole === null + ? ts.factory.createIdentifier("value") + : Escaper.variable(sole) + ? ts.factory.createPropertyAccessExpression( + props.input, + ts.factory.createIdentifier(sole), + ) + : ts.factory.createElementAccessExpression( + props.input, + ts.factory.createStringLiteral(sole), + ); + return { + input: propInput, + key: next.key, + meta: next.value, + expression: props.config.decoder({ input: propInput, - key: prop.key, - meta: prop.value, - expression: config.decoder()(propInput, prop.value, { - tracable: config.path || config.trace, + metadata: next.value, + explore: { + tracable: props.config.path || props.config.trace, source: "function", - from, - postfix: config.trace + from: props.from ?? "object", + postfix: props.config.trace ? sole !== null ? IdentifierFactory.postfix(sole) : (() => { - importer.use("join"); - return `$join(key)`; + props.context.importer.internal(ACCESSOR); + return `${props.context.importer.getInternalText(ACCESSOR)}(key)`; })() : "", - }), - }; - }); + }, + }), + }; + }); + +const ACCESSOR = "accessExpressionAsString"; diff --git a/src/programmers/internal/json_schema_alias.ts b/src/programmers/internal/json_schema_alias.ts new file mode 100644 index 0000000000..16581934f1 --- /dev/null +++ b/src/programmers/internal/json_schema_alias.ts @@ -0,0 +1,47 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataAlias } from "../../schemas/metadata/MetadataAlias"; + +import { json_schema_description } from "./json_schema_description"; +import { json_schema_object } from "./json_schema_object"; +import { json_schema_station } from "./json_schema_station"; +import { json_schema_title } from "./json_schema_title"; + +export const json_schema_alias = (props: { + blockNever: BlockNever; + components: OpenApi.IComponents; + alias: MetadataAlias; +}): OpenApi.IJsonSchema.IReference[] => { + if ( + props.alias.type.value.size() === 1 && + props.alias.type.value.objects.length === 1 + ) + return json_schema_object({ + components: props.components, + object: props.alias.type.value.objects[0]!, + }) as OpenApi.IJsonSchema.IReference[]; + + const $ref: string = `#/components/schemas/${props.alias.type.name}`; + if (props.components.schemas?.[props.alias.type.name] === undefined) { + // TEMPORARY ASSIGNMENT + props.components.schemas ??= {}; + props.components.schemas[props.alias.type.name] = {}; + + // GENERATE SCHEMA + const schema: OpenApi.IJsonSchema | null = json_schema_station({ + blockNever: props.blockNever, + components: props.components, + attribute: { + deprecated: + props.alias.type.jsDocTags.some((tag) => tag.name === "deprecated") || + undefined, + title: json_schema_title(props.alias.type), + description: json_schema_description(props.alias.type), + }, + metadata: props.alias.type.value, + }); + if (schema !== null) + Object.assign(props.components.schemas[props.alias.type.name]!, schema); + } + return [{ $ref }]; +}; diff --git a/src/programmers/internal/json_schema_array.ts b/src/programmers/internal/json_schema_array.ts new file mode 100644 index 0000000000..2bdcc6acb0 --- /dev/null +++ b/src/programmers/internal/json_schema_array.ts @@ -0,0 +1,45 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataArray } from "../../schemas/metadata/MetadataArray"; + +import { json_schema_plugin } from "./json_schema_plugin"; +import { json_schema_station } from "./json_schema_station"; + +export const json_schema_array = (props: { + components: OpenApi.IComponents; + array: MetadataArray; +}): Array => { + const factory = (): OpenApi.IJsonSchema.IArray[] => + json_schema_plugin({ + schema: { + type: "array", + items: json_schema_station({ + blockNever: false, + components: props.components, + metadata: props.array.type.value, + attribute: {}, + }), + } satisfies OpenApi.IJsonSchema.IArray, + tags: props.array.tags, + }); + if (props.array.type.recursive === true) { + const out = () => [ + { + $ref: `#/components/schemas/${props.array.type.name}`, + }, + ]; + if (props.components.schemas?.[props.array.type.name] !== undefined) + return out(); + + props.components.schemas ??= {}; + props.components.schemas[props.array.type.name] ??= {}; + + const oneOf: OpenApi.IJsonSchema.IArray[] = factory(); + Object.assign( + props.components.schemas[props.array.type.name]!, + oneOf.length === 1 ? oneOf[0] : { oneOf }, + ); + return out(); + } + return factory(); +}; diff --git a/src/programmers/internal/json_schema_bigint.ts b/src/programmers/internal/json_schema_bigint.ts new file mode 100644 index 0000000000..aa7a643302 --- /dev/null +++ b/src/programmers/internal/json_schema_bigint.ts @@ -0,0 +1,15 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; + +import { json_schema_plugin } from "./json_schema_plugin"; + +export const json_schema_bigint = ( + atomic: MetadataAtomic, +): OpenApi.IJsonSchema.IInteger[] => + json_schema_plugin({ + schema: { + type: "integer", + } satisfies OpenApi.IJsonSchema.IInteger, + tags: atomic.tags, + }); diff --git a/src/programmers/internal/json_schema_boolean.ts b/src/programmers/internal/json_schema_boolean.ts new file mode 100644 index 0000000000..fe718d9215 --- /dev/null +++ b/src/programmers/internal/json_schema_boolean.ts @@ -0,0 +1,15 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; + +import { json_schema_plugin } from "./json_schema_plugin"; + +export const json_schema_boolean = ( + atomic: MetadataAtomic, +): OpenApi.IJsonSchema.IBoolean[] => + json_schema_plugin({ + schema: { + type: "boolean", + } satisfies OpenApi.IJsonSchema.IBoolean, + tags: atomic.tags, + }); diff --git a/src/programmers/internal/json_schema_constant.ts b/src/programmers/internal/json_schema_constant.ts new file mode 100644 index 0000000000..f768b779ab --- /dev/null +++ b/src/programmers/internal/json_schema_constant.ts @@ -0,0 +1,26 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataConstant } from "../../schemas/metadata/MetadataConstant"; + +import { json_schema_description } from "./json_schema_description"; +import { json_schema_plugin } from "./json_schema_plugin"; +import { json_schema_title } from "./json_schema_title"; + +export const json_schema_constant = ( + constant: MetadataConstant, +): OpenApi.IJsonSchema.IConstant[] => + constant.values + .map((value) => + json_schema_plugin({ + schema: { + const: + typeof value.value === "bigint" + ? Number(value.value) + : (value.value as boolean | number | string), + title: json_schema_title(value), + description: json_schema_description(value), + } satisfies OpenApi.IJsonSchema.IConstant, + tags: value.tags ?? [], + }), + ) + .flat(); diff --git a/src/programmers/internal/json_schema_description.ts b/src/programmers/internal/json_schema_description.ts new file mode 100644 index 0000000000..080f0cbc4d --- /dev/null +++ b/src/programmers/internal/json_schema_description.ts @@ -0,0 +1,12 @@ +import { IJsDocTagInfo } from "../../schemas/metadata/IJsDocTagInfo"; + +export const json_schema_description = (props: { + description?: string | null | undefined; + jsDocTags?: IJsDocTagInfo[]; +}): string | undefined => + props.jsDocTags + ?.find((tag) => tag.name === "description") + ?.text?.[0]?.text?.split("\r\n") + .join("\n") ?? + props.description ?? + undefined; diff --git a/src/programmers/internal/json_schema_discriminator.ts b/src/programmers/internal/json_schema_discriminator.ts new file mode 100644 index 0000000000..061af72c0c --- /dev/null +++ b/src/programmers/internal/json_schema_discriminator.ts @@ -0,0 +1,35 @@ +import { OpenApi } from "@samchon/openapi"; + +import { Metadata } from "../../schemas/metadata/Metadata"; + +import { UnionPredicator } from "../helpers/UnionPredicator"; + +export const json_schema_discriminator = ( + metadata: Metadata, +): OpenApi.IJsonSchema.IOneOf.IDiscriminator | undefined => { + if ( + metadata.size() === 0 || + metadata.size() !== metadata.objects.length || + metadata.objects.some((o) => o.type.isLiteral()) === true + ) + return undefined; + const specialized: UnionPredicator.ISpecialized[] = UnionPredicator.object( + metadata.objects.map((o) => o.type), + ); + const meet: boolean = + specialized.length === metadata.objects.length && + specialized.every( + (s) => s.property.key.isSoleLiteral() && s.property.value.isSoleLiteral(), + ) && + new Set(specialized.map((s) => s.property.key.getSoleLiteral())).size === 1; + if (meet === false) return undefined; + return { + propertyName: specialized[0]!.property.key.getSoleLiteral()!, + mapping: Object.fromEntries( + specialized.map((s) => [ + s.property.value.getSoleLiteral()!, + `#/components/schemas/${s.object.name}`, + ]), + ), + }; +}; diff --git a/src/programmers/internal/json_schema_escaped.ts b/src/programmers/internal/json_schema_escaped.ts new file mode 100644 index 0000000000..075fd157d0 --- /dev/null +++ b/src/programmers/internal/json_schema_escaped.ts @@ -0,0 +1,82 @@ +import { OpenApi, OpenApiTypeChecker } from "@samchon/openapi"; + +import { Metadata } from "../../schemas/metadata/Metadata"; +import { MetadataEscaped } from "../../schemas/metadata/MetadataEscaped"; + +import { json_schema_station } from "./json_schema_station"; + +/** + * @internal + */ +export const json_schema_escaped = (props: { + components: OpenApi.IComponents; + escaped: MetadataEscaped; +}): OpenApi.IJsonSchema[] => { + const output: OpenApi.IJsonSchema | null = json_schema_station({ + blockNever: false, + components: props.components, + metadata: props.escaped.returns, + attribute: {}, + }); + if (output === null) return []; + + if ( + is_date({ + visited: new Set(), + metadata: props.escaped.original, + }) + ) { + const string: OpenApi.IJsonSchema.IString | undefined = + OpenApiTypeChecker.isString(output) + ? output + : OpenApiTypeChecker.isOneOf(output) + ? (output.oneOf.find( + OpenApiTypeChecker.isString, + ) as OpenApi.IJsonSchema.IString) + : undefined; + if ( + string !== undefined && + string.format !== "date" && + string.format !== "date-time" + ) + string.format = "date-time"; + } + return OpenApiTypeChecker.isOneOf(output) + ? (output.oneOf as OpenApi.IJsonSchema[]) + : [output]; +}; + +/** + * @internal + */ +const is_date = (props: { + visited: Set; + metadata: Metadata; +}): boolean => { + if (props.visited.has(props.metadata)) return false; + props.visited.add(props.metadata); + + return ( + props.metadata.natives.some((native) => native.name === "Date") || + props.metadata.arrays.some((array) => + is_date({ + visited: props.visited, + metadata: array.type.value, + }), + ) || + props.metadata.tuples.some((tuple) => + tuple.type.elements.some((e) => + is_date({ + visited: props.visited, + metadata: e, + }), + ), + ) || + props.metadata.aliases.some((alias) => + is_date({ + visited: props.visited, + metadata: alias.type.value, + }), + ) + ); +}; diff --git a/src/programmers/internal/json_schema_native.ts b/src/programmers/internal/json_schema_native.ts new file mode 100644 index 0000000000..d8eafeb1f4 --- /dev/null +++ b/src/programmers/internal/json_schema_native.ts @@ -0,0 +1,33 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataNative } from "../../schemas/metadata/MetadataNative"; + +import { json_schema_plugin } from "./json_schema_plugin"; + +export const json_schema_native = (props: { + components: OpenApi.IComponents; + native: MetadataNative; +}): OpenApi.IJsonSchema[] => { + if (props.native.name === "Blob" || props.native.name === "File") + return json_schema_plugin({ + schema: { + type: "string", + format: "binary", + }, + tags: props.native.tags, + }); + if (props.components.schemas?.[props.native.name] === undefined) { + props.components.schemas ??= {}; + props.components.schemas[props.native.name] ??= { + type: "object", + properties: {}, + required: [], + }; + } + return json_schema_plugin({ + schema: { + $ref: `#/components/schemas/${props.native.name}`, + }, + tags: props.native.tags, + }); +}; diff --git a/src/programmers/internal/json_schema_number.ts b/src/programmers/internal/json_schema_number.ts new file mode 100644 index 0000000000..81253de567 --- /dev/null +++ b/src/programmers/internal/json_schema_number.ts @@ -0,0 +1,15 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; + +import { json_schema_plugin } from "./json_schema_plugin"; + +export const json_schema_number = ( + atomic: MetadataAtomic, +): Array => + json_schema_plugin({ + schema: { + type: "number", + } satisfies OpenApi.IJsonSchema.INumber, + tags: atomic.tags, + }); diff --git a/src/programmers/internal/json_schema_object.ts b/src/programmers/internal/json_schema_object.ts new file mode 100644 index 0000000000..dc09deb7ef --- /dev/null +++ b/src/programmers/internal/json_schema_object.ts @@ -0,0 +1,158 @@ +import { OpenApi } 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 { json_schema_description } from "./json_schema_description"; +import { json_schema_plugin } from "./json_schema_plugin"; +import { json_schema_station } from "./json_schema_station"; +import { json_schema_title } from "./json_schema_title"; +import { metadata_to_pattern } from "./metadata_to_pattern"; + +/** + * @internal + */ +export const json_schema_object = (props: { + components: OpenApi.IComponents; + object: MetadataObject; +}): Array => + json_schema_plugin({ + schema: emplace_object(props), + tags: props.object.tags, + }); + +const emplace_object = (props: { + components: OpenApi.IComponents; + object: MetadataObject; +}): OpenApi.IJsonSchema.IReference | OpenApi.IJsonSchema.IObject => { + if (props.object.type.isLiteral() === true) + return create_object_schema(props); + + const key: string = props.object.type.name; + const $ref: string = `#/components/schemas/${key}`; + if (props.components.schemas?.[key] !== undefined) return { $ref }; + + const lazy: OpenApi.IJsonSchema = {}; + props.components.schemas ??= {}; + props.components.schemas[key] = lazy; + Object.assign(lazy, create_object_schema(props)); + return { $ref }; +}; + +/** + * @internal + */ +const create_object_schema = (props: { + components: OpenApi.IComponents; + object: MetadataObject; +}): OpenApi.IJsonSchema.IObject => { + // ITERATE PROPERTIES + const properties: Record = {}; + const extraMeta: ISuperfluous = { + patternProperties: {}, + additionalProperties: undefined, + }; + const required: string[] = []; + + for (const property of props.object.type.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: OpenApi.IJsonSchema | null = json_schema_station({ + blockNever: true, + components: props.components, + attribute: { + deprecated: + property.jsDocTags.some((tag) => tag.name === "deprecated") || + undefined, + title: json_schema_title(property), + description: json_schema_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({ + top: true, + metadata: property.key, + }); + if (pattern === PatternUtil.STRING) + extraMeta.additionalProperties = [property.value, schema]; + else extraMeta.patternProperties[pattern] = [property.value, schema]; + } + } + + return { + type: "object", + properties, + required, + title: (() => { + const info: IJsDocTagInfo | undefined = props.object.type.jsDocTags.find( + (tag) => tag.name === "title", + ); + return info?.text?.length ? CommentFactory.merge(info.text) : undefined; + })(), + description: json_schema_description(props.object.type), + additionalProperties: join({ + components: props.components, + extra: extraMeta, + }), + }; +}; + +/** + * @internal + */ +const join = (props: { + components: OpenApi.IComponents; + extra: ISuperfluous; +}): OpenApi.IJsonSchema | undefined => { + // LIST UP METADATA + const elements: [Metadata, OpenApi.IJsonSchema][] = Object.values( + props.extra.patternProperties || {}, + ); + if (props.extra.additionalProperties) + elements.push(props.extra.additionalProperties); + + // SHORT RETURN + if (elements.length === 0) return undefined; + else if (elements.length === 1) return elements[0]![1]!; + + // MERGE METADATA AND GENERATE VULNERABLE SCHEMA + const metadata: Metadata = elements + .map((tuple) => tuple[0]) + .reduce((x, y) => Metadata.merge(x, y)); + return ( + json_schema_station({ + blockNever: true, + components: props.components, + attribute: {}, + metadata, + }) ?? undefined + ); +}; + +/** + * @internal + */ +interface ISuperfluous { + additionalProperties?: undefined | [Metadata, OpenApi.IJsonSchema]; + patternProperties: Record; +} diff --git a/src/programmers/internal/json_schema_plugin.ts b/src/programmers/internal/json_schema_plugin.ts new file mode 100644 index 0000000000..ff9f9efcaa --- /dev/null +++ b/src/programmers/internal/json_schema_plugin.ts @@ -0,0 +1,18 @@ +import { OpenApi } from "@samchon/openapi"; + +import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; + +export const json_schema_plugin = (props: { + schema: Schema; + tags: IMetadataTypeTag[][]; +}): Schema[] => { + const plugins: IMetadataTypeTag[][] = props.tags + .map((row) => row.filter((t) => t.schema !== undefined)) + .filter((row) => row.length !== 0); + if (plugins.length === 0) return [props.schema]; + return plugins.map((row) => { + const base: Schema = { ...props.schema }; + for (const tag of row) Object.assign(base, tag.schema); + return base; + }); +}; diff --git a/src/programmers/internal/json_schema_station.ts b/src/programmers/internal/json_schema_station.ts new file mode 100644 index 0000000000..053d2aeddd --- /dev/null +++ b/src/programmers/internal/json_schema_station.ts @@ -0,0 +1,182 @@ +import { OpenApi } from "@samchon/openapi"; + +import { Metadata } from "../../schemas/metadata/Metadata"; +import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; +import { MetadataNative } from "../../schemas/metadata/MetadataNative"; + +import { AtomicPredicator } from "../helpers/AtomicPredicator"; +import { json_schema_alias } from "./json_schema_alias"; +import { json_schema_array } from "./json_schema_array"; +import { json_schema_bigint } from "./json_schema_bigint"; +import { json_schema_boolean } from "./json_schema_boolean"; +import { json_schema_constant } from "./json_schema_constant"; +import { json_schema_discriminator } from "./json_schema_discriminator"; +import { json_schema_escaped } from "./json_schema_escaped"; +import { json_schema_native } from "./json_schema_native"; +import { json_schema_number } from "./json_schema_number"; +import { json_schema_object } from "./json_schema_object"; +import { json_schema_string } from "./json_schema_string"; +import { json_schema_templates } from "./json_schema_template"; +import { json_schema_tuple } from "./json_schema_tuple"; + +export const json_schema_station = (props: { + blockNever: BlockNever; + components: OpenApi.IComponents; + attribute: OpenApi.IJsonSchema.__IAttribute; + metadata: Metadata; +}): BlockNever extends true + ? OpenApi.IJsonSchema | null + : OpenApi.IJsonSchema => { + if (props.metadata.any === true) + return { + ...props.attribute, + type: undefined, + }; + + //---- + // GATHER UNION SCHEMAS + //---- + const union: OpenApi.IJsonSchema[] = []; + const insert = (schema: OpenApi.IJsonSchema) => union.push(schema); + + // NULLABLE + if (props.metadata.nullable === true) + insert({ + type: "null", + }); + + // toJSON() METHOD + if (props.metadata.escaped !== null) + json_schema_escaped({ + components: props.components, + escaped: props.metadata.escaped, + }).forEach(insert); + + // ATOMIC TYPES + if ( + props.metadata.templates.length && + AtomicPredicator.template(props.metadata) + ) + json_schema_templates(props.metadata).forEach(insert); + for (const constant of props.metadata.constants) + if ( + AtomicPredicator.constant({ + metadata: props.metadata, + name: constant.type, + }) === false + ) + continue; + else json_schema_constant(constant).forEach(insert); + for (const a of props.metadata.atomics) + if (a.type === "boolean") json_schema_boolean(a).forEach(insert); + else if (a.type === "bigint") json_schema_bigint(a).forEach(insert); + else if (a.type === "number") json_schema_number(a).forEach(insert); + else if (a.type === "string") json_schema_string(a).forEach(insert); + + // ARRAY + for (const array of props.metadata.arrays) + json_schema_array({ + components: props.components, + array, + }).forEach(insert); + + // TUPLE + for (const tuple of props.metadata.tuples) + insert( + json_schema_tuple({ + components: props.components, + tuple, + }), + ); + + // NATIVES + for (const native of props.metadata.natives) + if (AtomicPredicator.native(native.name)) { + const type: string = native.name.toLowerCase(); + if (props.metadata.atomics.some((a) => a.type === type)) continue; + else if (type === "boolean") + json_schema_boolean( + MetadataAtomic.create({ + type: "boolean", + tags: [], + }), + ).map(insert); + else if (type === "bigint") + json_schema_bigint( + MetadataAtomic.create({ + type: "bigint", + tags: [], + }), + ).map(insert); + else if (type === "number") + json_schema_number( + MetadataAtomic.create({ + type: "number", + tags: [], + }), + ).map(insert); + else if (type === "string") + json_schema_string( + MetadataAtomic.create({ + type: "string", + tags: [], + }), + ).map(insert); + } else + json_schema_native({ + components: props.components, + native, + }).forEach(insert); + if (props.metadata.sets.length) + json_schema_native({ + native: MetadataNative.create({ + name: "Set", + tags: [], + }), + components: props.components, + }).forEach(insert); + if (props.metadata.maps.length) + json_schema_native({ + native: MetadataNative.create({ + name: "Map", + tags: [], + }), + components: props.components, + }).forEach(insert); + + // OBJECT + for (const object of props.metadata.objects) + json_schema_object({ + components: props.components, + object, + }).forEach(insert); + + // ALIASES + for (const alias of props.metadata.aliases) + json_schema_alias({ + alias, + blockNever: props.blockNever, + components: props.components, + }).forEach(insert); + + //---- + // RETURNS + //---- + if (union.length === 0 && props.blockNever === true) return null!; + const schema: OpenApi.IJsonSchema = + union.length === 0 + ? { type: undefined } + : union.length === 1 + ? union[0]! + : { + oneOf: union, + discriminator: json_schema_discriminator(props.metadata), + }; + 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/json_schema_string.ts b/src/programmers/internal/json_schema_string.ts new file mode 100644 index 0000000000..6bdf0fc7c5 --- /dev/null +++ b/src/programmers/internal/json_schema_string.ts @@ -0,0 +1,15 @@ +import { OpenApi } from "@samchon/openapi"; + +import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; + +import { json_schema_plugin } from "./json_schema_plugin"; + +export const json_schema_string = ( + atomic: MetadataAtomic, +): OpenApi.IJsonSchema[] => + json_schema_plugin({ + schema: { + type: "string", + } satisfies OpenApi.IJsonSchema, + tags: atomic.tags, + }); diff --git a/src/programmers/internal/json_schema_template.ts b/src/programmers/internal/json_schema_template.ts new file mode 100644 index 0000000000..978f45b4d0 --- /dev/null +++ b/src/programmers/internal/json_schema_template.ts @@ -0,0 +1,55 @@ +import { OpenApi } from "@samchon/openapi"; + +import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; +import { Metadata } from "../../schemas/metadata/Metadata"; +import { MetadataTemplate } from "../../schemas/metadata/MetadataTemplate"; + +import { json_schema_plugin } from "./json_schema_plugin"; +import { metadata_to_pattern } from "./metadata_to_pattern"; + +export const json_schema_templates = ( + metadata: Metadata, +): OpenApi.IJsonSchema[] => { + const pureTemplates: MetadataTemplate[] = metadata.templates.filter( + (t) => isPure(t.tags ?? []) === true, + ); + const taggedTemplates: MetadataTemplate[] = metadata.templates.filter( + (t) => isPure(t.tags ?? []) === false, + ); + + const output: OpenApi.IJsonSchema[] = []; + if (pureTemplates.length) + output.push({ + type: "string", + pattern: metadata_to_pattern({ + top: true, + metadata: Metadata.create({ + ...Metadata.initialize(), + templates: pureTemplates, + }), + }), + }); + for (const tpl of taggedTemplates) + output.push( + ...json_schema_plugin({ + schema: { + type: "string", + pattern: metadata_to_pattern({ + top: false, + metadata: Metadata.create({ + ...Metadata.initialize(), + templates: [tpl], + }), + }), + }, + tags: tpl.tags ?? [], + }), + ); + return output; +}; + +const isPure = (matrix: IMetadataTypeTag[][]) => + matrix.every((tags) => filter(tags).length === 0); + +const filter = (tags: IMetadataTypeTag[]) => + tags.filter((t) => t.schema !== undefined); diff --git a/src/programmers/internal/json_schema_title.ts b/src/programmers/internal/json_schema_title.ts new file mode 100644 index 0000000000..b29a3a027a --- /dev/null +++ b/src/programmers/internal/json_schema_title.ts @@ -0,0 +1,20 @@ +import { CommentFactory } from "../../factories/CommentFactory"; + +import { IJsDocTagInfo } from "../../schemas/metadata/IJsDocTagInfo"; + +export const json_schema_title = (schema: { + description?: string | null | undefined; + jsDocTags?: IJsDocTagInfo[] | undefined; +}): string | undefined => { + const info: IJsDocTagInfo | undefined = schema.jsDocTags?.find( + (tag) => tag.name === "title", + ); + if (info?.text?.length) return CommentFactory.merge(info.text); + else if (!schema.description?.length) return undefined; + + const index: number = schema.description.indexOf("\n"); + const top: string = ( + index === -1 ? schema.description : schema.description.substring(0, index) + ).trim(); + return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined; +}; diff --git a/src/programmers/internal/json_schema_tuple.ts b/src/programmers/internal/json_schema_tuple.ts new file mode 100644 index 0000000000..8f7bc37433 --- /dev/null +++ b/src/programmers/internal/json_schema_tuple.ts @@ -0,0 +1,35 @@ +import { OpenApi } from "@samchon/openapi"; + +import { Metadata } from "../../schemas/metadata/Metadata"; +import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; + +import { json_schema_station } from "./json_schema_station"; + +export const json_schema_tuple = (props: { + components: OpenApi.IComponents; + tuple: MetadataTuple; +}): OpenApi.IJsonSchema.ITuple => { + const tail: Metadata | null = props.tuple.type.elements.at(-1)?.rest ?? null; + const prefixItems: Metadata[] = props.tuple.type.isRest() + ? props.tuple.type.elements.slice(0, -1) + : props.tuple.type.elements; + return { + type: "array", + prefixItems: prefixItems.map((metadata) => + json_schema_station({ + blockNever: false, + components: props.components, + metadata, + attribute: {}, + }), + ), + additionalItems: tail + ? json_schema_station({ + blockNever: false, + components: props.components, + metadata: tail, + attribute: {}, + }) + : false, + }; +}; diff --git a/src/programmers/internal/metadata_to_pattern.ts b/src/programmers/internal/metadata_to_pattern.ts index 3e1231fbfd..3d91f87c32 100644 --- a/src/programmers/internal/metadata_to_pattern.ts +++ b/src/programmers/internal/metadata_to_pattern.ts @@ -7,28 +7,36 @@ import { template_to_pattern } from "./template_to_pattern"; /** * @internal */ -export const metadata_to_pattern = - (top: boolean) => - (meta: Metadata): string => { - if (meta.atomics.find((a) => a.type === "string") !== undefined) - return "(.*)"; +export const metadata_to_pattern = (props: { + top: boolean; + metadata: Metadata; +}): string => { + if (props.metadata.atomics.find((a) => a.type === "string") !== undefined) + return "(.*)"; - const values: string[] = meta.constants - .map((c) => { - if (c.type !== "string") return c.values.map((v) => v.toString()); - return (c.values.map((v) => v.value) as string[]).map((str) => - PatternUtil.escape(str), - ); - }) - .flat(); - for (const a of meta.atomics) - if (a.type === "number" || a.type === "bigint") - values.push(PatternUtil.NUMBER); - else if (a.type === "boolean") values.push(PatternUtil.BOOLEAN); - for (const { row } of meta.templates) - values.push("(" + template_to_pattern(false)(row) + ")"); + const values: string[] = props.metadata.constants + .map((c) => { + if (c.type !== "string") return c.values.map((v) => v.toString()); + return (c.values.map((v) => v.value) as string[]).map((str) => + PatternUtil.escape(str), + ); + }) + .flat(); + for (const a of props.metadata.atomics) + if (a.type === "number" || a.type === "bigint") + values.push(PatternUtil.NUMBER); + else if (a.type === "boolean") values.push(PatternUtil.BOOLEAN); + for (const { row } of props.metadata.templates) + values.push( + "(" + + template_to_pattern({ + top: false, + template: row, + }) + + ")", + ); - const pattern: string = - values.length === 1 ? values[0]! : "(" + values.join("|") + ")"; - return top ? PatternUtil.fix(pattern) : pattern; - }; + const pattern: string = + values.length === 1 ? values[0]! : "(" + values.join("|") + ")"; + return props.top ? PatternUtil.fix(pattern) : pattern; +}; diff --git a/src/programmers/internal/postfix_of_tuple.ts b/src/programmers/internal/postfix_of_tuple.ts index 7b89232d59..e5e802f326 100644 --- a/src/programmers/internal/postfix_of_tuple.ts +++ b/src/programmers/internal/postfix_of_tuple.ts @@ -1,2 +1,5 @@ +/** + * @internal + */ export const postfix_of_tuple = (str: string): string => str.endsWith('"') ? str.slice(0, -1) : `${str} + "`; diff --git a/src/programmers/internal/prune_object_properties.ts b/src/programmers/internal/prune_object_properties.ts index ea11ea050c..71241f98a6 100644 --- a/src/programmers/internal/prune_object_properties.ts +++ b/src/programmers/internal/prune_object_properties.ts @@ -1,19 +1,17 @@ import ts from "typescript"; -import { StatementFactory } from "../../factories/StatementFactory"; - -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { metadata_to_pattern } from "./metadata_to_pattern"; /** * @internal */ -export const prune_object_properties = (obj: MetadataObject) => { +export const prune_object_properties = (object: MetadataObjectType) => { const input: ts.Expression = ts.factory.createIdentifier("input"); const key: ts.Expression = ts.factory.createIdentifier("key"); - const condition: ts.Expression[] = obj.properties.map((prop) => { + const condition: ts.Expression[] = object.properties.map((prop) => { const name: string | null = prop.key.getSoleLiteral(); if (name !== null) return ts.factory.createStrictEquality( @@ -22,7 +20,10 @@ export const prune_object_properties = (obj: MetadataObject) => { ); return ts.factory.createCallExpression( ts.factory.createIdentifier( - `RegExp(/${metadata_to_pattern(true)(prop.key)}/).test`, + `RegExp(/${metadata_to_pattern({ + top: true, + metadata: prop.key, + })}/).test`, ), undefined, [key], @@ -47,7 +48,17 @@ export const prune_object_properties = (obj: MetadataObject) => { return ts.factory.createForOfStatement( undefined, - StatementFactory.constant("key").declarationList, + ts.factory.createVariableDeclarationList( + [ + ts.factory.createVariableDeclaration( + ts.factory.createIdentifier("key"), + undefined, + undefined, + undefined, + ), + ], + ts.NodeFlags.Const, + ), ts.factory.createCallExpression( ts.factory.createIdentifier("Object.keys"), undefined, diff --git a/src/programmers/internal/random_custom.ts b/src/programmers/internal/random_custom.ts deleted file mode 100644 index e1c09ba2e8..0000000000 --- a/src/programmers/internal/random_custom.ts +++ /dev/null @@ -1,37 +0,0 @@ -import ts from "typescript"; - -import { ExpressionFactory } from "../../factories/ExpressionFactory"; -import { LiteralFactory } from "../../factories/LiteralFactory"; - -import { IMetadataTypeTag } from "../../schemas/metadata/IMetadataTypeTag"; - -import { Customizable } from "../../typings/Customizable"; - -/** - * @internal - */ -export const random_custom = - (accessor: (name: string) => ts.Expression) => - (type: keyof Customizable) => - (tags: IMetadataTypeTag[]) => - (expression: ts.Expression) => - ExpressionFactory.coalesce( - ts.factory.createCallChain( - ts.factory.createPropertyAccessChain( - accessor("customs"), - ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), - ts.factory.createIdentifier(type), - ), - ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), - undefined, - [ - LiteralFactory.generate( - tags.map((t) => ({ - name: t.name, - kind: t.kind, - value: t.value, - })), - ), - ], - ), - )(expression); diff --git a/src/programmers/internal/stringify_dynamic_properties.ts b/src/programmers/internal/stringify_dynamic_properties.ts index cea3f96ca9..0b90f6f48a 100644 --- a/src/programmers/internal/stringify_dynamic_properties.ts +++ b/src/programmers/internal/stringify_dynamic_properties.ts @@ -33,7 +33,8 @@ export const stringify_dynamic_properties = ( undefined, [ts.factory.createIdentifier("input")], ), - )("map"), + "map", + ), undefined, [ ts.factory.createArrowFunction( @@ -55,7 +56,7 @@ export const stringify_dynamic_properties = ( ], ); const filtered = ts.factory.createCallExpression( - IdentifierFactory.access(mapped)("filter"), + IdentifierFactory.access(mapped, "filter"), undefined, [ ts.factory.createArrowFunction( @@ -72,7 +73,7 @@ export const stringify_dynamic_properties = ( ], ); return ts.factory.createCallExpression( - IdentifierFactory.access(filtered)("join"), + IdentifierFactory.access(filtered, "join"), undefined, [ts.factory.createStringLiteral(",")], ); @@ -87,7 +88,8 @@ export const stringify_dynamic_properties = ( ts.factory.createArrayLiteralExpression( regular.map((key) => ts.factory.createStringLiteral(key)), ), - )("some"), + "some", + ), undefined, [ ts.factory.createArrowFunction( @@ -122,7 +124,10 @@ export const stringify_dynamic_properties = ( const condition: ts.IfStatement = ts.factory.createIfStatement( ts.factory.createCallExpression( ts.factory.createIdentifier( - `RegExp(/${metadata_to_pattern(true)(entry.key)}/).test`, + `RegExp(/${metadata_to_pattern({ + top: true, + metadata: entry.key, + })}/).test`, ), undefined, [ts.factory.createIdentifier("key")], diff --git a/src/programmers/internal/stringify_regular_properties.ts b/src/programmers/internal/stringify_regular_properties.ts index 4f141a7d30..17aa9caf34 100644 --- a/src/programmers/internal/stringify_regular_properties.ts +++ b/src/programmers/internal/stringify_regular_properties.ts @@ -10,21 +10,21 @@ import { IExpressionEntry } from "../helpers/IExpressionEntry"; /** * @internal */ -export const stringify_regular_properties = ( - regular: IExpressionEntry[], - dynamic: IExpressionEntry[], -): ts.Expression[] => { +export const stringify_regular_properties = (props: { + regular: IExpressionEntry[]; + dynamic: IExpressionEntry[]; +}): ts.Expression[] => { const output: ts.Expression[] = []; - regular.sort((x, y) => sequence(x.meta) - sequence(y.meta)); - regular.forEach((entry, index) => { + props.regular.sort((x, y) => sequence(x.meta) - sequence(y.meta)); + props.regular.forEach((entry, index) => { // BASE ELEMENTS const key: string = entry.key.getSoleLiteral()!; const base: ts.Expression[] = [ ts.factory.createStringLiteral(`${JSON.stringify(key)}:`), entry.expression, ]; - if (index !== regular.length - 1 || dynamic.length !== 0) + if (index !== props.regular.length - 1 || props.dynamic.length !== 0) base.push(ts.factory.createStringLiteral(`,`)); const empty: boolean = diff --git a/src/programmers/internal/template_to_pattern.ts b/src/programmers/internal/template_to_pattern.ts index 0ac5e6a795..e4f64f78c4 100644 --- a/src/programmers/internal/template_to_pattern.ts +++ b/src/programmers/internal/template_to_pattern.ts @@ -7,9 +7,17 @@ import { metadata_to_pattern } from "./metadata_to_pattern"; /** * @internal */ -export const template_to_pattern = (top: boolean) => (template: Metadata[]) => { - const pattern: string = template - .map((meta) => metadata_to_pattern(false)(meta)) +export const template_to_pattern = (props: { + top: boolean; + template: Metadata[]; +}) => { + const pattern: string = props.template + .map((meta) => + metadata_to_pattern({ + top: false, + metadata: meta, + }), + ) .join(""); - return top ? PatternUtil.fix(pattern) : pattern; + return props.top ? PatternUtil.fix(pattern) : pattern; }; diff --git a/src/programmers/internal/wrap_metadata_rest_tuple.ts b/src/programmers/internal/wrap_metadata_rest_tuple.ts index 85dc1936a7..6806930217 100644 --- a/src/programmers/internal/wrap_metadata_rest_tuple.ts +++ b/src/programmers/internal/wrap_metadata_rest_tuple.ts @@ -2,6 +2,9 @@ import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; import { MetadataArrayType } from "../../schemas/metadata/MetadataArrayType"; +/** + * @internal + */ export const wrap_metadata_rest_tuple = (rest: Metadata) => { const wrapper: Metadata = Metadata.initialize(); wrapper.arrays.push( diff --git a/src/programmers/json/JsonApplicationProgrammer.ts b/src/programmers/json/JsonApplicationProgrammer.ts index 86af142dc5..54990489bf 100644 --- a/src/programmers/json/JsonApplicationProgrammer.ts +++ b/src/programmers/json/JsonApplicationProgrammer.ts @@ -1,82 +1,276 @@ -import { OpenApi, OpenApiV3 } from "@samchon/openapi"; +import { MetadataFactory } from "../../factories/MetadataFactory"; -import { IJsonApplication } from "../../schemas/json/IJsonApplication"; +import { __IJsonApplication } from "../../schemas/json/__IJsonApplication"; +import { IJsDocTagInfo } from "../../schemas/metadata/IJsDocTagInfo"; import { Metadata } from "../../schemas/metadata/Metadata"; +import { MetadataFunction } from "../../schemas/metadata/MetadataFunction"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; -import { TransformerError } from "../../transformers/TransformerError"; - -import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { application_v30_schema } from "../internal/application_v30_schema"; -import { application_v31_schema } from "../internal/application_v31_schema"; +import { JsonSchemasProgrammer } from "./JsonSchemasProgrammer"; export namespace JsonApplicationProgrammer { - export const validate = (meta: Metadata): string[] => { + export const validate = ( + metadata: Metadata, + explore: MetadataFactory.IExplore, + ): string[] => { + if (explore.top === false) return JsonSchemasProgrammer.validate(metadata); + const output: string[] = []; - if ( - meta.atomics.some((a) => a.type === "bigint") || - meta.constants.some((c) => c.type === "bigint") - ) - output.push("JSON schema does not support bigint type."); - if ( - meta.tuples.some((t) => - t.type.elements.some((e) => e.isRequired() === false), - ) || - meta.arrays.some((a) => a.type.value.isRequired() === false) - ) - output.push("JSON schema does not support undefined type in array."); - if (meta.maps.length) output.push("JSON schema does not support Map type."); - if (meta.sets.length) output.push("JSON schema does not support Set type."); - for (const native of meta.natives) - if ( - AtomicPredicator.native(native) === false && - native !== "Date" && - native !== "Blob" && - native !== "File" - ) - output.push(`JSON schema does not support ${native} type.`); + const valid: boolean = + metadata.size() === 1 && + metadata.objects.length === 1 && + metadata.isRequired() === true && + metadata.nullable === false; + if (valid === false) + output.push( + "JSON application's generic arugment must be a class/interface type.", + ); + + const object: MetadataObjectType | undefined = metadata.objects[0]?.type; + if (object !== undefined) { + if (object.properties.some((p) => p.key.isSoleLiteral() === false)) + output.push("JSON application does not allow dynamic keys."); + let least: boolean = false; + for (const p of object.properties) { + const value: Metadata = p.value; + if (value.functions.length) { + least ||= true; + if (valid === false) { + if (value.functions.length !== 1 || value.size() !== 1) + output.push( + "JSON application's function type does not allow union type.", + ); + if (value.isRequired() === false) + output.push("JSON application's function type must be required."); + if (value.nullable === true) + output.push( + "JSON application's function type must not be nullable.", + ); + } + } + } + if (least === false) + output.push( + "JSON application's target type must have at least a function type.", + ); + } return output; }; - export const write = (version: Version) => - version === "3.0" ? v30 : v31; + export const write = (props: { + version: Version; + metadata: Metadata; + }): __IJsonApplication => { + const errors: string[] = validate(props.metadata, { + top: true, + object: null, + property: null, + parameter: null, + nested: null, + aliased: false, + escaped: false, + output: false, + }); + if (errors.length) + throw new Error("Failed to write LLM application: " + errors.join("\n")); + + const object: MetadataObjectType = props.metadata.objects[0]!.type; + const definitions: Metadata[] = []; + const setters: Array<(schema: __IJsonApplication.Schema) => void> = + []; + const collect = ( + metadata: Metadata, + setter: (schema: __IJsonApplication.Schema) => void, + ): void => { + definitions.push(metadata); + setters.push(setter); + }; - const v30 = (metadatas: Array): IJsonApplication<"3.0"> => { - const components: OpenApiV3.IComponents = {}; - const generator = (meta: Metadata): OpenApiV3.IJsonSchema | null => - application_v30_schema(true)(components)({})(meta); + const functions: __IJsonApplication.IFunction< + __IJsonApplication.Schema + >[] = object.properties + .filter( + (p) => + p.key.isSoleLiteral() && + p.value.size() === 1 && + p.value.nullable === false && + p.value.isRequired() === true && + p.value.functions.length === 1, + ) + .filter( + (p) => + p.jsDocTags.find( + (tag) => tag.name === "hidden" || tag.name === "internal", + ) === undefined, + ) + .map((r) => + collectFunction({ + version: props.version, + name: r.key.getSoleLiteral()!, + function: r.value.functions[0]!, + description: r.description, + jsDocTags: r.jsDocTags, + collect, + }), + ); + const { components, schemas } = JsonSchemasProgrammer.write({ + version: props.version, + metadatas: definitions, + }); + schemas.forEach((s, i) => + setters[i]?.(s as __IJsonApplication.Schema), + ); return { - version: "3.0", - components, - schemas: metadatas.map((meta, i) => { - const schema: OpenApiV3.IJsonSchema | null = generator(meta); - if (schema === null) - throw new TransformerError({ - code: "typia.json.application", - message: `invalid type on argument - (${meta.getName()}, ${i})`, - }); - return schema; - }), + version: props.version, + components: components as any, + functions, }; }; - const v31 = (metadatas: Array): IJsonApplication<"3.1"> => { - const components: OpenApi.IComponents = { - schemas: {}, - }; - const generator = (meta: Metadata): OpenApi.IJsonSchema | null => - application_v31_schema(true)(components)({})(meta); + const collectFunction = (props: { + version: Version; + name: string; + function: MetadataFunction; + description: string | null; + jsDocTags: IJsDocTagInfo[]; + collect: ( + metadata: Metadata, + setter: (schema: __IJsonApplication.Schema) => void, + ) => void; + }): __IJsonApplication.IFunction<__IJsonApplication.Schema> => { + const deprecated: boolean = props.jsDocTags.some( + (tag) => tag.name === "deprecated", + ); + const tags: string[] = props.jsDocTags + .map((tag) => + tag.name === "tag" + ? (tag.text?.filter((elem) => elem.kind === "text") ?? []) + : [], + ) + .flat() + .map((elem) => elem.text) + .map((str) => str.trim().split(" ")[0] ?? "") + .filter((str) => !!str.length); return { - version: "3.1", - components, - schemas: metadatas.map((meta, i) => { - const schema: OpenApi.IJsonSchema | null = generator(meta); - if (schema === null) - throw new TransformerError({ - code: "typia.json.application", - message: `invalid type on argument - (${meta.getName()}, ${i})`, - }); - return schema; + name: props.name, + async: props.function.async, + parameters: props.function.parameters.map((param) => { + const appParam: __IJsonApplication.IParameter< + __IJsonApplication.Schema + > = { + name: param.name, + ...writeDescription({ + description: + param.description ?? + param.jsDocTags.find((tag) => tag.name === "description") + ?.text?.[0]?.text ?? + props.jsDocTags + .find( + (tag) => + tag.name === "param" && tag.text?.[0]?.text === param.name, + ) + ?.text?.map((e) => e.text) + .join("") + .substring(param.name.length) ?? + null, + jsDocTags: props.jsDocTags, + kind: "title", + }), + required: param.type.isRequired(), + schema: null!, + }; + props.collect(param.type, (schema) => (appParam.schema = schema)); + return appParam; }), + output: props.function.output.size() + ? (() => { + const appOutput: __IJsonApplication.IOutput< + __IJsonApplication.Schema + > = { + schema: null!, + required: props.function.output.isRequired(), + description: + writeDescriptionFromJsDocTag({ + jsDocTags: props.jsDocTags, + name: "return", + }) ?? + writeDescriptionFromJsDocTag({ + jsDocTags: props.jsDocTags, + name: "returns", + }) ?? + undefined, + }; + props.collect( + props.function.output, + (schema) => (appOutput.schema = schema), + ); + return appOutput; + })() + : undefined, + description: props.description ?? undefined, + deprecated: deprecated || undefined, + tags: tags.length ? tags : undefined, }; }; } + +const writeDescription = (props: { + description: string | null; + jsDocTags: IJsDocTagInfo[]; + kind: Kind; +}): Kind extends "summary" + ? { summary?: string; description?: string } + : { title?: string; description?: string } => { + const title: string | undefined = (() => { + const [explicit] = getJsDocTexts({ + jsDocTags: props.jsDocTags, + name: props.kind, + }); + if (explicit?.length) return explicit; + else if (!props.description?.length) return undefined; + + const index: number = props.description.indexOf("\n"); + const top: string = ( + index === -1 ? props.description : props.description.substring(0, index) + ).trim(); + return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined; + })(); + return { + [props.kind]: title, + description: props.description?.length ? props.description : undefined, + } as any; +}; + +const writeDescriptionFromJsDocTag = (props: { + jsDocTags: IJsDocTagInfo[]; + name: string; + parameter?: string; +}): string | null => { + const parametric: (elem: IJsDocTagInfo) => boolean = props.parameter + ? (tag) => + tag.text!.find( + (elem) => + elem.kind === "parameterName" && elem.text === props.parameter, + ) !== undefined + : () => true; + const tag: IJsDocTagInfo | undefined = props.jsDocTags.find( + (tag) => tag.name === props.name && tag.text && parametric(tag), + ); + return tag && tag.text + ? (tag.text.find((elem) => elem.kind === "text")?.text ?? null) + : null; +}; + +const getJsDocTexts = (props: { + jsDocTags: IJsDocTagInfo[]; + name: string; +}): string[] => + props.jsDocTags + .filter( + (tag) => + tag.name === props.name && + tag.text && + tag.text.find((elem) => elem.kind === "text" && elem.text.length) !== + undefined, + ) + .map((tag) => tag.text!.find((elem) => elem.kind === "text")!.text); diff --git a/src/programmers/json/JsonAssertParseProgrammer.ts b/src/programmers/json/JsonAssertParseProgrammer.ts index 309f806f18..62d741c2c6 100644 --- a/src/programmers/json/JsonAssertParseProgrammer.ts +++ b/src/programmers/json/JsonAssertParseProgrammer.ts @@ -4,93 +4,103 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; export namespace JsonAssertParseProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; init: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); return { functions: assert.functions, statements: [ ...assert.statements, - StatementFactory.constant("__assert", assert.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("string")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Primitive"), - [ + props.context.importer.type({ + file: "typia", + name: "Primitive", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - false, - ), + }), undefined, - ts.factory.createCallExpression( - ts.factory.createIdentifier("__assert"), - undefined, - [ - ts.factory.createCallExpression( - ts.factory.createIdentifier("JSON.parse"), - undefined, - [ts.factory.createIdentifier("input")], - ), - AssertProgrammer.Guardian.identifier(), - ], + ts.factory.createAsExpression( + ts.factory.createCallExpression( + ts.factory.createIdentifier("__assert"), + undefined, + [ + ts.factory.createCallExpression( + ts.factory.createIdentifier("JSON.parse"), + undefined, + [ts.factory.createIdentifier("input")], + ), + AssertProgrammer.Guardian.identifier(), + ], + ), + TypeFactory.keyword("any"), ), ), }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + context: props.context, + functor, + type: props.type, + name: props.name, + init: props.init, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/json/JsonAssertStringifyProgrammer.ts b/src/programmers/json/JsonAssertStringifyProgrammer.ts index f512a1f42e..e9280a2321 100644 --- a/src/programmers/json/JsonAssertStringifyProgrammer.ts +++ b/src/programmers/json/JsonAssertStringifyProgrammer.ts @@ -4,33 +4,36 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { JsonStringifyProgrammer } from "./JsonStringifyProgrammer"; export namespace JsonAssertStringifyProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; init: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const stringify: FeatureProgrammer.IDecomposed = JsonStringifyProgrammer.decompose({ @@ -45,15 +48,24 @@ export namespace JsonAssertStringifyProgrammer { statements: [ ...assert.statements, ...stringify.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__stringify", stringify.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__stringify", + value: stringify.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], stringify.arrow.type, undefined, @@ -83,22 +95,21 @@ export namespace JsonAssertStringifyProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + context: props.context, + functor, + type: props.type, + name: props.name, + init: props.init, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/json/JsonIsParseProgrammer.ts b/src/programmers/json/JsonIsParseProgrammer.ts index f33705a4b3..ffc365eeb9 100644 --- a/src/programmers/json/JsonIsParseProgrammer.ts +++ b/src/programmers/json/JsonIsParseProgrammer.ts @@ -4,56 +4,61 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; export namespace JsonIsParseProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); return { functions: is.functions, statements: [ ...is.statements, - StatementFactory.constant("__is", is.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("string"))], ts.factory.createUnionTypeNode([ - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Primitive"), - [ + props.context.importer.type({ + file: "typia", + name: "Primitive", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - false, - ), + }), ts.factory.createTypeReferenceNode("null"), ]), undefined, @@ -90,21 +95,20 @@ export namespace JsonIsParseProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + context: props.context, + functor, + type: props.type, + name: props.name, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/json/JsonIsStringifyProgrammer.ts b/src/programmers/json/JsonIsStringifyProgrammer.ts index f0aa6845e0..7a43977914 100644 --- a/src/programmers/json/JsonIsStringifyProgrammer.ts +++ b/src/programmers/json/JsonIsStringifyProgrammer.ts @@ -4,39 +4,42 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { JsonStringifyProgrammer } from "./JsonStringifyProgrammer"; export namespace JsonIsStringifyProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, + config: { + equals: false, + }, }); const stringify: FeatureProgrammer.IDecomposed = JsonStringifyProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, @@ -51,8 +54,14 @@ export namespace JsonIsStringifyProgrammer { statements: [ ...is.statements, ...stringify.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__stringify", stringify.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__stringify", + value: stringify.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -82,21 +91,18 @@ export namespace JsonIsStringifyProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/json/JsonSchemasProgrammer.ts b/src/programmers/json/JsonSchemasProgrammer.ts new file mode 100644 index 0000000000..1ce42a3b4e --- /dev/null +++ b/src/programmers/json/JsonSchemasProgrammer.ts @@ -0,0 +1,91 @@ +import { OpenApi } from "@samchon/openapi"; +import { OpenApiV3Downgrader } from "@samchon/openapi/lib/converters/OpenApiV3Downgrader"; + +import { IJsonSchemaCollection } from "../../schemas/json/IJsonSchemaCollection"; +import { Metadata } from "../../schemas/metadata/Metadata"; + +import { TransformerError } from "../../transformers/TransformerError"; + +import { AtomicPredicator } from "../helpers/AtomicPredicator"; +import { json_schema_station } from "../internal/json_schema_station"; + +export namespace JsonSchemasProgrammer { + export const validate = (metadata: Metadata): string[] => { + const output: string[] = []; + if ( + metadata.atomics.some((a) => a.type === "bigint") || + metadata.constants.some((c) => c.type === "bigint") + ) + output.push("JSON schema does not support bigint type."); + if ( + metadata.tuples.some((t) => + t.type.elements.some((e) => e.isRequired() === false), + ) || + metadata.arrays.some((a) => a.type.value.isRequired() === false) + ) + output.push("JSON schema does not support undefined type in array."); + if (metadata.maps.length) + output.push("JSON schema does not support Map type."); + if (metadata.sets.length) + output.push("JSON schema does not support Set type."); + for (const native of metadata.natives) + if ( + AtomicPredicator.native(native.name) === false && + native.name !== "Date" && + native.name !== "Blob" && + native.name !== "File" + ) + output.push(`JSON schema does not support ${native.name} type.`); + return output; + }; + + export const write = (props: { + version: Version; + metadatas: Array; + }): IJsonSchemaCollection => + props.version === "3.0" + ? (writeV3_0(props.metadatas) as IJsonSchemaCollection) + : (writeV3_1(props.metadatas) as IJsonSchemaCollection); + + const writeV3_0 = ( + medadataList: Array, + ): IJsonSchemaCollection<"3.0"> => { + const collection: IJsonSchemaCollection<"3.1"> = writeV3_1(medadataList); + const asset: OpenApiV3Downgrader.IComponentsCollection = + OpenApiV3Downgrader.downgradeComponents(collection.components); + const caster = OpenApiV3Downgrader.downgradeSchema(asset); + return { + version: "3.0", + components: asset.downgraded, + schemas: collection.schemas.map(caster), + }; + }; + + const writeV3_1 = ( + metadataList: Array, + ): IJsonSchemaCollection<"3.1"> => { + const components: OpenApi.IComponents = { + schemas: {}, + }; + const generator = (metadata: Metadata): OpenApi.IJsonSchema | null => + json_schema_station({ + blockNever: true, + components, + attribute: {}, + metadata, + }); + return { + version: "3.1", + components, + schemas: metadataList.map((meta, i) => { + const schema: OpenApi.IJsonSchema | null = generator(meta); + if (schema === null) + throw new TransformerError({ + code: "typia.json.application", + message: `invalid type on argument - (${meta.getName()}, ${i})`, + }); + return schema; + }), + }; + }; +} diff --git a/src/programmers/json/JsonStringifyProgrammer.ts b/src/programmers/json/JsonStringifyProgrammer.ts index 9894b6925f..d92012ee20 100644 --- a/src/programmers/json/JsonStringifyProgrammer.ts +++ b/src/programmers/json/JsonStringifyProgrammer.ts @@ -11,19 +11,19 @@ import { ValueFactory } from "../../factories/ValueFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../../schemas/metadata/MetadataTupleType"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { Atomic } from "../../typings/Atomic"; -import { ArrayUtil } from "../../utils/ArrayUtil"; - import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { OptionPredicator } from "../helpers/OptionPredicator"; import { StringifyJoiner } from "../helpers/StringifyJoinder"; import { StringifyPredicator } from "../helpers/StringifyPredicator"; @@ -39,19 +39,19 @@ export namespace JsonStringifyProgrammer { ----------------------------------------------------------- */ export const decompose = (props: { validated: boolean; - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { - const config: FeatureProgrammer.IConfig = configure(props.project)( - props.importer, - ); + const config: FeatureProgrammer.IConfig = configure(props); if (props.validated === false) config.addition = (collection) => - IsProgrammer.write_function_statements(props.project)(props.importer)( + IsProgrammer.write_function_statements({ + context: props.context, + functor: props.functor, collection, - ); + }); const composed: FeatureProgrammer.IComposed = FeatureProgrammer.compose({ ...props, config, @@ -70,586 +70,678 @@ export namespace JsonStringifyProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - validated: false, - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + validated: false, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - const write_array_functions = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .arrays() - .filter((a) => a.recursive) - .map((type, i) => - StatementFactory.constant( - `${config.prefix}a${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_array_inline(config)(importer)( - ts.factory.createIdentifier("input"), - MetadataArray.create({ - type, - tags: [], - }), - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_array_functions = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .arrays() + .filter((a) => a.recursive) + .map((type, i) => + StatementFactory.constant({ + name: `${props.config.prefix}a${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_array_inline({ + config: props.config, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + array: MetadataArray.create({ + type, + tags: [], + }), + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); - const write_tuple_functions = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .tuples() - .filter((t) => t.recursive) - .map((tuple, i) => - StatementFactory.constant( - `${config.prefix}t${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_tuple_inline(project)(config)(importer)( - ts.factory.createIdentifier("input"), - tuple, - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_tuple_functions = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .tuples() + .filter((t) => t.recursive) + .map((tuple, i) => + StatementFactory.constant({ + name: `${props.config.prefix}t${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_tuple_inline({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + tuple, + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - const decode = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - // ANY TYPE - if (meta.any === true) - return wrap_required( - input, - meta, - explore, - )( - wrap_functional( - input, - meta, - explore, - )( - ts.factory.createCallExpression( - ts.factory.createIdentifier("JSON.stringify"), - undefined, - [input], - ), + const decode = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + // ANY TYPE + if (props.metadata.any === true) + return wrap_required({ + input: props.input, + metadata: props.metadata, + explore: props.explore, + expression: wrap_functional({ + input: props.input, + metadata: props.metadata, + explore: props.explore, + expression: ts.factory.createCallExpression( + ts.factory.createIdentifier("JSON.stringify"), + undefined, + [props.input], ), - ); + }), + }); - // ONLY NULL OR UNDEFINED - const size: number = meta.size(); + // ONLY NULL OR UNDEFINED + const size: number = props.metadata.size(); + if ( + size === 0 && + (props.metadata.isRequired() === false || + props.metadata.nullable === true) + ) { if ( - size === 0 && - (meta.isRequired() === false || meta.nullable === true) - ) { - if (meta.isRequired() === false && meta.nullable === true) - return explore.from === "array" - ? ts.factory.createStringLiteral("null") - : ts.factory.createConditionalExpression( - ts.factory.createStrictEquality(ts.factory.createNull(), input), - undefined, - ts.factory.createStringLiteral("null"), - undefined, - ts.factory.createIdentifier("undefined"), - ); - else if (meta.isRequired() === false) - return explore.from === "array" - ? ts.factory.createStringLiteral("null") - : ts.factory.createIdentifier("undefined"); - else return ts.factory.createStringLiteral("null"); - } + props.metadata.isRequired() === false && + props.metadata.nullable === true + ) + return props.explore.from === "array" + ? ts.factory.createStringLiteral("null") + : ts.factory.createConditionalExpression( + ts.factory.createStrictEquality( + ts.factory.createNull(), + props.input, + ), + undefined, + ts.factory.createStringLiteral("null"), + undefined, + ts.factory.createIdentifier("undefined"), + ); + else if (props.metadata.isRequired() === false) + return props.explore.from === "array" + ? ts.factory.createStringLiteral("null") + : ts.factory.createIdentifier("undefined"); + else return ts.factory.createStringLiteral("null"); + } + + //---- + // LIST UP UNION TYPES + //---- + const unions: IUnion[] = []; - //---- - // LIST UP UNION TYPES - //---- - const unions: IUnion[] = []; + // toJSON() METHOD + if (props.metadata.escaped !== null) + unions.push({ + type: "resolved", + is: + props.metadata.escaped.original.size() === 1 && + props.metadata.escaped.original.natives[0]?.name === "Date" + ? () => + check_native({ + name: "Date", + input: props.input, + }) + : () => + IsProgrammer.decode_to_json({ + checkNull: false, + input: props.input, + }), + value: () => + decode_to_json({ + ...props, + metadata: props.metadata.escaped!.returns, + }), + }); + else if (props.metadata.functions.length) + unions.push({ + type: "functional", + is: () => IsProgrammer.decode_functional(props.input), + value: () => decode_functional(props.explore), + }); + + // TEMPLATES + if (props.metadata.templates.length) + if (AtomicPredicator.template(props.metadata)) { + const partial = Metadata.initialize(); + partial.atomics.push( + MetadataAtomic.create({ type: "string", tags: [] }), + ), + unions.push({ + type: "template literal", + is: () => + IsProgrammer.decode({ + ...props, + metadata: partial, + }), + value: () => + decode_atomic({ + ...props, + type: "string", + }), + }); + } - // toJSON() METHOD - if (meta.escaped !== null) + // CONSTANTS + for (const constant of props.metadata.constants) + if ( + AtomicPredicator.constant({ + metadata: props.metadata, + name: constant.type, + }) === false + ) + continue; + else if (constant.type !== "string") unions.push({ - type: "resolved", - is: - meta.escaped.original.size() === 1 && - meta.escaped.original.natives[0] === "Date" - ? () => check_native("Date")(input) - : () => IsProgrammer.decode_to_json(false)(input), + type: "atomic", + is: () => + IsProgrammer.decode({ + ...props, + metadata: (() => { + const partial = Metadata.initialize(); + partial.atomics.push( + MetadataAtomic.create({ + type: constant.type, + tags: [], + }), + ); + return partial; + })(), + }), value: () => - decode_to_json(project)(config)(importer)( - input, - meta.escaped!.returns, - explore, - ), + decode_atomic({ + ...props, + type: constant.type, + }), }); - else if (meta.functions.length) + else if (props.metadata.templates.length === 0) unions.push({ - type: "functional", - is: () => IsProgrammer.decode_functional(input), - value: () => decode_functional(explore), + type: "const string", + is: () => + IsProgrammer.decode({ + ...props, + metadata: (() => { + const partial = Metadata.initialize(); + partial.atomics.push( + MetadataAtomic.create({ + type: "string", + tags: [], + }), + ); + return partial; + })(), + }), + value: () => + decode_constant_string({ + ...props, + values: [...constant.values.map((v) => v.value)] as string[], + }), }); - // TEMPLATES + /// ATOMICS + for (const a of props.metadata.atomics) if ( - meta.templates.length || - ArrayUtil.has(meta.constants, (c) => c.type === "string") + AtomicPredicator.atomic({ + metadata: props.metadata, + name: a.type, + }) ) - if (AtomicPredicator.template(meta)) { - const partial = Metadata.initialize(); - partial.atomics.push( - MetadataAtomic.create({ type: "string", tags: [] }), - ), - unions.push({ - type: "template literal", - is: () => - IsProgrammer.decode(project)(importer)(input, partial, explore), - value: () => - decode_atomic(project)(importer)(input, "string", explore), - }); - } - - // CONSTANTS - for (const constant of meta.constants) - if (AtomicPredicator.constant(meta)(constant.type) === false) continue; - else if (constant.type !== "string") - unions.push({ - type: "atomic", - is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { - const partial = Metadata.initialize(); - partial.atomics.push( - MetadataAtomic.create({ - type: constant.type, - tags: [], - }), - ); - return partial; - })(), - explore, - ), - value: () => - decode_atomic(project)(importer)(input, constant.type, explore), - }); - else if (meta.templates.length === 0) - unions.push({ - type: "const string", - is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { - const partial = Metadata.initialize(); - partial.atomics.push( - MetadataAtomic.create({ - type: "string", - tags: [], - }), - ); - return partial; - })(), - explore, - ), - value: () => - decode_constant_string(project)(importer)( - input, - [...constant.values.map((v) => v.value)] as string[], - explore, - ), - }); - - /// ATOMICS - for (const a of meta.atomics) - if (AtomicPredicator.atomic(meta)(a.type)) - unions.push({ - type: "atomic", - is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { - const partial = Metadata.initialize(); - partial.atomics.push(a); - return partial; - })(), - explore, - ), - value: () => - decode_atomic(project)(importer)(input, a.type, explore), - }); - - // TUPLES - for (const tuple of meta.tuples) unions.push({ - type: "tuple", + type: "atomic", is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { + IsProgrammer.decode({ + ...props, + metadata: (() => { const partial = Metadata.initialize(); - partial.tuples.push(tuple); + partial.atomics.push(a); return partial; })(), - explore, - ), + }), value: () => - decode_tuple(project)(config)(importer)(input, tuple, explore), + decode_atomic({ + ...props, + type: a.type, + }), }); - // ARRAYS - if (meta.arrays.length) { - const value: () => ts.Expression = - meta.arrays.length === 1 - ? () => - decode_array(config)(importer)(input, meta.arrays[0]!, { - ...explore, - from: "array", - }) - : meta.arrays.some((elem) => elem.type.value.any) - ? () => - ts.factory.createCallExpression( - ts.factory.createIdentifier("JSON.stringify"), - undefined, - [input], - ) - : () => - explore_arrays(project)(config)(importer)( - input, - meta.arrays, - { - ...explore, - from: "array", - }, - ); + // TUPLES + for (const tuple of props.metadata.tuples) + unions.push({ + type: "tuple", + is: () => + IsProgrammer.decode({ + ...props, + metadata: (() => { + const partial = Metadata.initialize(); + partial.tuples.push(tuple); + return partial; + })(), + }), + value: () => + decode_tuple({ + ...props, + tuple, + }), + }); - unions.push({ - type: "array", - is: () => ExpressionFactory.isArray(input), - value, - }); - } + // ARRAYS + if (props.metadata.arrays.length) { + const value: () => ts.Expression = + props.metadata.arrays.length === 1 + ? () => + decode_array({ + ...props, + array: props.metadata.arrays[0]!, + explore: { + ...props.explore, + from: "array", + }, + }) + : props.metadata.arrays.some((elem) => elem.type.value.any) + ? () => + ts.factory.createCallExpression( + ts.factory.createIdentifier("JSON.stringify"), + undefined, + [props.input], + ) + : () => + explore_arrays({ + ...props, + arrays: props.metadata.arrays, + explore: { + ...props.explore, + from: "array", + }, + }); - // BUILT-IN CLASSES - if (meta.natives.length) - for (const native of meta.natives) - unions.push({ - type: "object", - is: () => check_native(native)(input), - value: () => - AtomicPredicator.native(native) - ? decode_atomic(project)(importer)( - input, - native.toLowerCase() as Atomic.Literal, - explore, - ) - : ts.factory.createStringLiteral("{}"), - }); + unions.push({ + type: "array", + is: () => ExpressionFactory.isArray(props.input), + value, + }); + } - // SETS - if (meta.sets.length) + // BUILT-IN CLASSES + if (props.metadata.natives.length) + for (const native of props.metadata.natives) unions.push({ type: "object", - is: () => ExpressionFactory.isInstanceOf("Set")(input), - value: () => ts.factory.createStringLiteral("{}"), + is: () => + check_native({ + name: native.name, + input: props.input, + }), + value: () => + AtomicPredicator.native(native.name) + ? decode_atomic({ + ...props, + type: native.name.toLowerCase() as Atomic.Literal, + }) + : ts.factory.createStringLiteral("{}"), }); - // MAPS - if (meta.maps.length) - unions.push({ - type: "object", - is: () => ExpressionFactory.isInstanceOf("Map")(input), - value: () => ts.factory.createStringLiteral("{}"), - }); + // SETS + if (props.metadata.sets.length) + unions.push({ + type: "object", + is: () => ExpressionFactory.isInstanceOf("Set", props.input), + value: () => ts.factory.createStringLiteral("{}"), + }); - // OBJECTS - if (meta.objects.length) - unions.push({ - type: "object", - is: () => - ExpressionFactory.isObject({ - checkNull: true, - checkArray: meta.objects.some((obj) => - obj.properties.every( - (prop) => - !prop.key.isSoleLiteral() || !prop.value.isRequired(), - ), + // MAPS + if (props.metadata.maps.length) + unions.push({ + type: "object", + is: () => ExpressionFactory.isInstanceOf("Map", props.input), + value: () => ts.factory.createStringLiteral("{}"), + }); + + // OBJECTS + if (props.metadata.objects.length) + unions.push({ + type: "object", + is: () => + ExpressionFactory.isObject({ + checkNull: true, + checkArray: props.metadata.objects.some((object) => + object.type.properties.every( + (prop) => !prop.key.isSoleLiteral() || !prop.value.isRequired(), ), - })(input), - value: () => - explore_objects(config)(importer)(input, meta, { - ...explore, + ), + input: props.input, + }), + value: () => + explore_objects({ + ...props, + explore: { + ...props.explore, from: "object", - }), - }); + }, + }), + }); - //---- - // RETURNS - //---- - // CHECK NULL AND UNDEFINED - const wrapper = (output: ts.Expression) => - wrap_required(input, meta, explore)(wrap_nullable(input, meta)(output)); - - // DIRECT RETURN - if (unions.length === 0) - return ts.factory.createCallExpression( - ts.factory.createIdentifier("JSON.stringify"), - undefined, - [input], - ); - else if (unions.length === 1) return wrapper(unions[0]!.value()); + //---- + // RETURNS + //---- + // CHECK NULL AND UNDEFINED + const wrapper = (output: ts.Expression) => + wrap_required({ + input: props.input, + metadata: props.metadata, + explore: props.explore, + expression: wrap_nullable({ + input: props.input, + metadata: props.metadata, + expression: output, + }), + }); - // RETURN WITH TYPE CHECKING - return wrapper( - ts.factory.createCallExpression( - ts.factory.createArrowFunction( - undefined, - undefined, - [], - undefined, - undefined, - iterate(importer, input, unions, meta.getName()), - ), + // DIRECT RETURN + if (unions.length === 0) + return ts.factory.createCallExpression( + ts.factory.createIdentifier("JSON.stringify"), + undefined, + [props.input], + ); + else if (unions.length === 1) return wrapper(unions[0]!.value()); + + // RETURN WITH TYPE CHECKING + return wrapper( + ts.factory.createCallExpression( + ts.factory.createArrowFunction( undefined, undefined, + [], + undefined, + undefined, + iterate({ + context: props.context, + functor: props.functor, + input: props.input, + expected: props.metadata.getName(), + unions, + }), ), - ); - }; + undefined, + undefined, + ), + ); + }; - const decode_object = (importer: FunctionImporter) => + const decode_object = (props: { + functor: FunctionProgrammer; + input: ts.Expression; + object: MetadataObjectType; + explore: FeatureProgrammer.IExplore; + }): ts.CallExpression => FeatureProgrammer.decode_object({ - trace: false, - path: false, - prefix: PREFIX, - })(importer); - - const decode_array = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - array.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}a${array.type.index}`), + config: { + trace: false, + path: false, + prefix: PREFIX, + }, + functor: props.functor, + object: props.object, + input: props.input, + explore: props.explore, + }); + + const decode_array = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + props.array.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}a${props.array.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + input: props.input, + explore: { + ...props.explore, source: "function", from: "array", - })(input), - ) - : decode_array_inline(config)(importer)(input, array, explore); - - const decode_array_inline = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - FeatureProgrammer.decode_array(config)(importer)(StringifyJoiner.array)( - input, - array, - explore, - ); + }, + }), + ) + : decode_array_inline(props); - const decode_tuple = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTuple, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - tuple.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}t${tuple.type.index}`), + const decode_array_inline = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + FeatureProgrammer.decode_array({ + config: props.config, + functor: props.functor, + combiner: StringifyJoiner.array, + array: props.array, + input: props.input, + explore: props.explore, + }); + + const decode_tuple = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + tuple: MetadataTuple; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + props.tuple.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}t${props.tuple.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, source: "function", - })(input), - ) - : decode_tuple_inline(project)(config)(importer)( - input, - tuple.type, - explore, - ); - - const decode_tuple_inline = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTupleType, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const children: ts.Expression[] = tuple.elements - .filter((elem) => elem.rest === null) - .map((elem, index) => - decode(project)(config)(importer)( - ts.factory.createElementAccessExpression(input, index), - elem, - { - ...explore, - from: "array", - postfix: explore.postfix.length - ? `${postfix_of_tuple(explore.postfix)}[${index}]"` - : `"[${index}]"`, }, - ), - ); - const rest = (() => { - if (tuple.elements.length === 0) return null; - const last = tuple.elements.at(-1)!; - if (last.rest === null) return null; - - const code = decode(project)(config)(importer)( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("slice"), - undefined, - [ExpressionFactory.number(tuple.elements.length - 1)], - ), - wrap_metadata_rest_tuple(tuple.elements.at(-1)!.rest!), - { - ...explore, - start: tuple.elements.length - 1, + input: props.input, + }), + ) + : decode_tuple_inline({ + ...props, + tuple: props.tuple.type, + }); + + const decode_tuple_inline = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + tuple: MetadataTupleType; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + const elements: ts.Expression[] = props.tuple.elements + .filter((elem) => elem.rest === null) + .map((elem, index) => + decode({ + ...props, + input: ts.factory.createElementAccessExpression(props.input, index), + metadata: elem, + explore: { + ...props.explore, + from: "array", + postfix: props.explore.postfix.length + ? `${postfix_of_tuple(props.explore.postfix)}[${index}]"` + : `"[${index}]"`, }, - ); - return ts.factory.createCallExpression( - importer.use("rest"), + }), + ); + const rest = (() => { + if (props.tuple.elements.length === 0) return null; + const last = props.tuple.elements.at(-1)!; + if (last.rest === null) return null; + + const code = decode({ + ...props, + input: ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "slice"), undefined, - [code], - ); - })(); - return StringifyJoiner.tuple(children, rest); - }; + [ExpressionFactory.number(props.tuple.elements.length - 1)], + ), + metadata: wrap_metadata_rest_tuple(props.tuple.elements.at(-1)!.rest!), + explore: { + ...props.explore, + start: props.tuple.elements.length - 1, + }, + }); + return ts.factory.createCallExpression( + props.context.importer.internal("jsonStringifyRest"), + undefined, + [code], + ); + })(); + return StringifyJoiner.tuple({ + elements, + rest, + }); + }; - const decode_atomic = - (project: IProject) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - type: string, - explore: FeatureProgrammer.IExplore, - ) => { - if (type === "string") - return ts.factory.createCallExpression( - importer.use("string"), + const decode_atomic = (props: { + context: ITypiaContext; + input: ts.Expression; + type: string; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + if (props.type === "string") + return ts.factory.createCallExpression( + props.context.importer.internal("jsonStringifyString"), + undefined, + [props.input], + ); + else if ( + props.type === "number" && + OptionPredicator.numeric(props.context.options) + ) + props = { + ...props, + input: ts.factory.createCallExpression( + props.context.importer.internal("jsonStringifyNumber"), + undefined, + [props.input], + ), + }; + + return props.explore.from !== "top" + ? props.input + : ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "toString"), undefined, - [input], - ); - else if (type === "number" && OptionPredicator.numeric(project.options)) - input = ts.factory.createCallExpression( - importer.use("number"), undefined, - [input], ); + }; - return explore.from !== "top" - ? input - : ts.factory.createCallExpression( - IdentifierFactory.access(input)("toString"), - undefined, - undefined, - ); - }; - - const decode_constant_string = - (project: IProject) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - values: string[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - if (values.every((v) => !StringifyPredicator.require_escape(v))) - return [ - ts.factory.createStringLiteral('"'), - input, - ts.factory.createStringLiteral('"'), - ].reduce((x, y) => ts.factory.createAdd(x, y)); - else return decode_atomic(project)(importer)(input, "string", explore); - }; + const decode_constant_string = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + input: ts.Expression; + values: string[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + if (props.values.every((v) => !StringifyPredicator.require_escape(v))) + return [ + ts.factory.createStringLiteral('"'), + props.input, + ts.factory.createStringLiteral('"'), + ].reduce((x, y) => ts.factory.createAdd(x, y)); + return decode_atomic({ + ...props, + type: "string", + }); + }; - const decode_to_json = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - resolved: Metadata, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - return decode(project)(config)(importer)( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("toJSON"), - undefined, - [], - ), - resolved, - explore, - ); - }; + const decode_to_json = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + return decode({ + ...props, + input: ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "toJSON"), + undefined, + [], + ), + }); + }; const decode_functional = (explore: FeatureProgrammer.IExplore) => explore.from === "array" @@ -659,173 +751,222 @@ export namespace JsonStringifyProgrammer { /* ----------------------------------------------------------- EXPLORERS ----------------------------------------------------------- */ - const explore_objects = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ) => - meta.objects.length === 1 - ? decode_object(importer)(input, meta.objects[0]!, explore) - : ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${PREFIX}u${meta.union_index!}`), - ), - undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), - ); - - const explore_arrays = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - elements: MetadataArray[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( - UnionExplorer.array({ - checker: IsProgrammer.decode(project)(importer), - decoder: decode_array(config)(importer), - empty: ts.factory.createStringLiteral("[]"), - success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - }), - )(input, elements, explore); - - const explore_array_like_union_types = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - factory: ( - parameters: ts.ParameterDeclaration[], - ) => ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ) => ts.ArrowFunction, - ) => - ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const arrow = - (parameters: ts.ParameterDeclaration[]) => - (explore: FeatureProgrammer.IExplore) => - (input: ts.Expression): ts.ArrowFunction => - factory(parameters)(input, elements, explore); - if (elements.every((e) => e.type.recursive === false)) - ts.factory.createCallExpression( - arrow([])(explore)(input), + const explore_objects = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }) => + props.metadata.objects.length === 1 + ? decode_object({ + functor: props.functor, + input: props.input, + object: props.metadata.objects[0]!.type, + explore: props.explore, + }) + : ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(`${PREFIX}u${props.metadata.union_index!}`), + ), undefined, - [], + FeatureProgrammer.argumentsArray(props), ); - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.emplaceUnion( - config.prefix, - elements.map((e) => e.type.name).join(" | "), - () => - arrow( - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - )({ - ...explore, - postfix: "", - })(ts.factory.createIdentifier("input")), - ), - ), + const explore_arrays = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + arrays: MetadataArray[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + explore_array_like_union_types({ + ...props, + elements: props.arrays, + factory: (next) => + UnionExplorer.array({ + config: { + checker: (v) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + metadata: v.definition, + input: v.input, + explore: v.explore, + }), + decoder: (v) => + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + empty: ts.factory.createStringLiteral("[]"), + success: ts.factory.createTrue(), + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: next.parameters, + input: next.input, + arrays: next.definitions, + explore: next.explore, + }), + //(next.parameters)(next.input, next.elements, next.explore), + }); + + const explore_array_like_union_types = < + T extends MetadataArray | MetadataTuple, + >(props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + factory: (next: { + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + definitions: T[]; + explore: FeatureProgrammer.IExplore; + }) => ts.ArrowFunction; + input: ts.Expression; + elements: T[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + const arrow = (next: { + parameters: ts.ParameterDeclaration[]; + explore: FeatureProgrammer.IExplore; + input: ts.Expression; + }): ts.ArrowFunction => + props.factory({ + definitions: props.elements, + parameters: next.parameters, + input: next.input, + explore: next.explore, + }); + if (props.elements.every((e) => e.type.recursive === false)) + ts.factory.createCallExpression( + arrow({ + parameters: [], + explore: props.explore, + input: props.input, + }), undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), + [], ); + + const arrayExplore: FeatureProgrammer.IExplore = { + ...props.explore, + source: "function", + from: "array", }; + return ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.emplaceUnion( + props.config.prefix, + props.elements.map((e) => e.type.name).join(" | "), + () => + arrow({ + parameters: FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + explore: { + ...arrayExplore, + postfix: "", + }, + input: ts.factory.createIdentifier("input"), + }), + ), + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: arrayExplore, + input: props.input, + }), + ); + }; /* ----------------------------------------------------------- RETURN SCRIPTS ----------------------------------------------------------- */ - const wrap_required = ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ((expression: ts.Expression) => ts.Expression) => { - if (meta.isRequired() === true && meta.any === false) - return (expression) => expression; - return (expression) => - ts.factory.createConditionalExpression( - ts.factory.createStrictInequality( - ts.factory.createIdentifier("undefined"), - input, - ), - undefined, - expression, - undefined, - explore.from === "array" - ? ts.factory.createStringLiteral("null") - : ts.factory.createIdentifier("undefined"), - ); + const wrap_required = (props: { + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + expression: ts.Expression; + }): ts.Expression => { + if (props.metadata.isRequired() === true && props.metadata.any === false) + return props.expression; + return ts.factory.createConditionalExpression( + ts.factory.createStrictInequality( + ts.factory.createIdentifier("undefined"), + props.input, + ), + undefined, + props.expression, + undefined, + props.explore.from === "array" + ? ts.factory.createStringLiteral("null") + : ts.factory.createIdentifier("undefined"), + ); }; - const wrap_nullable = ( - input: ts.Expression, - meta: Metadata, - ): ((expression: ts.Expression) => ts.Expression) => { - if (meta.nullable === false) return (expression) => expression; - return (expression) => - ts.factory.createConditionalExpression( - ts.factory.createStrictInequality(ts.factory.createNull(), input), - undefined, - expression, - undefined, - ts.factory.createStringLiteral("null"), - ); + const wrap_nullable = (props: { + input: ts.Expression; + metadata: Metadata; + expression: ts.Expression; + }): ts.Expression => { + if (props.metadata.nullable === false) return props.expression; + return ts.factory.createConditionalExpression( + ts.factory.createStrictInequality(ts.factory.createNull(), props.input), + undefined, + props.expression, + undefined, + ts.factory.createStringLiteral("null"), + ); }; - const wrap_functional = ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ((expression: ts.Expression) => ts.Expression) => { - if (meta.functions.length === 0) return (expression) => expression; - return (expression) => - ts.factory.createConditionalExpression( - ts.factory.createStrictInequality( - ts.factory.createStringLiteral("function"), - ValueFactory.TYPEOF(input), - ), - undefined, - expression, - undefined, - decode_functional(explore), - ); + const wrap_functional = (props: { + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + expression: ts.Expression; + }): ts.Expression => { + if (props.metadata.functions.length === 0) return props.expression; + return ts.factory.createConditionalExpression( + ts.factory.createStrictInequality( + ts.factory.createStringLiteral("function"), + ValueFactory.TYPEOF(props.input), + ), + undefined, + props.expression, + undefined, + decode_functional(props.explore), + ); }; - const iterate = ( - importer: FunctionImporter, - input: ts.Expression, - unions: IUnion[], - expected: string, - ) => + const iterate = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + input: ts.Expression; + unions: IUnion[]; + expected: string; + }) => ts.factory.createBlock( [ - ...unions.map((u) => + ...props.unions.map((u) => ts.factory.createIfStatement( u.is(), ts.factory.createReturnStatement(u.value()), ), ), - create_throw_error(importer)(expected)(input), + create_throw_error(props), ], true, ); @@ -833,73 +974,147 @@ export namespace JsonStringifyProgrammer { /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$s"; - - const configure = - (project: IProject) => - (importer: FunctionImporter): FeatureProgrammer.IConfig => { - const config: FeatureProgrammer.IConfig = { - types: { - input: (type, name) => - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), - ), - output: () => TypeFactory.keyword("string"), - }, - prefix: PREFIX, - trace: false, - path: false, - initializer, - decoder: () => decode(project)(config)(importer), - objector: { - checker: () => IsProgrammer.decode(project)(importer), - decoder: () => decode_object(importer), - joiner: StringifyJoiner.object(importer), - unionizer: decode_union_object( - IsProgrammer.decode_object(project)(importer), - )(decode_object(importer))((exp) => exp)((value, expected) => - create_throw_error(importer)(expected)(value), + const PREFIX = "_s"; + + const configure = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + }): FeatureProgrammer.IConfig => { + const config: FeatureProgrammer.IConfig = { + types: { + input: (type, name) => + ts.factory.createTypeReferenceNode( + name ?? + TypeFactory.getFullName({ checker: props.context.checker, type }), ), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - }, - generator: { - arrays: () => write_array_functions(config)(importer), - tuples: () => write_tuple_functions(project)(config)(importer), - }, - }; - return config; + output: () => TypeFactory.keyword("string"), + }, + prefix: PREFIX, + trace: false, + path: false, + initializer, + decoder: (next) => + decode({ + context: props.context, + functor: props.functor, + config, + metadata: next.metadata, + input: next.input, + explore: next.explore, + }), + objector: { + checker: (next) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + metadata: next.metadata, + input: next.input, + explore: next.explore, + }), + decoder: (next) => + decode_object({ + functor: props.functor, + input: next.input, + object: next.object, + explore: next.explore, + }), + joiner: (next) => + StringifyJoiner.object({ + ...next, + context: props.context, + }), + unionizer: (next) => + decode_union_object({ + checker: (v) => + IsProgrammer.decode_object({ + context: props.context, + functor: props.functor, + input: v.input, + object: v.object, + explore: v.explore, + }), + decoder: (v) => + decode_object({ + functor: props.functor, + input: v.input, + object: v.object, + explore: v.explore, + }), + success: (exp) => exp, + escaper: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + objects: next.objects, + explore: next.explore, + input: next.input, + }), + failure: (next) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: next.expected, + input: next.input, + }), + }, + generator: { + arrays: (collection) => + write_array_functions({ + config, + functor: props.functor, + collection, + }), + tuples: (collection) => + write_tuple_functions({ + config, + context: props.context, + functor: props.functor, + collection, + }), + }, }; + return config; + }; - const initializer: FeatureProgrammer.IConfig["initializer"] = - (project) => (importer) => (type) => - JsonMetadataFactory.analyze(`typia.json.${importer.method}`)( - project.checker, - project.context, - )(type); - - const create_throw_error = - (importer: FunctionImporter) => - (expected: string) => - (value: ts.Expression) => - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - importer.use("throws"), - [], - [ - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "expected", - ts.factory.createStringLiteral(expected), - ), - ts.factory.createPropertyAssignment("value", value), - ], - true, - ), - ], - ), - ); + const initializer: FeatureProgrammer.IConfig["initializer"] = (props) => + JsonMetadataFactory.analyze({ + method: props.functor.method, + checker: props.context.checker, + transformer: props.context.transformer, + type: props.type, + }); + + const create_throw_error = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + expected: string; + input: ts.Expression; + }) => + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + props.context.importer.internal("throwTypeGuardError"), + [], + [ + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "method", + ts.factory.createStringLiteral(props.functor.method), + ), + ts.factory.createPropertyAssignment( + "expected", + ts.factory.createStringLiteral(props.expected), + ), + ts.factory.createPropertyAssignment("value", props.input), + ], + true, + ), + ], + ), + ); } interface IUnion { diff --git a/src/programmers/json/JsonValidateParseProgrammer.ts b/src/programmers/json/JsonValidateParseProgrammer.ts index 646e62d587..f14447c534 100644 --- a/src/programmers/json/JsonValidateParseProgrammer.ts +++ b/src/programmers/json/JsonValidateParseProgrammer.ts @@ -4,49 +4,68 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; export namespace JsonValidateParseProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate: FeatureProgrammer.IDecomposed = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); return { functions: validate.functions, statements: [ ...validate.statements, - StatementFactory.constant("__validate", validate.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("string"))], - ts.factory.createTypeReferenceNode( - `typia.IValidation>`, - ), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [ + props.context.importer.type({ + file: "typia", + name: "Primitive", + arguments: [ + ts.factory.createTypeReferenceNode( + props.name ?? + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), + ), + ], + }), + ], + }), undefined, ts.factory.createAsExpression( ts.factory.createCallExpression( @@ -66,22 +85,21 @@ export namespace JsonValidateParseProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + context: props.context, + modulo: props.modulo, + functor, + type: props.type, + name: props.name, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/json/JsonValidateStringifyProgrammer.ts b/src/programmers/json/JsonValidateStringifyProgrammer.ts index 773f14dbac..dfea5fccd5 100644 --- a/src/programmers/json/JsonValidateStringifyProgrammer.ts +++ b/src/programmers/json/JsonValidateStringifyProgrammer.ts @@ -4,33 +4,36 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { JsonStringifyProgrammer } from "./JsonStringifyProgrammer"; export namespace JsonValidateStringifyProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate: FeatureProgrammer.IDecomposed = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, + config: { + equals: false, + }, }); const stringify: FeatureProgrammer.IDecomposed = JsonStringifyProgrammer.decompose({ @@ -45,21 +48,32 @@ export namespace JsonValidateStringifyProgrammer { statements: [ ...validate.statements, ...stringify.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__stringify", stringify.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__stringify", + value: stringify.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - ts.factory.createTypeReferenceNode("typia.IValidation", [ - stringify.arrow.type ?? ts.factory.createTypeReferenceNode("string"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [ + stringify.arrow.type ?? + ts.factory.createTypeReferenceNode("string"), + ], + }), undefined, ts.factory.createBlock([ - StatementFactory.constant( - "result", - ts.factory.createAsExpression( + StatementFactory.constant({ + name: "result", + value: ts.factory.createAsExpression( ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), undefined, @@ -67,7 +81,7 @@ export namespace JsonValidateStringifyProgrammer { ), TypeFactory.keyword("any"), ), - ), + }), ts.factory.createIfStatement( ts.factory.createIdentifier("result.success"), ts.factory.createExpressionStatement( @@ -90,22 +104,21 @@ export namespace JsonValidateStringifyProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + context: props.context, + modulo: props.modulo, + functor, + type: props.type, + name: props.name, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/llm/LlmApplicationProgrammer.ts b/src/programmers/llm/LlmApplicationProgrammer.ts index da8a3da467..182a1afb0e 100644 --- a/src/programmers/llm/LlmApplicationProgrammer.ts +++ b/src/programmers/llm/LlmApplicationProgrammer.ts @@ -1,66 +1,127 @@ -import { ILlmApplication, ILlmSchema } from "@samchon/openapi"; +import { + ILlmApplication, + ILlmSchema, + IOpenApiSchemaError, + IResult, + OpenApi, +} from "@samchon/openapi"; +import { LlmSchemaComposer } from "@samchon/openapi/lib/composers/LlmSchemaComposer"; import { ILlmFunction } from "@samchon/openapi/lib/structures/ILlmFunction"; import { MetadataFactory } from "../../factories/MetadataFactory"; +import { __IJsonApplication } from "../../schemas/json/__IJsonApplication"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataFunction } from "../../schemas/metadata/MetadataFunction"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; -import { IJsDocTagInfo } from "../../module"; +import { JsonApplicationProgrammer } from "../json/JsonApplicationProgrammer"; import { LlmSchemaProgrammer } from "./LlmSchemaProgrammer"; export namespace LlmApplicationProgrammer { - export const validate = ( - meta: Metadata, - explore: MetadataFactory.IExplore, - ): string[] => { - if (explore.top === false) return LlmSchemaProgrammer.validate(meta); + export const validate = (model: ILlmSchema.Model) => { + let top: Metadata | undefined; + return ( + metadata: Metadata, + explore: MetadataFactory.IExplore, + ): string[] => { + top ??= metadata; + if (explore.top === false) + if ( + explore.object === top?.objects[0]?.type && + typeof explore.property === "string" && + metadata.size() === 1 && + metadata.nullable === false && + metadata.isRequired() === true && + metadata.functions.length === 1 + ) + return validateFunction(explore.property, metadata.functions[0]!); + else return LlmSchemaProgrammer.validate(model)(metadata); - const output: string[] = []; - const valid: boolean = - meta.size() === 1 && - meta.objects.length === 1 && - meta.isRequired() === true && - meta.nullable === false; - if (valid === false) - output.push( - "LLM application's generic arugment must be a class/interface type.", - ); + const output: string[] = []; + const valid: boolean = + metadata.size() === 1 && + metadata.objects.length === 1 && + metadata.isRequired() === true && + metadata.nullable === false; + if (valid === false) + output.push( + "LLM application's generic arugment must be a class/interface type.", + ); - const object: MetadataObject | undefined = meta.objects[0]; - if (object !== undefined) { - if (object.properties.some((p) => p.key.isSoleLiteral() === false)) - output.push("LLM application does not allow dynamic keys."); - let least: boolean = false; - for (const p of object.properties) { - const value: Metadata = p.value; - if (value.functions.length) { - least ||= true; - if (valid === false) { - if (value.functions.length !== 1 || value.size() !== 1) - output.push( - "LLM application's function type does not allow union type.", - ); - if (value.isRequired() === false) - output.push("LLM application's function type must be required."); - if (value.nullable === true) - output.push( - "LLM application's function type must not be nullable.", - ); + const object: MetadataObjectType | undefined = metadata.objects[0]?.type; + if (object !== undefined) { + if (object.properties.some((p) => p.key.isSoleLiteral() === false)) + output.push( + "LLM application does not allow dynamic keys on class/interface type.", + ); + let least: boolean = false; + for (const p of object.properties) { + const value: Metadata = p.value; + if (value.functions.length) { + least ||= true; + if (valid === false) { + if (value.functions.length !== 1 || value.size() !== 1) + output.push( + "LLM application's function type does not allow union type.", + ); + if (value.isRequired() === false) + output.push( + "LLM application's function type must be required.", + ); + if (value.nullable === true) + output.push( + "LLM application's function type must not be nullable.", + ); + } } } + if (least === false) + output.push( + "LLM application's target type must have at least a function type.", + ); + } + return output; + }; + }; + + const validateFunction = (name: string, func: MetadataFunction): string[] => { + const output: string[] = []; + const prefix: string = `LLM application's function (${JSON.stringify(name)})`; + if (func.output.size() && func.output.isRequired() === false) + output.push( + `${prefix}'s return type must not be union type with undefined.`, + ); + if (func.parameters.length !== 1) + output.push(`${prefix} must have a single parameter.`); + if (func.parameters.length !== 0) { + const type: Metadata = func.parameters[0]!.type; + if (type.size() !== 1 || type.objects.length !== 1) + output.push(`${prefix}'s parameter must be an object type.`); + else { + if ( + type.objects[0]!.type.properties.some( + (p) => p.key.isSoleLiteral() === false, + ) + ) + output.push(`${prefix}'s parameter must not have dynamic keys.`); + if (type.isRequired() === false) + output.push( + `${prefix}'s parameter must not be union type with undefined.`, + ); + if (type.nullable === true) + output.push(`${prefix}'s parameter must not be nullable.`); } - if (least === false) - output.push( - "LLM application's target type must have at least a function type.", - ); } return output; }; - export const write = (metadata: Metadata): ILlmApplication => { - const errors: string[] = validate(metadata, { + export const write = (props: { + model: Model; + metadata: Metadata; + config?: Partial; + }): ILlmApplication => { + const errors: string[] = validate(props.model)(props.metadata, { top: true, object: null, property: null, @@ -73,164 +134,143 @@ export namespace LlmApplicationProgrammer { if (errors.length) throw new Error("Failed to write LLM application: " + errors.join("\n")); - const object: MetadataObject = metadata.objects[0]!; + const errorMessages: string[] = []; + const application: __IJsonApplication<"3.1"> = + JsonApplicationProgrammer.write({ + version: "3.1", + metadata: props.metadata, + }); + const functions: Array | null> = + application.functions.map((func) => + writeFunction({ + model: props.model, + components: application.components, + function: func, + errors: errorMessages, + }), + ); + if (functions.some((func) => func === null)) + throw new Error( + "Failed to write LLM application:\n\n" + + errorMessages.map((str) => ` - ${str}`).join("\n"), + ); return { - functions: object.properties - .filter( - (p) => - p.value.functions.length === 1 && - p.value.size() === 1 && - p.key.isSoleLiteral(), - ) - .filter( - (p) => p.jsDocTags.find((tag) => tag.name === "hidden") === undefined, - ) - .map((p) => - writeFunction({ - name: p.key.getSoleLiteral()!, - function: p.value.functions[0]!, - description: p.description, - jsDocTags: p.jsDocTags, - }), - ), + model: props.model, options: { + ...LlmSchemaComposer.defaultConfig(props.model), + ...props.config, separate: null, - recursive: 3, }, + functions: functions as ILlmFunction[], }; }; - const writeFunction = (props: { - name: string; - function: MetadataFunction; - description: string | null; - jsDocTags: IJsDocTagInfo[]; - }): ILlmFunction => { - const deprecated: boolean = props.jsDocTags.some( - (tag) => tag.name === "deprecated", - ); - const tags: string[] = props.jsDocTags - .map((tag) => - tag.name === "tag" - ? (tag.text?.filter((elem) => elem.kind === "text") ?? []) - : [], - ) - .flat() - .map((elem) => elem.text) - .map((str) => str.trim().split(" ")[0] ?? "") - .filter((str) => !!str.length); - return { - name: props.name, - parameters: props.function.parameters.map((p) => { - const jsDocTagDescription: string | null = writeDescriptionFromJsDocTag( - { - jsDocTags: p.jsDocTags, - tag: "param", - parameter: p.name, - }, - ); - return writeSchema({ - metadata: p.type, - description: jsDocTagDescription ?? p.description, - jsDocTags: jsDocTagDescription ? [] : p.jsDocTags, - }); - }), - output: - props.function.output.size() || props.function.output.nullable - ? writeSchema({ - metadata: props.function.output, - description: - writeDescriptionFromJsDocTag({ - jsDocTags: props.jsDocTags, - tag: "return", - }) ?? - writeDescriptionFromJsDocTag({ - jsDocTags: props.jsDocTags, - tag: "returns", - }), - jsDocTags: [], - }) - : undefined, - description: props.description ?? undefined, - deprecated: deprecated || undefined, - tags: tags.length ? tags : undefined, - }; - }; - - const writeSchema = (props: { - metadata: Metadata; - description: string | null; - jsDocTags: IJsDocTagInfo[]; - }): ILlmSchema => { - const schema: ILlmSchema = LlmSchemaProgrammer.write(props.metadata); - const explicit: Pick = - writeDescription({ - description: props.description, - jsDocTags: props.jsDocTags, + const writeFunction = (props: { + model: Model; + components: OpenApi.IComponents; + function: __IJsonApplication.IFunction; + errors: string[]; + }): ILlmFunction | null => { + const parameters: ILlmSchema.ModelParameters[Model] | null = + writeParameters({ + ...props, + accessor: `$input.${props.function.name}.parameters`, }); + if (parameters === null) return null; + const output: ILlmSchema.ModelSchema[Model] | null | undefined = + writeOutput({ + model: props.model, + parameters, + components: props.components, + schema: props.function.output?.schema ?? null, + errors: props.errors, + accessor: `$input.${props.function.name}.output`, + }); + if (output === null) return null; + else if ( + output && + output.description === undefined && + !!props.function.output?.description?.length + ) + output.description = props.function.output.description; return { - ...schema, - ...(!!explicit.title?.length || !!explicit.description?.length - ? explicit - : {}), + name: props.function.name, + parameters, + output: (output ?? undefined) as + | ILlmSchema.ModelSchema[Model] + | undefined, + description: (() => { + if ( + !props.function.summary?.length || + !props.function.description?.length + ) + return props.function.summary || props.function.description; + const summary: string = props.function.summary.endsWith(".") + ? props.function.summary.slice(0, -1) + : props.function.summary; + return props.function.description.startsWith(summary) + ? props.function.description + : summary + ".\n\n" + props.function.description; + })(), + deprecated: props.function.deprecated, + tags: props.function.tags, + strict: true, }; }; - const writeDescription = (props: { - description: string | null; - jsDocTags: IJsDocTagInfo[]; - }): Pick => { - const title: string | undefined = (() => { - const [explicit] = getJsDocTexts({ - jsDocTags: props.jsDocTags, - name: "title", - }); - if (explicit?.length) return explicit; - else if (!props.description?.length) return undefined; + const writeParameters = (props: { + model: Model; + components: OpenApi.IComponents; + function: __IJsonApplication.IFunction; + errors: string[]; + accessor: string; + }): ILlmSchema.ModelParameters[Model] | null => { + const schema = props.function.parameters[0]?.schema; + if (!schema) return null; - const index: number = props.description.indexOf("\n"); - const top: string = ( - index === -1 ? props.description : props.description.substring(0, index) - ).trim(); - return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined; - })(); - return { - title: title, - description: props.description?.length ? props.description : undefined, - } as any; + const result: IResult< + ILlmSchema.ModelParameters[Model], + IOpenApiSchemaError + > = LlmSchemaComposer.parameters(props.model)({ + config: LlmSchemaComposer.defaultConfig(props.model) as any, + components: props.components, + schema: schema as + | OpenApi.IJsonSchema.IObject + | OpenApi.IJsonSchema.IReference, + accessor: props.accessor, + }) as IResult; + if (result.success === false) { + props.errors.push( + ...result.error.reasons.map((r) => ` - ${r.accessor}: ${r.message}`), + ); + return null; + } + return result.value; }; - const writeDescriptionFromJsDocTag = (props: { - jsDocTags: IJsDocTagInfo[]; - tag: string; - parameter?: string; - }): string | null => { - const parametric: (elem: IJsDocTagInfo) => boolean = props.parameter - ? (tag) => - tag.text!.find( - (elem) => - elem.kind === "parameterName" && elem.text === props.parameter, - ) !== undefined - : () => true; - const tag: IJsDocTagInfo | undefined = props.jsDocTags.find( - (tag) => tag.name === props.tag && tag.text && parametric(tag), - ); - return tag && tag.text - ? (tag.text.find((elem) => elem.kind === "text")?.text ?? null) - : null; + const writeOutput = (props: { + model: Model; + parameters: ILlmSchema.ModelParameters[Model]; + components: OpenApi.IComponents; + schema: OpenApi.IJsonSchema | null; + errors: string[]; + accessor: string; + }): ILlmSchema.ModelSchema[Model] | null | undefined => { + if (props.schema === null) return undefined; + const result: IResult = + LlmSchemaComposer.schema(props.model)({ + config: LlmSchemaComposer.defaultConfig(props.model) as any, + components: props.components, + schema: props.schema, + $defs: (props.parameters as any).$defs, + accessor: props.accessor, + }) as IResult; + if (result.success === false) { + props.errors.push( + ...result.error.reasons.map((r) => ` - ${r.accessor}: ${r.message}`), + ); + return null; + } + return result.value; }; - - const getJsDocTexts = (props: { - jsDocTags: IJsDocTagInfo[]; - name: string; - }): string[] => - props.jsDocTags - .filter( - (tag) => - tag.name === props.name && - tag.text && - tag.text.find((elem) => elem.kind === "text" && elem.text.length) !== - undefined, - ) - .map((tag) => tag.text!.find((elem) => elem.kind === "text")!.text); } diff --git a/src/programmers/llm/LlmModelPredicator.ts b/src/programmers/llm/LlmModelPredicator.ts new file mode 100644 index 0000000000..bf854d7488 --- /dev/null +++ b/src/programmers/llm/LlmModelPredicator.ts @@ -0,0 +1,127 @@ +import { ILlmSchema } from "@samchon/openapi"; +import { LlmSchemaComposer } from "@samchon/openapi/lib/composers/LlmSchemaComposer"; +import ts from "typescript"; + +import { MetadataCollection } from "../../factories/MetadataCollection"; +import { MetadataFactory } from "../../factories/MetadataFactory"; + +import { Metadata } from "../../schemas/metadata/Metadata"; +import { MetadataObject } from "../../schemas/metadata/MetadataObject"; + +import { ITypiaContext } from "../../transformers/ITypiaContext"; +import { TransformerError } from "../../transformers/TransformerError"; + +import { ValidationPipe } from "../../typings/ValidationPipe"; + +export namespace LlmModelPredicator { + export const getConfig = (props: { + context: ITypiaContext; + method: string; + model: ILlmSchema.Model; + node: ts.TypeNode | undefined; + }): Partial | undefined => { + if (props.node === undefined) return undefined; + const type: ts.Type = props.context.checker.getTypeFromTypeNode(props.node); + const collection: MetadataCollection = new MetadataCollection(); + const result: ValidationPipe = + MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: false, + constant: true, + absorb: false, + functional: false, + }, + collection, + type, + }); + if (result.success === false) + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `Failed to analyze generic argument "Config".`, + }); + + const meta: Metadata = result.data; + if ( + meta.size() !== 1 || + meta.objects.length !== 1 || + meta.nullable === true || + meta.isRequired() === false + ) + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `Invalid generic argument "Config". It must be a literal object type.`, + }); + + const obj: MetadataObject = meta.objects[0]!; + if (obj.type.properties.some((p) => p.key.isSoleLiteral() === false)) + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `Invalid generic argument "Config". It must be a literal object type. Do not allow dynamic properties.`, + }); + else if ( + obj.type.properties.some( + (p) => + p.value.size() !== 1 || + p.value.constants.length !== 1 || + p.value.nullable === true || + p.value.isRequired() === false, + ) + ) + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `Invalid generic argument "Config". It must be a literal object type. Do not allow variable type.`, + }); + const config: Partial = {}; + for (const prop of obj.type.properties) { + const key: string = prop.key.getSoleLiteral()!; + const value: boolean | bigint | number | string = + prop.value.constants[0]!.values[0]!.value; + if (typeof value === "bigint") + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `Invalid generic argument "Config". It must be a literal object type. Do not allow bigint.`, + }); + (config as any)[key] = value; + } + return config; + }; + + export const getModel = (props: { + checker: ts.TypeChecker; + method: string; + node: ts.TypeNode | undefined; + }): ILlmSchema.Model => { + if (props.node === undefined) + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `generic argument "Model" must be specified.`, + }); + + // CHECK LITERAL TYPE + const type: ts.Type = props.checker.getTypeFromTypeNode(props.node); + if ( + !type.isLiteral() && + (type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0 + ) + throw new TransformerError({ + code: `typia.llm.${props.method}`, + message: `generic argument "Model" must be constant.`, + }); + + // GET VALUE AND VALIDATE IT + const value = type.isLiteral() + ? type.value + : props.checker.typeToString(type); + if ( + typeof value !== "string" || + LlmSchemaComposer.defaultConfig(value as "3.0") === undefined + ) + throw new TransformerError({ + code: "typia.llm.schema", + message: `invalid value on generic argument "Model".`, + }); + return value as ILlmSchema.Model; + }; +} diff --git a/src/programmers/llm/LlmParametersProgrammer.ts b/src/programmers/llm/LlmParametersProgrammer.ts new file mode 100644 index 0000000000..a00d13a082 --- /dev/null +++ b/src/programmers/llm/LlmParametersProgrammer.ts @@ -0,0 +1,90 @@ +import { + ILlmSchema, + IOpenApiSchemaError, + IResult, + OpenApi, + OpenApiTypeChecker, +} from "@samchon/openapi"; +import { LlmSchemaComposer } from "@samchon/openapi/lib/composers/LlmSchemaComposer"; + +import { MetadataFactory } from "../../factories/MetadataFactory"; + +import { Metadata } from "../../schemas/metadata/Metadata"; + +import { TransformerError } from "../../transformers/TransformerError"; + +import { IJsonSchemaCollection } from "../../module"; +import { JsonSchemasProgrammer } from "../json/JsonSchemasProgrammer"; +import { LlmSchemaProgrammer } from "./LlmSchemaProgrammer"; + +export namespace LlmParametersProgrammer { + export const write = (props: { + model: Model; + metadata: Metadata; + config?: Partial; + }): ILlmSchema.ModelParameters[Model] => { + const collection: IJsonSchemaCollection<"3.1"> = + JsonSchemasProgrammer.write({ + version: "3.1", + metadatas: [props.metadata], + }); + const schema: OpenApi.IJsonSchema.IObject = (() => { + const schema: OpenApi.IJsonSchema = collection.schemas[0]!; + if (OpenApiTypeChecker.isObject(schema)) return schema; + else if (OpenApiTypeChecker.isReference(schema)) { + const last = + collection.components.schemas?.[schema.$ref.split("/").pop()!]; + if (last && OpenApiTypeChecker.isObject(last)) return last; + } + throw new Error("Unreachable code. Failed to find the object schema."); + })(); + + const result: IResult< + ILlmSchema.ModelParameters[Model], + IOpenApiSchemaError + > = LlmSchemaComposer.parameters(props.model)({ + config: { + ...LlmSchemaComposer.defaultConfig(props.model), + ...props.config, + } as any, + components: collection.components, + schema, + }) as IResult; + if (result.success === false) + throw new TransformerError({ + code: "typia.llm.parameters", + message: + "failed to convert JSON schema to LLM schema.\n\n" + + result.error.reasons + .map((r) => ` - ${r.accessor}: ${r.message}`) + .join("\n"), + }); + return result.value; + }; + + export const validate = + (model: ILlmSchema.Model) => + (metadata: Metadata, explore: MetadataFactory.IExplore): string[] => { + const output: string[] = []; + if (explore.top === true) { + if (metadata.objects.length === 0) + output.push("LLM parameters must be an objec type."); + else if (metadata.objects.length !== 1 || metadata.size() > 1) + output.push("LLM parameters must be a single object type."); + else { + if ( + metadata.objects[0]!.type.properties.some( + (p) => p.key.isSoleLiteral() === false, + ) + ) + output.push("LLM parameters must not have dynamic keys."); + if (metadata.nullable) + output.push("LLM parameters must be a non-nullable object type."); + if (metadata.isRequired() === false) + output.push("LLM parameters must be a non-undefined object type."); + } + } + output.push(...LlmSchemaProgrammer.validate(model)(metadata)); + return output; + }; +} diff --git a/src/programmers/llm/LlmSchemaProgrammer.ts b/src/programmers/llm/LlmSchemaProgrammer.ts index 4742067ad8..6d97290169 100644 --- a/src/programmers/llm/LlmSchemaProgrammer.ts +++ b/src/programmers/llm/LlmSchemaProgrammer.ts @@ -1,58 +1,143 @@ -import { ILlmSchema } from "@samchon/openapi"; -import { HttpLlmConverter } from "@samchon/openapi/lib/converters/HttpLlmConverter"; +import { ILlmSchema, IOpenApiSchemaError, IResult } from "@samchon/openapi"; +import { LlmSchemaComposer } from "@samchon/openapi/lib/composers/LlmSchemaComposer"; +import { IJsonSchemaCollection } from "../../schemas/json/IJsonSchemaCollection"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { IJsonApplication } from "../../module"; +import { TransformerError } from "../../transformers/TransformerError"; + import { AtomicPredicator } from "../helpers/AtomicPredicator"; -import { JsonApplicationProgrammer } from "../json/JsonApplicationProgrammer"; +import { json_schema_bigint } from "../internal/json_schema_bigint"; +import { json_schema_boolean } from "../internal/json_schema_boolean"; +import { json_schema_native } from "../internal/json_schema_native"; +import { json_schema_number } from "../internal/json_schema_number"; +import { json_schema_string } from "../internal/json_schema_string"; +import { JsonSchemasProgrammer } from "../json/JsonSchemasProgrammer"; export namespace LlmSchemaProgrammer { - export const validate = (meta: Metadata): string[] => { - const output: string[] = []; - if ( - meta.atomics.some((a) => a.type === "bigint") || - meta.constants.some((c) => c.type === "bigint") - ) - output.push("LLM schema does not support bigint type."); - if ( - meta.tuples.some((t) => - t.type.elements.some((e) => e.isRequired() === false), - ) || - meta.arrays.some((a) => a.type.value.isRequired() === false) - ) - output.push("LLM schema does not support undefined type in array."); - if (meta.maps.length) output.push("LLM schema does not support Map type."); - if (meta.sets.length) output.push("LLM schema does not support Set type."); - for (const native of meta.natives) - if ( - AtomicPredicator.native(native) === false && - native !== "Date" && - native !== "Blob" && - 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."); - return output; - }; + export interface IOutput { + model: Model; + schema: ILlmSchema.ModelSchema[Model]; + $defs: Record; + } + + export const write = (props: { + model: Model; + metadata: Metadata; + config?: Partial; + }): IOutput => { + const collection: IJsonSchemaCollection<"3.1"> = + JsonSchemasProgrammer.write({ + version: "3.1", + metadatas: [props.metadata], + }); - 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; + const $defs: Record = {}; + const result: IResult = + LlmSchemaComposer.schema(props.model)({ + config: { + ...LlmSchemaComposer.defaultConfig(props.model), + ...props.config, + } as any, + components: collection.components, + schema: collection.schemas[0]!, + $defs: $defs as any, + }) as IResult; + if (result.success === false) + throw new TransformerError({ + code: "typia.llm.schema", + message: + "failed to convert JSON schema to LLM schema.\n\n" + + result.error.reasons + .map((r) => ` - ${r.accessor}: ${r.message}`) + .join("\n"), + }); + return { + model: props.model, + $defs, + schema: result.value, + }; }; + + export const validate = + (model: ILlmSchema.Model) => + (metadata: Metadata): string[] => { + const output: string[] = []; + if ( + metadata.atomics.some((a) => a.type === "bigint") || + metadata.constants.some((c) => c.type === "bigint") + ) + output.push("LLM schema does not support bigint type."); + if ( + (model === "chatgpt" || model === "gemini") && + metadata.objects.some((o) => + o.type.properties.some( + (p) => p.key.isSoleLiteral() === false && p.value.size() !== 0, + ), + ) + ) + output.push( + `LLM schema of "${model}" does not support dynamic property in object.`, + ); + if ( + metadata.tuples.some((t) => + t.type.elements.some((e) => e.isRequired() === false), + ) || + metadata.arrays.some((a) => a.type.value.isRequired() === false) + ) + output.push("LLM schema does not support undefined type in array."); + if (metadata.maps.length) + output.push("LLM schema does not support Map type."); + if (metadata.sets.length) + output.push("LLM schema does not support Set type."); + for (const native of metadata.natives) + if ( + AtomicPredicator.native(native.name) === false && + native.name !== "Date" && + native.name !== "Blob" && + native.name !== "File" + ) + output.push(`LLM schema does not support ${native.name} type.`); + if (model === "gemini" && size(metadata) > 1) + output.push("Gemini model does not support the union type."); + return output; + }; } + +const size = (metadata: Metadata): number => + (metadata.escaped ? size(metadata.escaped.returns) : 0) + + metadata.aliases.length + + metadata.objects.length + + metadata.arrays.length + + metadata.tuples.length + + (metadata.maps.length ? 1 : 0) + + (metadata.sets.length ? 1 : 0) + + metadata.atomics + .map((a) => + a.type === "boolean" + ? json_schema_boolean(a).length + : a.type === "bigint" + ? json_schema_bigint(a).length + : a.type === "number" + ? json_schema_number(a).length + : json_schema_string(a).length, + ) + .reduce((a, b) => a + b, 0) + + metadata.constants.filter( + (c) => metadata.atomics.some((a) => a.type === c.type) === false, + ).length + + metadata.templates.length + + metadata.natives + .filter( + (n) => + metadata.atomics.some((a) => a.type === n.name) === false && + metadata.constants.some((c) => c.type === n.name) === false, + ) + .map( + (n) => + json_schema_native({ + components: {}, + native: n, + }).length, + ) + .reduce((a, b) => a + b, 0); diff --git a/src/programmers/misc/MiscAssertCloneProgrammer.ts b/src/programmers/misc/MiscAssertCloneProgrammer.ts index 6d98bd7a17..1cbda240f8 100644 --- a/src/programmers/misc/MiscAssertCloneProgrammer.ts +++ b/src/programmers/misc/MiscAssertCloneProgrammer.ts @@ -4,25 +4,28 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { MiscCloneProgrammer } from "./MiscCloneProgrammer"; export namespace MiscAssertCloneProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const clone: FeatureProgrammer.IDecomposed = MiscCloneProgrammer.decompose({ ...props, @@ -36,15 +39,24 @@ export namespace MiscAssertCloneProgrammer { statements: [ ...assert.statements, ...clone.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__clone", clone.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__clone", + value: clone.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], clone.arrow.type, undefined, @@ -66,22 +78,18 @@ export namespace MiscAssertCloneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/misc/MiscAssertPruneProgrammer.ts b/src/programmers/misc/MiscAssertPruneProgrammer.ts index 9fc2c130f9..dc686b3509 100644 --- a/src/programmers/misc/MiscAssertPruneProgrammer.ts +++ b/src/programmers/misc/MiscAssertPruneProgrammer.ts @@ -4,25 +4,28 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { MiscPruneProgrammer } from "./MiscPruneProgrammer"; export namespace MiscAssertPruneProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const prune: FeatureProgrammer.IDecomposed = MiscPruneProgrammer.decompose({ ...props, @@ -36,19 +39,31 @@ export namespace MiscAssertPruneProgrammer { statements: [ ...assert.statements, ...prune.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__prune", prune.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__prune", + value: prune.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), undefined, ts.factory.createBlock( @@ -84,22 +99,18 @@ export namespace MiscAssertPruneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/misc/MiscCloneProgrammer.ts b/src/programmers/misc/MiscCloneProgrammer.ts index b17abebdab..c5bbd67450 100644 --- a/src/programmers/misc/MiscCloneProgrammer.ts +++ b/src/programmers/misc/MiscCloneProgrammer.ts @@ -9,16 +9,20 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; +import { MetadataMap } from "../../schemas/metadata/MetadataMap"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; +import { MetadataSet } from "../../schemas/metadata/MetadataSet"; import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../../schemas/metadata/MetadataTupleType"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; import { CloneJoiner } from "../helpers/CloneJoiner"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { UnionExplorer } from "../helpers/UnionExplorer"; import { decode_union_object } from "../internal/decode_union_object"; import { postfix_of_tuple } from "../internal/postfix_of_tuple"; @@ -27,17 +31,19 @@ import { wrap_metadata_rest_tuple } from "../internal/wrap_metadata_rest_tuple"; export namespace MiscCloneProgrammer { export const decompose = (props: { validated: boolean; - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { - const config = configure(props.project)(props.importer); + const config: FeatureProgrammer.IConfig = configure(props); if (props.validated === false) config.addition = (collection) => - IsProgrammer.write_function_statements(props.project)(props.importer)( + IsProgrammer.write_function_statements({ + context: props.context, + functor: props.functor, collection, - ); + }); const composed: FeatureProgrammer.IComposed = FeatureProgrammer.compose({ ...props, config, @@ -56,467 +62,553 @@ export namespace MiscCloneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - validated: false, - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + validated: false, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - const write_array_functions = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .arrays() - .filter((a) => a.recursive) - .map((type, i) => - StatementFactory.constant( - `${config.prefix}a${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_array_inline(config)(importer)( - ts.factory.createIdentifier("input"), - MetadataArray.create({ - type, - tags: [], - }), - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_array_functions = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .arrays() + .filter((a) => a.recursive) + .map((type, i) => + StatementFactory.constant({ + name: `${props.config.prefix}a${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_array_inline({ + config: props.config, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + array: MetadataArray.create({ + type, + tags: [], + }), + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); - const write_tuple_functions = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .tuples() - .filter((t) => t.recursive) - .map((tuple, i) => - StatementFactory.constant( - `${config.prefix}t${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_tuple_inline(project)(config)(importer)( - ts.factory.createIdentifier("input"), - tuple, - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_tuple_functions = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .tuples() + .filter((t) => t.recursive) + .map((tuple, i) => + StatementFactory.constant({ + name: `${props.config.prefix}t${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_tuple_inline({ + config: props.config, + context: props.context, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + tuple, + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - const decode = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - // ANY TYPE - if ( - meta.any || - meta.arrays.some((a) => a.type.value.any) || - meta.tuples.some( - (t) => - !!t.type.elements.length && t.type.elements.every((e) => e.any), - ) + const decode = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + // ANY TYPE + if ( + props.metadata.any || + props.metadata.arrays.some((a) => a.type.value.any) || + props.metadata.tuples.some( + (t) => !!t.type.elements.length && t.type.elements.every((e) => e.any), ) - return ts.factory.createCallExpression(importer.use("any"), undefined, [ - input, - ]); - - interface IUnion { - type: string; - is: () => ts.Expression; - value: () => ts.Expression; - } - const unions: IUnion[] = []; - - //---- - // LIST UP UNION TYPES - //---- - // FUNCTIONAL - if (meta.functions.length) - unions.push({ - type: "functional", - is: () => - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("function"), - ts.factory.createTypeOfExpression(input), - ), - value: () => ts.factory.createIdentifier("undefined"), - }); + ) + return ts.factory.createCallExpression( + props.context.importer.internal("miscCloneAny"), + undefined, + [props.input], + ); - // TUPLES - for (const tuple of meta.tuples) - unions.push({ - type: "tuple", - is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { - const partial = Metadata.initialize(); - partial.tuples.push(tuple); - return partial; - })(), - explore, - ), - value: () => - decode_tuple(project)(config)(importer)(input, tuple, explore), - }); + interface IUnion { + type: string; + is: () => ts.Expression; + value: () => ts.Expression; + } + const unions: IUnion[] = []; + + //---- + // LIST UP UNION TYPES + //---- + // FUNCTIONAL + if (props.metadata.functions.length) + unions.push({ + type: "functional", + is: () => + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("function"), + ts.factory.createTypeOfExpression(props.input), + ), + value: () => ts.factory.createIdentifier("undefined"), + }); + + // TUPLES + for (const tuple of props.metadata.tuples) + unions.push({ + type: "tuple", + is: () => + IsProgrammer.decode({ + ...props, + metadata: (() => { + const partial = Metadata.initialize(); + partial.tuples.push(tuple); + return partial; + })(), + }), + value: () => + decode_tuple({ + ...props, + tuple, + }), + }); - // ARRAYS - if (meta.arrays.length) - unions.push({ - type: "array", - is: () => ExpressionFactory.isArray(input), - value: () => - explore_arrays(project)(config)(importer)(input, meta.arrays, { - ...explore, + // ARRAYS + if (props.metadata.arrays.length) + unions.push({ + type: "array", + is: () => ExpressionFactory.isArray(props.input), + value: () => + explore_arrays({ + ...props, + arrays: props.metadata.arrays, + explore: { + ...props.explore, from: "array", - }), - }); + }, + }), + }); - // NATIVE TYPES - if (meta.sets.length) - unions.push({ - type: "set", - is: () => ExpressionFactory.isInstanceOf("Set")(input), - value: () => - explore_sets(project)(config)(importer)(input, meta.sets, { - ...explore, + // NATIVE TYPES + if (props.metadata.sets.length) + unions.push({ + type: "set", + is: () => ExpressionFactory.isInstanceOf("Set", props.input), + value: () => + explore_sets({ + ...props, + sets: props.metadata.sets, + explore: { + ...props.explore, from: "array", - }), - }); - if (meta.maps.length) - unions.push({ - type: "map", - is: () => ExpressionFactory.isInstanceOf("Map")(input), - value: () => - explore_maps(project)(config)(importer)(input, meta.maps, { - ...explore, + }, + }), + }); + if (props.metadata.maps.length) + unions.push({ + type: "map", + is: () => ExpressionFactory.isInstanceOf("Map", props.input), + value: () => + explore_maps({ + ...props, + maps: props.metadata.maps, + explore: { + ...props.explore, from: "array", - }), - }); - for (const native of meta.natives) - unions.push({ - type: "native", - is: () => ExpressionFactory.isInstanceOf(native)(input), - value: () => - native === "Boolean" || native === "Number" || native === "String" - ? ts.factory.createCallExpression( - IdentifierFactory.access(input)("valueOf"), - undefined, - undefined, - ) - : decode_native(native)(input), - }); - - // OBJECTS - if (meta.objects.length) - unions.push({ - type: "object", - is: () => - ExpressionFactory.isObject({ - checkNull: true, - checkArray: false, - })(input), - value: () => - explore_objects(config)(importer)(input, meta, { - ...explore, - from: "object", - }), - }); - - // COMPOSITION - if (unions.length === 0) return input; - else if (unions.length === 1 && meta.size() === 1) { - const value: ts.Expression = - (meta.nullable || meta.isRequired() === false) && is_instance(meta) - ? ts.factory.createConditionalExpression( - input, + }, + }), + }); + for (const native of props.metadata.natives) + unions.push({ + type: "native", + is: () => ExpressionFactory.isInstanceOf(native.name, props.input), + value: () => + native.name === "Boolean" || + native.name === "Number" || + native.name === "String" + ? ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "valueOf"), undefined, - unions[0]!.value(), undefined, - input, ) - : unions[0]!.value(); - return ts.factory.createAsExpression(value, TypeFactory.keyword("any")); - } else { - let last: ts.Expression = input; - for (const u of unions.reverse()) - last = ts.factory.createConditionalExpression( - u.is(), - undefined, - u.value(), - undefined, - last, - ); - return ts.factory.createAsExpression(last, TypeFactory.keyword("any")); - } - }; + : decode_native({ + type: native.name, + input: props.input, + }), + }); + + // OBJECTS + if (props.metadata.objects.length) + unions.push({ + type: "object", + is: () => + ExpressionFactory.isObject({ + checkNull: true, + checkArray: false, + input: props.input, + }), + value: () => + explore_objects({ + ...props, + explore: { + ...props.explore, + from: "object", + }, + }), + }); - const decode_object = (importer: FunctionImporter) => + // COMPOSITION + if (unions.length === 0) return props.input; + else if (unions.length === 1 && props.metadata.size() === 1) { + const value: ts.Expression = + (props.metadata.nullable || props.metadata.isRequired() === false) && + is_instance(props.metadata) + ? ts.factory.createConditionalExpression( + props.input, + undefined, + unions[0]!.value(), + undefined, + props.input, + ) + : unions[0]!.value(); + return ts.factory.createAsExpression(value, TypeFactory.keyword("any")); + } else { + let last: ts.Expression = props.input; + for (const u of unions.reverse()) + last = ts.factory.createConditionalExpression( + u.is(), + undefined, + u.value(), + undefined, + last, + ); + return ts.factory.createAsExpression(last, TypeFactory.keyword("any")); + } + }; + + const decode_object = (props: { + functor: FunctionProgrammer; + input: ts.Expression; + object: MetadataObjectType; + explore: FeatureProgrammer.IExplore; + }) => FeatureProgrammer.decode_object({ - trace: false, - path: false, - prefix: PREFIX, - })(importer); - - const decode_array = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - array.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}a${array.type.index}`), - ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, - source: "function", - from: "array", - })(input), - ) - : decode_array_inline(config)(importer)(input, array, explore); - - const decode_array_inline = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - FeatureProgrammer.decode_array(config)(importer)(CloneJoiner.array)( - input, - array, - explore, - ); + config: { + trace: false, + path: false, + prefix: PREFIX, + }, + functor: props.functor, + input: props.input, + object: props.object, + explore: props.explore, + }); - const decode_tuple = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTuple, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - tuple.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}t${tuple.type.index}`), + const decode_array = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + props.array.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}a${props.array.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, source: "function", - })(input), - ) - : decode_tuple_inline(project)(config)(importer)( - input, - tuple.type, - explore, - ); - - const decode_tuple_inline = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTupleType, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const children: ts.Expression[] = tuple.elements - .filter((m) => m.rest === null) - .map((elem, index) => - decode(project)(config)(importer)( - ts.factory.createElementAccessExpression(input, index), - elem, - { - ...explore, from: "array", - postfix: explore.postfix.length - ? `${postfix_of_tuple(explore.postfix)}[${index}]"` - : `"[${index}]"`, }, - ), - ); - const rest = (() => { - if (tuple.elements.length === 0) return null; + input: props.input, + }), + ) + : decode_array_inline(props); - const last: Metadata = tuple.elements.at(-1)!; - const rest: Metadata | null = last.rest; - if (rest === null) return null; + const decode_array_inline = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + FeatureProgrammer.decode_array({ + config: props.config, + functor: props.functor, + combiner: CloneJoiner.array, + array: props.array, + input: props.input, + explore: props.explore, + }); - return decode(project)(config)(importer)( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("slice"), - undefined, - [ExpressionFactory.number(tuple.elements.length - 1)], + const decode_tuple = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + tuple: MetadataTuple; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + props.tuple.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}t${props.tuple.type.index}`, + ), ), - wrap_metadata_rest_tuple(tuple.elements.at(-1)!.rest!), - { - ...explore, - start: tuple.elements.length - 1, + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, + source: "function", + }, + input: props.input, + }), + ) + : decode_tuple_inline({ + ...props, + tuple: props.tuple.type, + }); + + const decode_tuple_inline = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + tuple: MetadataTupleType; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + const elements: ts.Expression[] = props.tuple.elements + .filter((m) => m.rest === null) + .map((elem, index) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createElementAccessExpression(props.input, index), + metadata: elem, + explore: { + ...props.explore, + from: "array", + postfix: props.explore.postfix.length + ? `${postfix_of_tuple(props.explore.postfix)}[${index}]"` + : `"[${index}]"`, }, - ); - })(); - return CloneJoiner.tuple(children, rest); - }; + }), + ); + const rest = (() => { + if (props.tuple.elements.length === 0) return null; + + const last: Metadata = props.tuple.elements.at(-1)!; + const rest: Metadata | null = last.rest; + if (rest === null) return null; + + return decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "slice"), + undefined, + [ExpressionFactory.number(props.tuple.elements.length - 1)], + ), + metadata: wrap_metadata_rest_tuple(props.tuple.elements.at(-1)!.rest!), + explore: { + ...props.explore, + start: props.tuple.elements.length - 1, + }, + }); + })(); + return CloneJoiner.tuple({ + elements, + rest, + }); + }; /* ----------------------------------------------------------- NATIVE CLASSES ----------------------------------------------------------- */ - const decode_native = (type: string) => (input: ts.Expression) => - type === "Date" || - type === "Uint8Array" || - type === "Uint8ClampedArray" || - type === "Uint16Array" || - type === "Uint32Array" || - type === "BigUint64Array" || - type === "Int8Array" || - type === "Int16Array" || - type === "Int32Array" || - type === "BigInt64Array" || - type === "Float32Array" || - type === "Float64Array" || - type === "RegExp" - ? decode_native_copyable(type)(input) - : type === "ArrayBuffer" || type === "SharedArrayBuffer" - ? decode_native_buffer(type)(input) - : type === "DataView" - ? decode_native_data_view(input) + const decode_native = (props: { type: string; input: ts.Expression }) => + props.type === "Date" || + props.type === "Uint8Array" || + props.type === "Uint8ClampedArray" || + props.type === "Uint16Array" || + props.type === "Uint32Array" || + props.type === "BigUint64Array" || + props.type === "Int8Array" || + props.type === "Int16Array" || + props.type === "Int32Array" || + props.type === "BigInt64Array" || + props.type === "Float32Array" || + props.type === "Float64Array" || + props.type === "RegExp" + ? decode_native_copyable(props) + : props.type === "ArrayBuffer" || props.type === "SharedArrayBuffer" + ? decode_native_buffer({ + type: props.type, + input: props.input, + }) + : props.type === "DataView" + ? decode_native_data_view(props.input) : ts.factory.createCallExpression( - ts.factory.createIdentifier(type), + ts.factory.createIdentifier(props.type), undefined, [], ); - const decode_native_copyable = (type: string) => (input: ts.Expression) => + const decode_native_copyable = (props: { + type: string; + input: ts.Expression; + }) => ts.factory.createNewExpression( - ts.factory.createIdentifier(type), + ts.factory.createIdentifier(props.type), undefined, - [input], + [props.input], ); - const decode_native_buffer = - (type: "ArrayBuffer" | "SharedArrayBuffer") => (input: ts.Expression) => - ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - StatementFactory.constant( - "buffer", - ts.factory.createNewExpression( - ts.factory.createIdentifier(type), - undefined, - [IdentifierFactory.access(input)("byteLength")], - ), + const decode_native_buffer = (props: { + type: "ArrayBuffer" | "SharedArrayBuffer"; + input: ts.Expression; + }) => + ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + StatementFactory.constant({ + name: "buffer", + value: ts.factory.createNewExpression( + ts.factory.createIdentifier(props.type), + undefined, + [IdentifierFactory.access(props.input, "byteLength")], ), - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access( - ts.factory.createNewExpression( - ts.factory.createIdentifier("Uint8Array"), - undefined, - [ts.factory.createIdentifier("buffer")], - ), - )("set"), - undefined, - [ - ts.factory.createNewExpression( - ts.factory.createIdentifier("Uint8Array"), - undefined, - [input], - ), - ], + }), + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createNewExpression( + ts.factory.createIdentifier("Uint8Array"), + undefined, + [ts.factory.createIdentifier("buffer")], + ), + "set", ), + undefined, + [ + ts.factory.createNewExpression( + ts.factory.createIdentifier("Uint8Array"), + undefined, + [props.input], + ), + ], ), - ts.factory.createReturnStatement( - ts.factory.createIdentifier("buffer"), - ), - ], - true, - ), - ); + ), + ts.factory.createReturnStatement( + ts.factory.createIdentifier("buffer"), + ), + ], + true, + ), + ); const decode_native_data_view = (input: ts.Expression) => ts.factory.createNewExpression( ts.factory.createIdentifier("DataView"), undefined, - [IdentifierFactory.access(input)("buffer")], + [IdentifierFactory.access(input, "buffer")], ); /* ----------------------------------------------------------- EXPLORERS FOR UNION TYPES ----------------------------------------------------------- */ - const explore_sets = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - sets: Metadata[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - ts.factory.createCallExpression( - UnionExplorer.set({ - checker: IsProgrammer.decode(project)(importer), - decoder: (input, array, explore) => + const explore_sets = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + sets: MetadataSet[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + ts.factory.createCallExpression( + UnionExplorer.set({ + config: { + checker: (v) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: v.input, + metadata: v.definition, + explore: v.explore, + }), + decoder: (v) => ts.factory.createNewExpression( ts.factory.createIdentifier("Set"), [TypeFactory.keyword("any")], - [decode_array(config)(importer)(input, array, explore)], + [ + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + ], ), empty: ts.factory.createNewExpression( ts.factory.createIdentifier("Set"), @@ -524,42 +616,70 @@ export namespace MiscCloneProgrammer { [], ), success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - })([])(input, sets, explore), - undefined, - undefined, - ); + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: [], + input: props.input, + sets: props.sets, + explore: props.explore, + }), + undefined, + undefined, + ); - const explore_maps = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - maps: Metadata.Entry[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - ts.factory.createCallExpression( - UnionExplorer.map({ - checker: (top, entry, explore) => { - const func = IsProgrammer.decode(project)(importer); - return ts.factory.createLogicalAnd( - func(ts.factory.createElementAccessExpression(top, 0), entry[0], { - ...explore, - postfix: `${explore.postfix}[0]`, + const explore_maps = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + maps: MetadataMap[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + ts.factory.createCallExpression( + UnionExplorer.map({ + config: { + checker: (v) => + ts.factory.createLogicalAnd( + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: ts.factory.createElementAccessExpression(v.input, 0), + metadata: v.definition[0], + explore: { + ...v.explore, + postfix: `${v.explore.postfix}[0]`, + }, }), - func(ts.factory.createElementAccessExpression(top, 1), entry[1], { - ...explore, - postfix: `${explore.postfix}[1]`, + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: ts.factory.createElementAccessExpression(v.input, 1), + metadata: v.definition[1], + explore: { + ...v.explore, + postfix: `${v.explore.postfix}[1]`, + }, }), - ); - }, - decoder: (input, array, explore) => + ), + decoder: (v) => ts.factory.createNewExpression( ts.factory.createIdentifier("Map"), [TypeFactory.keyword("any"), TypeFactory.keyword("any")], - [decode_array(config)(importer)(input, array, explore)], + [ + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + ], ), empty: ts.factory.createNewExpression( ts.factory.createIdentifier("Map"), @@ -567,215 +687,346 @@ export namespace MiscCloneProgrammer { [], ), success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - })([])(input, maps, explore), - undefined, - undefined, - ); + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: [], + input: props.input, + maps: props.maps, + explore: props.explore, + }), + // ([])(props.input, props.maps, props.explore), + undefined, + undefined, + ); - const explore_objects = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ) => - meta.objects.length === 1 - ? decode_object(importer)(input, meta.objects[0]!, explore) - : ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${PREFIX}u${meta.union_index!}`), - ), - undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), - ); - - const explore_arrays = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - elements: MetadataArray[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( - UnionExplorer.array({ - checker: IsProgrammer.decode(project)(importer), - decoder: decode_array(config)(importer), - empty: ts.factory.createIdentifier("[]"), - success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - }), - )(input, elements, explore); - - const explore_array_like_union_types = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - factory: ( - parameters: ts.ParameterDeclaration[], - ) => ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ) => ts.ArrowFunction, - ) => - ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const arrow = - (parameters: ts.ParameterDeclaration[]) => - (explore: FeatureProgrammer.IExplore) => - (input: ts.Expression): ts.ArrowFunction => - factory(parameters)(input, elements, explore); - if (elements.every((e) => e.type.recursive === false)) - ts.factory.createCallExpression( - arrow([])(explore)(input), + const explore_objects = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }) => + props.metadata.objects.length === 1 + ? decode_object({ + ...props, + object: props.metadata.objects[0]!.type, + }) + : ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(`${PREFIX}u${props.metadata.union_index!}`), + ), undefined, - [], + FeatureProgrammer.argumentsArray(props), ); - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.emplaceUnion( - config.prefix, - elements.map((e) => e.type.name).join(" | "), - () => - arrow( - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - )({ - ...explore, - postfix: "", - })(ts.factory.createIdentifier("input")), - ), - ), + const explore_arrays = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + arrays: MetadataArray[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + explore_array_like_union_types({ + ...props, + definitions: props.arrays, + factory: (next) => + UnionExplorer.array({ + config: { + checker: (v) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: v.input, + metadata: v.definition, + explore: v.explore, + }), + decoder: (v) => + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + empty: ts.factory.createIdentifier("[]"), + success: ts.factory.createTrue(), + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: next.parameters, + arrays: next.definitions, + input: next.input, + explore: next.explore, + }), + }); + + const explore_array_like_union_types = < + T extends MetadataArray | MetadataTuple, + >(props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + factory: (next: { + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + definitions: T[]; + explore: FeatureProgrammer.IExplore; + }) => ts.ArrowFunction; + input: ts.Expression; + definitions: T[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + const arrow = (next: { + parameters: ts.ParameterDeclaration[]; + explore: FeatureProgrammer.IExplore; + input: ts.Expression; + }): ts.ArrowFunction => + props.factory({ + definitions: props.definitions, + parameters: next.parameters, + input: next.input, + explore: next.explore, + }); + if (props.definitions.every((e) => e.type.recursive === false)) + ts.factory.createCallExpression( + arrow({ + parameters: [], + explore: props.explore, + input: props.input, + }), undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), + [], ); + + const arrayExplore: FeatureProgrammer.IExplore = { + ...props.explore, + source: "function", + from: "array", }; + return ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.emplaceUnion( + props.config.prefix, + props.definitions.map((e) => e.type.name).join(" | "), + () => + arrow({ + parameters: FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + explore: { + ...arrayExplore, + postfix: "", + }, + input: ts.factory.createIdentifier("input"), + }), + ), + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + input: props.input, + explore: arrayExplore, + }), + ); + }; /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$c"; - - const configure = - (project: IProject) => - (importer: FunctionImporter): FeatureProgrammer.IConfig => { - const config: FeatureProgrammer.IConfig = { - types: { - input: (type, name) => - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), - ), - output: (type, name) => - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Resolved"), - [ - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), - ), - ], - false, - ), - }, - prefix: PREFIX, - trace: false, - path: false, - initializer, - decoder: () => decode(project)(config)(importer), - objector: { - checker: () => IsProgrammer.decode(project)(importer), - decoder: () => decode_object(importer), - joiner: CloneJoiner.object, - unionizer: decode_union_object( - IsProgrammer.decode_object(project)(importer), - )(decode_object(importer))((exp) => exp)((input, expected) => - create_throw_error(importer)(expected)(input), + const PREFIX = "_c"; + + const configure = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + }): FeatureProgrammer.IConfig => { + const config: FeatureProgrammer.IConfig = { + types: { + input: (type, name) => + ts.factory.createTypeReferenceNode( + name ?? + TypeFactory.getFullName({ checker: props.context.checker, type }), ), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - }, - generator: { - arrays: () => write_array_functions(config)(importer), - tuples: () => write_tuple_functions(project)(config)(importer), - }, - }; - return config; + output: (type, name) => + props.context.importer.type({ + file: "typia", + name: "Resolved", + arguments: [ + ts.factory.createTypeReferenceNode( + name ?? + TypeFactory.getFullName({ + checker: props.context.checker, + type, + }), + ), + ], + }), + }, + prefix: PREFIX, + trace: false, + path: false, + initializer, + decoder: (next) => + decode({ + context: props.context, + functor: props.functor, + config, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + objector: { + checker: (next) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + decoder: (next) => + decode_object({ + functor: props.functor, + input: next.input, + object: next.object, + explore: next.explore, + }), + joiner: CloneJoiner.object, + unionizer: (next) => + decode_union_object({ + checker: (v) => + IsProgrammer.decode_object({ + context: props.context, + functor: props.functor, + input: v.input, + object: v.object, + explore: v.explore, + }), + decoder: (v) => + decode_object({ + functor: props.functor, + input: v.input, + object: v.object, + explore: v.explore, + }), + success: (exp) => exp, + escaper: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + input: next.input, + objects: next.objects, + explore: next.explore, + }), + failure: (next) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: next.expected, + input: next.input, + }), + }, + generator: { + arrays: (collection) => + write_array_functions({ + functor: props.functor, + config, + collection, + }), + tuples: (collection) => + write_tuple_functions({ + context: props.context, + functor: props.functor, + config, + collection, + }), + }, }; + return config; + }; - const initializer: FeatureProgrammer.IConfig["initializer"] = - (project) => (importer) => (type) => { - const collection = new MetadataCollection(); - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ + const initializer: FeatureProgrammer.IConfig["initializer"] = (props) => { + const collection = new MetadataCollection(); + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: false, constant: true, absorb: true, - validate: (meta) => { + validate: (metadata) => { const output: string[] = []; - if (meta.natives.some((n) => n === "WeakSet")) + if (metadata.natives.some((native) => native.name === "WeakSet")) output.push("unable to clone WeakSet"); - else if (meta.natives.some((n) => n === "WeakMap")) + else if (metadata.natives.some((native) => native.name === "WeakMap")) output.push("unable to clone WeakMap"); return output; }, - })(collection)(type); - if (result.success === false) - throw TransformerError.from(`typia.misc.${importer.method}`)( - result.errors, - ); - return [collection, result.data]; + }, + collection, + type: props.type, + }); + if (result.success === false) + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); + return { + collection, + metadata: result.data, }; + }; - const create_throw_error = - (importer: FunctionImporter) => - (expected: string) => - (value: ts.Expression) => - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - importer.use("throws"), - [], - [ - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "expected", - ts.factory.createStringLiteral(expected), - ), - ts.factory.createPropertyAssignment("value", value), - ], - true, - ), - ], - ), - ); + const create_throw_error = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + expected: string; + input: ts.Expression; + }) => + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + props.context.importer.internal("throwTypeGuardError"), + [], + [ + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "method", + ts.factory.createStringLiteral(props.functor.method), + ), + ts.factory.createPropertyAssignment( + "expected", + ts.factory.createStringLiteral(props.expected), + ), + ts.factory.createPropertyAssignment("value", props.input), + ], + true, + ), + ], + ), + ); - const is_instance = (meta: Metadata): boolean => - !!meta.objects.length || - !!meta.arrays.length || - !!meta.tuples.length || - !!meta.sets.length || - !!meta.maps.length || - !!meta.natives.length || - (meta.rest !== null && is_instance(meta.rest)); + const is_instance = (metadata: Metadata): boolean => + !!metadata.objects.length || + !!metadata.arrays.length || + !!metadata.tuples.length || + !!metadata.sets.length || + !!metadata.maps.length || + !!metadata.natives.length || + (metadata.rest !== null && is_instance(metadata.rest)); } diff --git a/src/programmers/misc/MiscIsCloneProgrammer.ts b/src/programmers/misc/MiscIsCloneProgrammer.ts index 50f4f9a231..a04ab14651 100644 --- a/src/programmers/misc/MiscIsCloneProgrammer.ts +++ b/src/programmers/misc/MiscIsCloneProgrammer.ts @@ -4,23 +4,26 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { MiscCloneProgrammer } from "./MiscCloneProgrammer"; export namespace MiscIsCloneProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - equals: false, + config: { + equals: false, + }, }); const clone: FeatureProgrammer.IDecomposed = MiscCloneProgrammer.decompose({ ...props, @@ -34,8 +37,14 @@ export namespace MiscIsCloneProgrammer { statements: [ ...is.statements, ...clone.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__clone", clone.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__clone", + value: clone.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -73,21 +82,18 @@ export namespace MiscIsCloneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/misc/MiscIsPruneProgrammer.ts b/src/programmers/misc/MiscIsPruneProgrammer.ts index 605832075b..6decc43b44 100644 --- a/src/programmers/misc/MiscIsPruneProgrammer.ts +++ b/src/programmers/misc/MiscIsPruneProgrammer.ts @@ -4,23 +4,26 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { MiscPruneProgrammer } from "./MiscPruneProgrammer"; export namespace MiscIsPruneProgrammer { export const decompose = (props: { - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - equals: false, + config: { + equals: false, + }, }); const prune: FeatureProgrammer.IDecomposed = MiscPruneProgrammer.decompose({ ...props, @@ -34,8 +37,14 @@ export namespace MiscIsPruneProgrammer { statements: [ ...is.statements, ...prune.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__prune", prune.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__prune", + value: prune.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -71,21 +80,18 @@ export namespace MiscIsPruneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/misc/MiscLiteralsProgrammer.ts b/src/programmers/misc/MiscLiteralsProgrammer.ts index 61d1cc2201..5d6aef0ae9 100644 --- a/src/programmers/misc/MiscLiteralsProgrammer.ts +++ b/src/programmers/misc/MiscLiteralsProgrammer.ts @@ -6,41 +6,51 @@ import { MetadataFactory } from "../../factories/MetadataFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { Atomic } from "../../typings/Atomic"; export namespace MiscLiteralsProgrammer { - export const write = (project: IProject) => (type: ts.Type) => { - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ - escape: true, - constant: true, - absorb: true, - validate: (meta) => { - const length: number = - meta.constants - .map((c) => c.values.length) - .reduce((a, b) => a + b, 0) + - meta.atomics.filter((a) => a.type === "boolean").length; - if (0 === length) return [ErrorMessages.NO]; - else if (meta.size() !== length) return [ErrorMessages.ONLY]; - return []; + export interface IProps { + context: ITypiaContext; + type: ts.Type; + } + export const write = (props: IProps) => { + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: true, + constant: true, + absorb: true, + validate: (meta) => { + const length: number = + meta.constants + .map((c) => c.values.length) + .reduce((a, b) => a + b, 0) + + meta.atomics.filter((a) => a.type === "boolean").length; + if (0 === length) return [ErrorMessages.NO]; + else if (meta.size() !== length) return [ErrorMessages.ONLY]; + return []; + }, }, - })(new MetadataCollection())(type); + collection: new MetadataCollection(), + type: props.type, + }); if (result.success === false) - throw TransformerError.from(`typia.misc.literals`)(result.errors); + throw TransformerError.from({ + code: `typia.misc.literals`, + errors: result.errors, + }); - const meta: Metadata = result.data; + const metadata: Metadata = result.data; const values: Set = new Set([ - ...meta.constants.map((c) => c.values.map((v) => v.value)).flat(), - ...(meta.atomics.filter((a) => a.type === "boolean").length + ...metadata.constants.map((c) => c.values.map((v) => v.value)).flat(), + ...(metadata.atomics.filter((a) => a.type === "boolean").length ? [true, false] : []), - ...(meta.nullable ? [null] : []), + ...(metadata.nullable ? [null] : []), ]); return ts.factory.createAsExpression( ts.factory.createArrayLiteralExpression( diff --git a/src/programmers/misc/MiscPruneProgrammer.ts b/src/programmers/misc/MiscPruneProgrammer.ts index fc4b59469d..a902280567 100644 --- a/src/programmers/misc/MiscPruneProgrammer.ts +++ b/src/programmers/misc/MiscPruneProgrammer.ts @@ -9,15 +9,17 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../../schemas/metadata/MetadataTupleType"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { PruneJoiner } from "../helpers/PruneJoiner"; import { UnionExplorer } from "../helpers/UnionExplorer"; import { decode_union_object } from "../internal/decode_union_object"; @@ -27,17 +29,19 @@ import { wrap_metadata_rest_tuple } from "../internal/wrap_metadata_rest_tuple"; export namespace MiscPruneProgrammer { export const decompose = (props: { validated: boolean; - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { - const config = configure(props.project)(props.importer); + const config = configure(props); if (props.validated === false) config.addition = (collection) => - IsProgrammer.write_function_statements(props.project)(props.importer)( + IsProgrammer.write_function_statements({ + context: props.context, + functor: props.functor, collection, - ); + }); const composed: FeatureProgrammer.IComposed = FeatureProgrammer.compose({ ...props, config, @@ -56,505 +60,669 @@ export namespace MiscPruneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - validated: false, - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + validated: false, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - const write_array_functions = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .arrays() - .filter((a) => a.recursive) - .map((type, i) => - StatementFactory.constant( - `${config.prefix}a${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_array_inline(config)(importer)( - ts.factory.createIdentifier("input"), - MetadataArray.create({ - type, - tags: [], - }), - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_array_functions = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .arrays() + .filter((a) => a.recursive) + .map((type, i) => + StatementFactory.constant({ + name: `${props.config.prefix}a${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_array_inline({ + config: props.config, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + array: MetadataArray.create({ + type, + tags: [], + }), + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); - - const write_tuple_functions = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .tuples() - .filter((t) => t.recursive) - .map((tuple, i) => - StatementFactory.constant( - `${config.prefix}t${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_tuple_inline(project)(config)(importer)( - ts.factory.createIdentifier("input"), - tuple, - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + }), + ); + + const write_tuple_functions = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .tuples() + .filter((t) => t.recursive) + .map((tuple, i) => + StatementFactory.constant({ + name: `${props.config.prefix}t${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_tuple_inline({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + tuple, + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - const decode = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ts.ConciseBody => { - if (filter(meta) === false) return ts.factory.createBlock([]); - - interface IUnion { - type: string; - is: () => ts.Expression; - value: () => ts.Expression | ts.Block | ts.ReturnStatement; - } - const unions: IUnion[] = []; - - //---- - // LIST UP UNION TYPES - //---- - // TUPLES - for (const tuple of meta.tuples.filter((tuple) => - tuple.type.elements.some((e) => filter(e.rest ?? e)), - )) - unions.push({ - type: "tuple", - is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { - const partial = Metadata.initialize(); - partial.tuples.push(tuple); - return partial; - })(), - explore, - ), - value: () => - decode_tuple(project)(config)(importer)(input, tuple, explore), - }); + const decode = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }): ts.ConciseBody => { + if (filter(props.metadata) === false) return ts.factory.createBlock([]); + + interface IUnion { + type: string; + is: () => ts.Expression; + value: () => ts.Expression | ts.Block | ts.ReturnStatement; + } + const unions: IUnion[] = []; + + //---- + // LIST UP UNION TYPES + //---- + // TUPLES + for (const tuple of props.metadata.tuples.filter((tuple) => + tuple.type.elements.some((e) => filter(e.rest ?? e)), + )) + unions.push({ + type: "tuple", + is: () => + IsProgrammer.decode({ + ...props, + metadata: (() => { + const partial = Metadata.initialize(); + partial.tuples.push(tuple); + return partial; + })(), + }), + value: () => + decode_tuple({ + ...props, + tuple, + }), + }); - // ARRAYS - if (meta.arrays.filter((a) => filter(a.type.value)).length) - unions.push({ - type: "array", - is: () => ExpressionFactory.isArray(input), - value: () => - explore_arrays(project)(config)(importer)(input, meta.arrays, { - ...explore, + // ARRAYS + if (props.metadata.arrays.filter((a) => filter(a.type.value)).length) + unions.push({ + type: "array", + is: () => ExpressionFactory.isArray(props.input), + value: () => + explore_arrays({ + ...props, + arrays: props.metadata.arrays, + explore: { + ...props.explore, from: "array", - }), - }); + }, + }), + }); - // BUILT-IN CLASSES - if (meta.natives.length) - for (const native of meta.natives) - unions.push({ - type: "native", - is: () => ExpressionFactory.isInstanceOf(native)(input), - value: () => ts.factory.createReturnStatement(), - }); - if (meta.sets.length) - unions.push({ - type: "set", - is: () => ExpressionFactory.isInstanceOf("Set")(input), - value: () => ts.factory.createReturnStatement(), - }); - if (meta.maps.length) + // BUILT-IN CLASSES + if (props.metadata.natives.length) + for (const native of props.metadata.natives) unions.push({ - type: "map", - is: () => ExpressionFactory.isInstanceOf("Map")(input), + type: "native", + is: () => ExpressionFactory.isInstanceOf(native.name, props.input), value: () => ts.factory.createReturnStatement(), }); + if (props.metadata.sets.length) + unions.push({ + type: "set", + is: () => ExpressionFactory.isInstanceOf("Set", props.input), + value: () => ts.factory.createReturnStatement(), + }); + if (props.metadata.maps.length) + unions.push({ + type: "map", + is: () => ExpressionFactory.isInstanceOf("Map", props.input), + value: () => ts.factory.createReturnStatement(), + }); - // OBJECTS - if (meta.objects.length) - unions.push({ - type: "object", - is: () => - ExpressionFactory.isObject({ - checkNull: true, - checkArray: false, - })(input), - value: () => - explore_objects(config)(importer)(input, meta, { - ...explore, + // OBJECTS + if (props.metadata.objects.length) + unions.push({ + type: "object", + is: () => + ExpressionFactory.isObject({ + checkNull: true, + checkArray: false, + input: props.input, + }), + value: () => + explore_objects({ + ...props, + explore: { + ...props.explore, from: "object", - }), - }); - - //---- - // STATEMENTS - //---- - const converter = (v: ts.Expression | ts.Block | ts.ReturnStatement) => - ts.isReturnStatement(v) || ts.isBlock(v) - ? v - : ts.factory.createExpressionStatement(v); + }, + }), + }); - const statements: ts.Statement[] = unions.map((u) => - ts.factory.createIfStatement(u.is(), converter(u.value())), - ); - return ts.factory.createBlock(statements, true); - }; + //---- + // STATEMENTS + //---- + const converter = (v: ts.Expression | ts.Block | ts.ReturnStatement) => + ts.isReturnStatement(v) || ts.isBlock(v) + ? v + : ts.factory.createExpressionStatement(v); + + const statements: ts.Statement[] = unions.map((u) => + ts.factory.createIfStatement(u.is(), converter(u.value())), + ); + return ts.factory.createBlock(statements, true); + }; - const decode_object = (importer: FunctionImporter) => + const decode_object = (props: { + functor: FunctionProgrammer; + input: ts.Expression; + object: MetadataObjectType; + explore: FeatureProgrammer.IExplore; + }) => FeatureProgrammer.decode_object({ - trace: false, - path: false, - prefix: PREFIX, - })(importer); - - const decode_array = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - array.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}a${array.type.index}`), + config: { + trace: false, + path: false, + prefix: PREFIX, + }, + functor: props.functor, + object: props.object, + input: props.input, + explore: props.explore, + }); + + const decode_array = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + props.array.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}a${props.array.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, source: "function", from: "array", - })(input), - ) - : decode_array_inline(config)(importer)(input, array, explore); - - const decode_array_inline = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - FeatureProgrammer.decode_array(config)(importer)(PruneJoiner.array)( - input, - array, - explore, - ); + }, + input: props.input, + }), + ) + : decode_array_inline(props); + + const decode_array_inline = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + FeatureProgrammer.decode_array({ + config: props.config, + functor: props.functor, + combiner: PruneJoiner.array, + array: props.array, + input: props.input, + explore: props.explore, + }); - const decode_tuple = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTuple, - explore: FeatureProgrammer.IExplore, - ): ts.Expression | ts.Block => - tuple.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}t${tuple.type.index}`), + const decode_tuple = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + tuple: MetadataTuple; + explore: FeatureProgrammer.IExplore; + }): ts.Expression | ts.Block => + props.tuple.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}t${props.tuple.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, source: "function", - })(input), - ) - : decode_tuple_inline(project)(config)(importer)( - input, - tuple.type, - explore, - ); - - const decode_tuple_inline = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTupleType, - explore: FeatureProgrammer.IExplore, - ): ts.Block => { - const children: ts.ConciseBody[] = tuple.elements - .map((elem, index) => [elem, index] as const) - .filter(([elem]) => filter(elem) && elem.rest === null) - .map(([elem, index]) => - decode(project)(config)(importer)( - ts.factory.createElementAccessExpression(input, index), - elem, - { - ...explore, - from: "array", - postfix: explore.postfix.length - ? `${postfix_of_tuple(explore.postfix)}[${index}]"` - : `"[${index}]"`, }, - ), - ); - const rest = (() => { - if (tuple.elements.length === 0) return null; - - const last: Metadata = tuple.elements.at(-1)!; - const rest: Metadata | null = last.rest; - if (rest === null || filter(rest) === false) return null; + input: props.input, + }), + ) + : decode_tuple_inline({ + ...props, + tuple: props.tuple.type, + }); - return decode(project)(config)(importer)( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("slice"), - undefined, - [ExpressionFactory.number(tuple.elements.length - 1)], - ), - wrap_metadata_rest_tuple(tuple.elements.at(-1)!.rest!), - { - ...explore, - start: tuple.elements.length - 1, + const decode_tuple_inline = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + tuple: MetadataTupleType; + explore: FeatureProgrammer.IExplore; + }): ts.Block => { + const elements: ts.ConciseBody[] = props.tuple.elements + .map((elem, index) => [elem, index] as const) + .filter(([elem]) => filter(elem) && elem.rest === null) + .map(([elem, index]) => + decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createElementAccessExpression(props.input, index), + metadata: elem, + explore: { + ...props.explore, + from: "array", + postfix: props.explore.postfix.length + ? `${postfix_of_tuple(props.explore.postfix)}[${index}]"` + : `"[${index}]"`, }, - ); - })(); - return PruneJoiner.tuple(children, rest); - }; + }), + ); + const rest = (() => { + if (props.tuple.elements.length === 0) return null; + + const last: Metadata = props.tuple.elements.at(-1)!; + const rest: Metadata | null = last.rest; + if (rest === null || filter(rest) === false) return null; + + return decode({ + context: props.context, + config: props.config, + functor: props.functor, + input: ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "slice"), + undefined, + [ExpressionFactory.number(props.tuple.elements.length - 1)], + ), + metadata: wrap_metadata_rest_tuple(props.tuple.elements.at(-1)!.rest!), + explore: { + ...props.explore, + start: props.tuple.elements.length - 1, + }, + }); + })(); + return PruneJoiner.tuple({ + elements, + rest, + }); + }; /* ----------------------------------------------------------- UNION TYPE EXPLORERS ----------------------------------------------------------- */ - const explore_objects = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ) => { - if (meta.objects.length === 1) - return decode_object(importer)(input, meta.objects[0]!, explore); - - return ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${PREFIX}u${meta.union_index!}`), - ), - undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), - ); - }; + const explore_objects = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }) => { + if (props.metadata.objects.length === 1) + return decode_object({ + ...props, + object: props.metadata.objects[0]!.type, + }); + + return ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(`${PREFIX}u${props.metadata.union_index!}`), + ), + undefined, + FeatureProgrammer.argumentsArray(props), + ); + }; - const explore_arrays = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - elements: MetadataArray[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( + const explore_arrays = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + arrays: MetadataArray[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + explore_array_like_union_types({ + ...props, + elements: props.arrays, + factory: (next) => UnionExplorer.array({ - checker: IsProgrammer.decode(project)(importer), - decoder: decode_array(config)(importer), - empty: ts.factory.createStringLiteral("[]"), - success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), + config: { + checker: (v) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + metadata: v.definition, + input: v.input, + explore: v.explore, + }), + decoder: (v) => + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + empty: ts.factory.createStringLiteral("[]"), + success: ts.factory.createTrue(), + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: next.parameters, + input: next.input, + arrays: next.definitions, + explore: next.explore, + }), + }); + //(next.parameters)(next.input, next.elements, next.explore), + + const explore_array_like_union_types = < + T extends MetadataArray | MetadataTuple, + >(props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + factory: (next: { + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + definitions: T[]; + explore: FeatureProgrammer.IExplore; + }) => ts.ArrowFunction; + input: ts.Expression; + elements: T[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + const arrow = (next: { + parameters: ts.ParameterDeclaration[]; + explore: FeatureProgrammer.IExplore; + input: ts.Expression; + }): ts.ArrowFunction => + props.factory({ + definitions: props.elements, + parameters: next.parameters, + input: next.input, + explore: next.explore, + }); + if (props.elements.every((e) => e.type.recursive === false)) + ts.factory.createCallExpression( + arrow({ + parameters: [], + explore: props.explore, + input: props.input, }), - )(input, elements, explore); - - const explore_array_like_union_types = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - factory: ( - parameters: ts.ParameterDeclaration[], - ) => ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ) => ts.ArrowFunction, - ) => - ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const arrow = - (parameters: ts.ParameterDeclaration[]) => - (explore: FeatureProgrammer.IExplore) => - (input: ts.Expression): ts.ArrowFunction => - factory(parameters)(input, elements, explore); - if (elements.every((e) => e.type.recursive === false)) - ts.factory.createCallExpression( - arrow([])(explore)(input), - undefined, - [], - ); - - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.emplaceUnion( - config.prefix, - elements.map((e) => e.type.name).join(" | "), - () => - arrow( - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - )({ - ...explore, - postfix: "", - })(ts.factory.createIdentifier("input")), - ), - ), undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), + [], ); + + const arrayExplore: FeatureProgrammer.IExplore = { + ...props.explore, + source: "function", + from: "array", }; + return ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.emplaceUnion( + props.config.prefix, + props.elements.map((e) => e.type.name).join(" | "), + () => + arrow({ + parameters: FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + explore: { + ...arrayExplore, + postfix: "", + }, + input: ts.factory.createIdentifier("input"), + }), + ), + ), + undefined, + FeatureProgrammer.argumentsArray(props), + ); + }; // @todo -> must filter out recursive visit - const filter = (meta: Metadata): boolean => - meta.any === false && - (meta.objects.length !== 0 || - meta.tuples.some( + const filter = (metadata: Metadata): boolean => + metadata.any === false && + (metadata.objects.length !== 0 || + metadata.tuples.some( (t) => !!t.type.elements.length && t.type.elements.some((e) => filter(e.rest ?? e)), ) || - meta.arrays.some((e) => filter(e.type.value))); + metadata.arrays.some((e) => filter(e.type.value))); /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$p"; - - const configure = - (project: IProject) => - (importer: FunctionImporter): FeatureProgrammer.IConfig => { - const config: FeatureProgrammer.IConfig = { - types: { - input: (type, name) => - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), - ), - output: () => TypeFactory.keyword("void"), - }, - prefix: PREFIX, - trace: false, - path: false, - initializer, - decoder: () => decode(project)(config)(importer), - objector: { - checker: () => IsProgrammer.decode(project)(importer), - decoder: () => decode_object(importer), - joiner: PruneJoiner.object, - unionizer: decode_union_object( - IsProgrammer.decode_object(project)(importer), - )(decode_object(importer))((exp) => exp)((value, expected) => - create_throw_error(importer)(expected)(value), + const PREFIX = "_p"; + + const configure = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + }): FeatureProgrammer.IConfig => { + const config: FeatureProgrammer.IConfig = { + types: { + input: (type, name) => + ts.factory.createTypeReferenceNode( + name ?? + TypeFactory.getFullName({ checker: props.context.checker, type }), ), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - }, - generator: { - arrays: () => write_array_functions(config)(importer), - tuples: () => write_tuple_functions(project)(config)(importer), - }, - }; - return config; + output: () => TypeFactory.keyword("void"), + }, + prefix: PREFIX, + trace: false, + path: false, + initializer, + decoder: (next) => + decode({ + context: props.context, + functor: props.functor, + config, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + objector: { + checker: (next) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + decoder: (next) => + decode_object({ + functor: props.functor, + input: next.input, + object: next.object, + explore: next.explore, + }), + joiner: PruneJoiner.object, + unionizer: (next) => + decode_union_object({ + checker: (v) => + IsProgrammer.decode_object({ + context: props.context, + functor: props.functor, + input: v.input, + object: v.object, + explore: v.explore, + }), + decoder: (v) => + decode_object({ + functor: props.functor, + input: v.input, + object: v.object, + explore: v.explore, + }), + success: (exp) => exp, + escaper: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + input: next.input, + objects: next.objects, + explore: next.explore, + }), + failure: (next) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: next.expected, + input: next.input, + }), + }, + generator: { + arrays: (collection) => + write_array_functions({ + config, + functor: props.functor, + collection, + }), + tuples: (collection) => + write_tuple_functions({ + config, + context: props.context, + functor: props.functor, + collection, + }), + }, }; + return config; + }; - const initializer: FeatureProgrammer.IConfig["initializer"] = - (project) => (importer) => (type) => { - const collection = new MetadataCollection(); - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ + const initializer: FeatureProgrammer.IConfig["initializer"] = (props) => { + const collection = new MetadataCollection(); + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: false, constant: true, absorb: true, - })(collection)(type); - if (result.success === false) - throw TransformerError.from(`typia.misc.${importer.method}`)( - result.errors, - ); - return [collection, result.data]; + }, + collection, + type: props.type, + }); + if (result.success === false) + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); + return { + collection, + metadata: result.data, }; + }; - const create_throw_error = - (importer: FunctionImporter) => - (expected: string) => - (value: ts.Expression) => - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - importer.use("throws"), - [], - [ - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "expected", - ts.factory.createStringLiteral(expected), - ), - ts.factory.createPropertyAssignment("value", value), - ], - true, - ), - ], - ), - ); + const create_throw_error = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + expected: string; + input: ts.Expression; + }) => + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + props.context.importer.internal("throwTypeGuardError"), + [], + [ + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "method", + ts.factory.createStringLiteral(props.functor.method), + ), + ts.factory.createPropertyAssignment( + "expected", + ts.factory.createStringLiteral(props.expected), + ), + ts.factory.createPropertyAssignment("value", props.input), + ], + true, + ), + ], + ), + ); } diff --git a/src/programmers/misc/MiscValidateCloneProgrammer.ts b/src/programmers/misc/MiscValidateCloneProgrammer.ts index daf630b69d..8d4d278477 100644 --- a/src/programmers/misc/MiscValidateCloneProgrammer.ts +++ b/src/programmers/misc/MiscValidateCloneProgrammer.ts @@ -4,24 +4,27 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { MiscCloneProgrammer } from "./MiscCloneProgrammer"; export namespace MiscValidateCloneProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - equals: false, + config: { + equals: false, + }, }); const clone = MiscCloneProgrammer.decompose({ ...props, @@ -35,22 +38,30 @@ export namespace MiscValidateCloneProgrammer { statements: [ ...validate.statements, ...clone.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__clone", clone.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__clone", + value: clone.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - ts.factory.createTypeReferenceNode("typia.IValidation", [ - clone.arrow.type ?? TypeFactory.keyword("any"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [clone.arrow.type ?? TypeFactory.keyword("any")], + }), undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "result", - ts.factory.createAsExpression( + StatementFactory.constant({ + name: "result", + value: ts.factory.createAsExpression( ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), undefined, @@ -58,7 +69,7 @@ export namespace MiscValidateCloneProgrammer { ), TypeFactory.keyword("any"), ), - ), + }), ts.factory.createIfStatement( ts.factory.createIdentifier("result.success"), ts.factory.createExpressionStatement( @@ -83,22 +94,18 @@ export namespace MiscValidateCloneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/misc/MiscValidatePruneProgrammer.ts b/src/programmers/misc/MiscValidatePruneProgrammer.ts index 1a94db56fd..601a6ad83e 100644 --- a/src/programmers/misc/MiscValidatePruneProgrammer.ts +++ b/src/programmers/misc/MiscValidatePruneProgrammer.ts @@ -4,25 +4,28 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { MiscPruneProgrammer } from "./MiscPruneProgrammer"; export namespace MiscValidatePruneProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate: FeatureProgrammer.IDecomposed = ValidateProgrammer.decompose({ ...props, - equals: false, + config: { + equals: false, + }, }); const prune: FeatureProgrammer.IDecomposed = MiscPruneProgrammer.decompose({ ...props, @@ -36,30 +39,43 @@ export namespace MiscValidatePruneProgrammer { statements: [ ...validate.statements, ...prune.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__prune", prune.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__prune", + value: prune.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - ts.factory.createTypeReferenceNode( - `typia.IValidation<${ - props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type) - }>`, - ), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [ + ts.factory.createTypeReferenceNode( + props.name ?? + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), + ), + ], + }), undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "result", - ts.factory.createCallExpression( + StatementFactory.constant({ + name: "result", + value: ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), undefined, [ts.factory.createIdentifier("input")], ), - ), + }), ts.factory.createIfStatement( ts.factory.createIdentifier("result.success"), ts.factory.createExpressionStatement( @@ -80,22 +96,18 @@ export namespace MiscValidatePruneProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/notations/NotationAssertGeneralProgrammer.ts b/src/programmers/notations/NotationAssertGeneralProgrammer.ts index c2341e9cc9..824c5b0167 100644 --- a/src/programmers/notations/NotationAssertGeneralProgrammer.ts +++ b/src/programmers/notations/NotationAssertGeneralProgrammer.ts @@ -4,26 +4,33 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { NotationGeneralProgrammer } from "./NotationGeneralProgrammer"; export namespace NotationAssertGeneralProgrammer { + export interface IProps extends IProgrammerProps { + rename: (str: string) => string; + } + export const decompose = (props: { rename: (str: string) => string; - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const notation: FeatureProgrammer.IDecomposed = NotationGeneralProgrammer.decompose({ @@ -38,15 +45,24 @@ export namespace NotationAssertGeneralProgrammer { statements: [ ...assert.statements, ...notation.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__notation", notation.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__notation", + value: notation.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], notation.arrow.type, undefined, @@ -68,24 +84,18 @@ export namespace NotationAssertGeneralProgrammer { }; }; - export const write = - (rename: (str: string) => string) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - rename, - project, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/notations/NotationGeneralProgrammer.ts b/src/programmers/notations/NotationGeneralProgrammer.ts index d2ac40a6c8..ec284ae7fe 100644 --- a/src/programmers/notations/NotationGeneralProgrammer.ts +++ b/src/programmers/notations/NotationGeneralProgrammer.ts @@ -9,17 +9,21 @@ import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; import { MetadataArray } from "../../schemas/metadata/MetadataArray"; +import { MetadataMap } from "../../schemas/metadata/MetadataMap"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; +import { MetadataSet } from "../../schemas/metadata/MetadataSet"; import { MetadataTuple } from "../../schemas/metadata/MetadataTuple"; import { MetadataTupleType } from "../../schemas/metadata/MetadataTupleType"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { TransformerError } from "../../transformers/TransformerError"; import { StringUtil } from "../../utils/StringUtil"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { NotationJoiner } from "../helpers/NotationJoiner"; import { UnionExplorer } from "../helpers/UnionExplorer"; import { decode_union_object } from "../internal/decode_union_object"; @@ -27,24 +31,37 @@ import { postfix_of_tuple } from "../internal/postfix_of_tuple"; import { wrap_metadata_rest_tuple } from "../internal/wrap_metadata_rest_tuple"; export namespace NotationGeneralProgrammer { - export const returnType = - (rename: (str: string) => string) => (type: string) => - `typia.${StringUtil.capitalize(rename.name)}Case<${type}>`; + export interface IProps extends IProgrammerProps { + rename: (str: string) => string; + } + + export const returnType = (props: { + rename: (str: string) => string; + context: ITypiaContext; + type: string; + }) => + props.context.importer.type({ + file: "typia", + name: `${StringUtil.capitalize(props.rename.name)}Case`, + arguments: [ts.factory.createTypeReferenceNode(props.type)], + }); export const decompose = (props: { rename: (str: string) => string; validated: boolean; - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { - const config = configure(props.rename)(props.project)(props.importer); + const config = configure(props); if (props.validated === false) config.addition = (collection) => - IsProgrammer.write_function_statements(props.project)(props.importer)( + IsProgrammer.write_function_statements({ + context: props.context, + functor: props.functor, collection, - ); + }); const composed: FeatureProgrammer.IComposed = FeatureProgrammer.compose({ ...props, config, @@ -56,413 +73,493 @@ export namespace NotationGeneralProgrammer { undefined, undefined, composed.parameters, - ts.factory.createTypeReferenceNode( - returnType(props.rename)( + returnType({ + rename: props.rename, + context: props.context, + type: props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), - ), - ), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), + }), undefined, composed.body, ), }; }; - export const write = - (rename: (str: string) => string) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string) => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - rename, - validated: true, - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - importer, - modulo, - result, - }); - }; + export const write = (props: IProps) => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + validated: true, + }); + return FeatureProgrammer.writeDecomposed({ + functor, + modulo: props.modulo, + result, + }); + }; - const write_array_functions = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .arrays() - .filter((a) => a.recursive) - .map((type, i) => - StatementFactory.constant( - `${config.prefix}a${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_array_inline(config)(importer)( - ts.factory.createIdentifier("input"), - MetadataArray.create({ - type, - tags: [], - }), - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_array_functions = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .arrays() + .filter((a) => a.recursive) + .map((type, i) => + StatementFactory.constant({ + name: `${props.config.prefix}a${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_array_inline({ + ...props, + input: ts.factory.createIdentifier("input"), + array: MetadataArray.create({ + type, + tags: [], + }), + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); - const write_tuple_functions = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - (collection: MetadataCollection): ts.VariableStatement[] => - collection - .tuples() - .filter((t) => t.recursive) - .map((tuple, i) => - StatementFactory.constant( - `${config.prefix}t${i}`, - ts.factory.createArrowFunction( - undefined, - undefined, - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - TypeFactory.keyword("any"), - undefined, - decode_tuple_inline(project)(config)(importer)( - ts.factory.createIdentifier("input"), - tuple, - { - tracable: config.trace, - source: "function", - from: "array", - postfix: "", - }, - ), - ), + const write_tuple_functions = (props: { + config: FeatureProgrammer.IConfig; + rename: (str: string) => string; + context: ITypiaContext; + functor: FunctionProgrammer; + collection: MetadataCollection; + }): ts.VariableStatement[] => + props.collection + .tuples() + .filter((t) => t.recursive) + .map((tuple, i) => + StatementFactory.constant({ + name: `${props.config.prefix}t${i}`, + value: ts.factory.createArrowFunction( + undefined, + undefined, + FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + TypeFactory.keyword("any"), + undefined, + decode_tuple_inline({ + ...props, + input: ts.factory.createIdentifier("input"), + tuple, + explore: { + tracable: props.config.trace, + source: "function", + from: "array", + postfix: "", + }, + }), ), - ); + }), + ); /* ----------------------------------------------------------- DECODERS ----------------------------------------------------------- */ - const decode = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - // ANY TYPE - if ( - meta.any || - meta.arrays.some((a) => a.type.value.any) || - meta.tuples.some( - (t) => - !!t.type.elements.length && t.type.elements.every((e) => e.any), - ) + const decode = (props: { + config: FeatureProgrammer.IConfig; + rename: (str: string) => string; + context: ITypiaContext; + functor: FunctionProgrammer; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + input: ts.Expression; + }): ts.Expression => { + // ANY TYPE + if ( + props.metadata.any || + props.metadata.arrays.some((a) => a.type.value.any) || + props.metadata.tuples.some( + (t) => !!t.type.elements.length && t.type.elements.every((e) => e.any), ) - return ts.factory.createCallExpression(importer.use("any"), undefined, [ - input, - ]); - - interface IUnion { - type: string; - is: () => ts.Expression; - value: () => ts.Expression; - } - const unions: IUnion[] = []; - - //---- - // LIST UP UNION TYPES - //---- - // FUNCTIONAL - if (meta.functions.length) - unions.push({ - type: "functional", - is: () => - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("function"), - ts.factory.createTypeOfExpression(input), - ), - value: () => ts.factory.createIdentifier("undefined"), - }); + ) + return ExpressionFactory.currying({ + function: props.context.importer.internal("notationAny"), + arguments: [ + props.context.importer.internal( + `notation${StringUtil.capitalize(props.rename.name)}`, + ), + props.input, + ], + }); - // TUPLES - for (const tuple of meta.tuples) - unions.push({ - type: "tuple", - is: () => - IsProgrammer.decode(project)(importer)( - input, - (() => { - const partial = Metadata.initialize(); - partial.tuples.push(tuple); - return partial; - })(), - explore, - ), - value: () => - decode_tuple(project)(config)(importer)(input, tuple, explore), - }); + interface IUnion { + type: string; + is: () => ts.Expression; + value: () => ts.Expression; + } + const unions: IUnion[] = []; + + //---- + // LIST UP UNION TYPES + //---- + // FUNCTIONAL + if (props.metadata.functions.length) + unions.push({ + type: "functional", + is: () => + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("function"), + ts.factory.createTypeOfExpression(props.input), + ), + value: () => ts.factory.createIdentifier("undefined"), + }); - // ARRAYS - if (meta.arrays.length) - unions.push({ - type: "array", - is: () => ExpressionFactory.isArray(input), - value: () => - explore_arrays(project)(config)(importer)(input, meta.arrays, { - ...explore, + // TUPLES + for (const tuple of props.metadata.tuples) + unions.push({ + type: "tuple", + is: () => + IsProgrammer.decode({ + ...props, + metadata: (() => { + const partial = Metadata.initialize(); + partial.tuples.push(tuple); + return partial; + })(), + }), + value: () => + decode_tuple({ + ...props, + tuple, + }), + }); + + // ARRAYS + if (props.metadata.arrays.length) + unions.push({ + type: "array", + is: () => ExpressionFactory.isArray(props.input), + value: () => + explore_arrays({ + ...props, + arrays: props.metadata.arrays, + explore: { + ...props.explore, from: "array", - }), - }); + }, + }), + }); - // NATIVE TYPES - if (meta.sets.length) - unions.push({ - type: "set", - is: () => ExpressionFactory.isInstanceOf("Set")(input), - value: () => - explore_sets(project)(config)(importer)(input, meta.sets, { - ...explore, + // NATIVE TYPES + if (props.metadata.sets.length) + unions.push({ + type: "set", + is: () => ExpressionFactory.isInstanceOf("Set", props.input), + value: () => + explore_sets({ + ...props, + sets: props.metadata.sets, + explore: { + ...props.explore, from: "array", - }), - }); - if (meta.maps.length) - unions.push({ - type: "map", - is: () => ExpressionFactory.isInstanceOf("Map")(input), - value: () => - explore_maps(project)(config)(importer)(input, meta.maps, { - ...explore, + }, + }), + }); + if (props.metadata.maps.length) + unions.push({ + type: "map", + is: () => ExpressionFactory.isInstanceOf("Map", props.input), + value: () => + explore_maps({ + ...props, + maps: props.metadata.maps, + explore: { + ...props.explore, from: "array", - }), - }); - for (const native of meta.natives) { - if (native === "WeakSet" || native === "WeakMap") continue; - unions.push({ - type: "native", - is: () => ExpressionFactory.isInstanceOf(native)(input), - value: () => - native === "Boolean" || native === "Number" || native === "String" - ? ts.factory.createCallExpression( - IdentifierFactory.access(input)("valueOf"), - undefined, - undefined, - ) - : decode_native(native)(input), - }); - } - - // OBJECTS - if (meta.objects.length) - unions.push({ - type: "object", - is: () => - ExpressionFactory.isObject({ - checkNull: true, - checkArray: false, - })(input), - value: () => - explore_objects(config)(importer)(input, meta, { - ...explore, - from: "object", - }), - }); - - // COMPOSITION - if (unions.length === 0) return input; - else if (unions.length === 1 && meta.size() === 1) { - const value: ts.Expression = - (meta.nullable || meta.isRequired() === false) && is_instance(meta) - ? ts.factory.createConditionalExpression( - input, + }, + }), + }); + for (const native of props.metadata.natives) { + if (native.name === "WeakSet" || native.name === "WeakMap") continue; + unions.push({ + type: "native", + is: () => ExpressionFactory.isInstanceOf(native.name, props.input), + value: () => + native.name === "Boolean" || + native.name === "Number" || + native.name === "String" + ? ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "valueOf"), undefined, - unions[0]!.value(), undefined, - input, ) - : unions[0]!.value(); - return ts.factory.createAsExpression(value, TypeFactory.keyword("any")); - } else { - let last: ts.Expression = input; - for (const u of unions.reverse()) - last = ts.factory.createConditionalExpression( - u.is(), - undefined, - u.value(), - undefined, - last, - ); - return ts.factory.createAsExpression(last, TypeFactory.keyword("any")); - } - }; + : decode_native({ + name: native.name, + input: props.input, + }), + }); + } + + // OBJECTS + if (props.metadata.objects.length) + unions.push({ + type: "object", + is: () => + ExpressionFactory.isObject({ + checkNull: true, + checkArray: false, + input: props.input, + }), + value: () => + explore_objects({ + ...props, + explore: { + ...props.explore, + from: "object", + }, + }), + }); + + // COMPOSITION + if (unions.length === 0) return props.input; + else if (unions.length === 1 && props.metadata.size() === 1) { + const value: ts.Expression = + (props.metadata.nullable || props.metadata.isRequired() === false) && + is_instance(props.metadata) + ? ts.factory.createConditionalExpression( + props.input, + undefined, + unions[0]!.value(), + undefined, + props.input, + ) + : unions[0]!.value(); + return ts.factory.createAsExpression(value, TypeFactory.keyword("any")); + } else { + let last: ts.Expression = props.input; + for (const u of unions.reverse()) + last = ts.factory.createConditionalExpression( + u.is(), + undefined, + u.value(), + undefined, + last, + ); + return ts.factory.createAsExpression(last, TypeFactory.keyword("any")); + } + }; - const decode_object = (importer: FunctionImporter) => + const decode_object = (props: { + functor: FunctionProgrammer; + object: MetadataObjectType; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; + }) => FeatureProgrammer.decode_object({ - trace: false, - path: false, - prefix: PREFIX, - })(importer); - - const decode_array = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - array.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}a${array.type.index}`), + config: { + trace: false, + path: false, + prefix: PREFIX, + }, + functor: props.functor, + object: props.object, + input: props.input, + explore: props.explore, + }); + + const decode_array = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + props.array.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}a${props.array.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, source: "function", from: "array", - })(input), - ) - : decode_array_inline(config)(importer)(input, array, explore); - - const decode_array_inline = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ) => - FeatureProgrammer.decode_array(config)(importer)(NotationJoiner.array)( - input, - array, - explore, - ); + }, + input: props.input, + }), + ) + : decode_array_inline(props); + + const decode_array_inline = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + array: MetadataArray; + explore: FeatureProgrammer.IExplore; + }) => + FeatureProgrammer.decode_array({ + config: props.config, + functor: props.functor, + combiner: NotationJoiner.array, + array: props.array, + input: props.input, + explore: props.explore, + }); - const decode_tuple = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTuple, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - tuple.type.recursive - ? ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${config.prefix}t${tuple.type.index}`), + const decode_tuple = (props: { + config: FeatureProgrammer.IConfig; + rename: (str: string) => string; + context: ITypiaContext; + functor: FunctionProgrammer; + tuple: MetadataTuple; + explore: FeatureProgrammer.IExplore; + input: ts.Expression; + }): ts.Expression => + props.tuple.type.recursive + ? ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal( + `${props.config.prefix}t${props.tuple.type.index}`, ), - undefined, - FeatureProgrammer.argumentsArray(config)({ - ...explore, + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: { + ...props.explore, source: "function", - })(input), - ) - : decode_tuple_inline(project)(config)(importer)( - input, - tuple.type, - explore, - ); - - const decode_tuple_inline = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - tuple: MetadataTupleType, - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const children: ts.Expression[] = tuple.elements - .filter((m) => m.rest === null) - .map((elem, index) => - decode(project)(config)(importer)( - ts.factory.createElementAccessExpression(input, index), - elem, - { - ...explore, - from: "array", - postfix: explore.postfix.length - ? `${postfix_of_tuple(explore.postfix)}[${index}]"` - : `"[${index}]"`, }, - ), - ); - const rest = (() => { - if (tuple.elements.length === 0) return null; - - const last: Metadata = tuple.elements.at(-1)!; - const rest: Metadata | null = last.rest; - if (rest === null) return null; + input: props.input, + }), + ) + : decode_tuple_inline({ + ...props, + tuple: props.tuple.type, + }); - return decode(project)(config)(importer)( - ts.factory.createCallExpression( - IdentifierFactory.access(input)("slice"), - undefined, - [ExpressionFactory.number(tuple.elements.length - 1)], - ), - wrap_metadata_rest_tuple(tuple.elements.at(-1)!.rest!), - { - ...explore, - start: tuple.elements.length - 1, + const decode_tuple_inline = (props: { + context: ITypiaContext; + rename: (str: string) => string; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + explore: FeatureProgrammer.IExplore; + tuple: MetadataTupleType; + input: ts.Expression; + }): ts.Expression => { + const elements: ts.Expression[] = props.tuple.elements + .filter((m) => m.rest === null) + .map((elem, index) => + decode({ + ...props, + input: ts.factory.createElementAccessExpression(props.input, index), + metadata: elem, + explore: { + ...props.explore, + from: "array", + postfix: props.explore.postfix.length + ? `${postfix_of_tuple(props.explore.postfix)}[${index}]"` + : `"[${index}]"`, }, - ); - })(); - return NotationJoiner.tuple(children, rest); - }; + }), + ); + const rest = (() => { + if (props.tuple.elements.length === 0) return null; + + const last: Metadata = props.tuple.elements.at(-1)!; + const rest: Metadata | null = last.rest; + if (rest === null) return null; + + return decode({ + ...props, + input: ts.factory.createCallExpression( + IdentifierFactory.access(props.input, "slice"), + undefined, + [ExpressionFactory.number(props.tuple.elements.length - 1)], + ), + metadata: wrap_metadata_rest_tuple(props.tuple.elements.at(-1)!.rest!), + explore: { + ...props.explore, + start: props.tuple.elements.length - 1, + }, + }); + })(); + return NotationJoiner.tuple({ + elements, + rest, + }); + }; /* ----------------------------------------------------------- NATIVE CLASSES ----------------------------------------------------------- */ - const decode_native = (type: string) => (input: ts.Expression) => - type === "Date" + const decode_native = (props: { name: string; input: ts.Expression }) => + props.name === "Date" ? ts.factory.createNewExpression( - ts.factory.createIdentifier(type), + ts.factory.createIdentifier(props.name), undefined, - [input], + [props.input], ) - : input; + : props.input; /* ----------------------------------------------------------- EXPLORERS FOR UNION TYPES ----------------------------------------------------------- */ - const explore_sets = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - sets: Metadata[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - ts.factory.createCallExpression( - UnionExplorer.set({ - checker: IsProgrammer.decode(project)(importer), - decoder: (input, array, explore) => + const explore_sets = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; + sets: Array; + }): ts.Expression => + ts.factory.createCallExpression( + UnionExplorer.set({ + config: { + checker: (v) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: v.input, + metadata: v.definition, + explore: v.explore, + }), + decoder: (v) => ts.factory.createNewExpression( ts.factory.createIdentifier("Set"), [TypeFactory.keyword("any")], - [decode_array(config)(importer)(input, array, explore)], + [ + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + ], ), empty: ts.factory.createNewExpression( ts.factory.createIdentifier("Set"), @@ -470,42 +567,70 @@ export namespace NotationGeneralProgrammer { [], ), success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - })([])(input, sets, explore), - undefined, - undefined, - ); - - const explore_maps = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - maps: Metadata.Entry[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - ts.factory.createCallExpression( - UnionExplorer.map({ - checker: (top, entry, explore) => { - const func = IsProgrammer.decode(project)(importer); - return ts.factory.createLogicalAnd( - func(ts.factory.createElementAccessExpression(top, 0), entry[0], { - ...explore, - postfix: `${explore.postfix}[0]`, + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: [], + input: props.input, + sets: props.sets, + explore: props.explore, + }), + undefined, + undefined, + ); + + const explore_maps = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + maps: Array; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + ts.factory.createCallExpression( + UnionExplorer.map({ + config: { + checker: (v) => + ts.factory.createLogicalAnd( + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: ts.factory.createElementAccessExpression(v.input, 0), + metadata: v.definition[0], + explore: { + ...props.explore, + postfix: `${v.explore.postfix}[0]`, + }, }), - func(ts.factory.createElementAccessExpression(top, 1), entry[1], { - ...explore, - postfix: `${explore.postfix}[1]`, + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: ts.factory.createElementAccessExpression(v.input, 1), + metadata: v.definition[1], + explore: { + ...props.explore, + postfix: `${props.explore.postfix}[1]`, + }, }), - ); - }, - decoder: (input, array, explore) => + ), + decoder: (v) => ts.factory.createNewExpression( ts.factory.createIdentifier("Map"), [TypeFactory.keyword("any"), TypeFactory.keyword("any")], - [decode_array(config)(importer)(input, array, explore)], + [ + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + ], ), empty: ts.factory.createNewExpression( ts.factory.createIdentifier("Map"), @@ -513,202 +638,347 @@ export namespace NotationGeneralProgrammer { [], ), success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - })([])(input, maps, explore), - undefined, - undefined, - ); - - const explore_objects = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ) => { - if (meta.objects.length === 1) - return decode_object(importer)(input, meta.objects[0]!, explore); - - return ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${PREFIX}u${meta.union_index!}`), - ), - undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), - ); - }; + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: [], + input: props.input, + maps: props.maps, + explore: props.explore, + }), + undefined, + undefined, + ); + + const explore_objects = (props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + metadata: Metadata; + explore: FeatureProgrammer.IExplore; + }) => { + if (props.metadata.objects.length === 1) + return decode_object({ + functor: props.functor, + object: props.metadata.objects[0]!.type, + input: props.input, + explore: props.explore, + }); + return ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.useLocal(`${PREFIX}u${props.metadata.union_index!}`), + ), + undefined, + FeatureProgrammer.argumentsArray(props), + ); + }; - const explore_arrays = - (project: IProject) => - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - elements: MetadataArray[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => - explore_array_like_union_types(config)(importer)( + const explore_arrays = (props: { + context: ITypiaContext; + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + input: ts.Expression; + arrays: MetadataArray[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => + explore_array_like_union_types({ + ...props, + factory: (next) => UnionExplorer.array({ - checker: IsProgrammer.decode(project)(importer), - decoder: decode_array(config)(importer), - empty: ts.factory.createIdentifier("[]"), - success: ts.factory.createTrue(), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), + config: { + checker: (v) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: v.input, + metadata: v.definition, + explore: v.explore, + }), + decoder: (v) => + decode_array({ + config: props.config, + functor: props.functor, + input: v.input, + array: v.definition, + explore: v.explore, + }), + empty: ts.factory.createIdentifier("[]"), + success: ts.factory.createTrue(), + failure: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + }, + parameters: next.parameters, + input: next.input, + arrays: next.definitions, + explore: next.explore, }), - )(input, elements, explore); - - const explore_array_like_union_types = - (config: FeatureProgrammer.IConfig) => - (importer: FunctionImporter) => - ( - factory: ( - parameters: ts.ParameterDeclaration[], - ) => ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ) => ts.ArrowFunction, - ) => - ( - input: ts.Expression, - elements: T[], - explore: FeatureProgrammer.IExplore, - ): ts.Expression => { - const arrow = - (parameters: ts.ParameterDeclaration[]) => - (explore: FeatureProgrammer.IExplore) => - (input: ts.Expression): ts.ArrowFunction => - factory(parameters)(input, elements, explore); - if (elements.every((e) => e.type.recursive === false)) - ts.factory.createCallExpression( - arrow([])(explore)(input), - undefined, - [], - ); + definitions: props.arrays, + input: props.input, + explore: props.explore, + }); - explore = { - ...explore, - source: "function", - from: "array", - }; - return ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.emplaceUnion( - config.prefix, - elements.map((e) => e.type.name).join(" | "), - () => - arrow( - FeatureProgrammer.parameterDeclarations(config)( - TypeFactory.keyword("any"), - )(ts.factory.createIdentifier("input")), - )({ - ...explore, - postfix: "", - })(ts.factory.createIdentifier("input")), - ), - ), + const explore_array_like_union_types = < + T extends MetadataArray | MetadataTuple, + >(props: { + config: FeatureProgrammer.IConfig; + functor: FunctionProgrammer; + factory: (next: { + parameters: ts.ParameterDeclaration[]; + input: ts.Expression; + definitions: T[]; + explore: FeatureProgrammer.IExplore; + }) => ts.ArrowFunction; + input: ts.Expression; + definitions: T[]; + explore: FeatureProgrammer.IExplore; + }): ts.Expression => { + const arrow = (next: { + parameters: ts.ParameterDeclaration[]; + explore: FeatureProgrammer.IExplore; + input: ts.Expression; + }): ts.ArrowFunction => + props.factory({ + parameters: next.parameters, + definitions: props.definitions, + explore: next.explore, + input: next.input, + }); + if (props.definitions.every((e) => e.type.recursive === false)) + ts.factory.createCallExpression( + arrow({ + parameters: [], + explore: props.explore, + input: props.input, + }), undefined, - FeatureProgrammer.argumentsArray(config)(explore)(input), + [], ); + + const arrayExplore: FeatureProgrammer.IExplore = { + ...props.explore, + source: "function", + from: "array", }; + return ts.factory.createCallExpression( + ts.factory.createIdentifier( + props.functor.emplaceUnion( + props.config.prefix, + props.definitions.map((e) => e.type.name).join(" | "), + () => + arrow({ + parameters: FeatureProgrammer.parameterDeclarations({ + config: props.config, + type: TypeFactory.keyword("any"), + input: ts.factory.createIdentifier("input"), + }), + explore: { + ...arrayExplore, + postfix: "", + }, + input: ts.factory.createIdentifier("input"), + }), + ), + ), + undefined, + FeatureProgrammer.argumentsArray({ + config: props.config, + explore: arrayExplore, + input: props.input, + }), + ); + }; /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$c"; - - const configure = - (rename: (str: string) => string) => - (project: IProject) => - (importer: FunctionImporter): FeatureProgrammer.IConfig => { - const config: FeatureProgrammer.IConfig = { - types: { - input: (type, name) => - ts.factory.createTypeReferenceNode( - name ?? TypeFactory.getFullName(project.checker)(type), - ), - output: (type, name) => - ts.factory.createTypeReferenceNode( - returnType(rename)( - name ?? TypeFactory.getFullName(project.checker)(type), - ), - ), - }, - prefix: PREFIX, - trace: false, - path: false, - initializer, - decoder: () => decode(project)(config)(importer), - objector: { - checker: () => IsProgrammer.decode(project)(importer), - decoder: () => decode_object(importer), - joiner: NotationJoiner.object(rename), - unionizer: decode_union_object( - IsProgrammer.decode_object(project)(importer), - )(decode_object(importer))((exp) => exp)((input, expected) => - create_throw_error(importer)(expected)(input), + const PREFIX = "_c"; + + const configure = (props: { + rename: (str: string) => string; + context: ITypiaContext; + functor: FunctionProgrammer; + }): FeatureProgrammer.IConfig => { + const config: FeatureProgrammer.IConfig = { + types: { + input: (type, name) => + ts.factory.createTypeReferenceNode( + name ?? + TypeFactory.getFullName({ checker: props.context.checker, type }), ), - failure: (input, expected) => - create_throw_error(importer)(expected)(input), - }, - generator: { - arrays: () => write_array_functions(config)(importer), - tuples: () => write_tuple_functions(project)(config)(importer), - }, - }; - return config; + output: (type, name) => + returnType({ + rename: props.rename, + context: props.context, + type: + name ?? + TypeFactory.getFullName({ + checker: props.context.checker, + type, + }), + }), + }, + prefix: PREFIX, + trace: false, + path: false, + initializer, + decoder: (next) => + decode({ + config, + rename: props.rename, + context: props.context, + functor: props.functor, + metadata: next.metadata, + explore: next.explore, + input: next.input, + }), + objector: { + checker: (next) => + IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: next.input, + metadata: next.metadata, + explore: next.explore, + }), + decoder: (next) => + decode_object({ + functor: props.functor, + object: next.object, + input: next.input, + explore: next.explore, + }), + joiner: (next) => + NotationJoiner.object({ + rename: props.rename, + input: next.input!, + entries: next.entries, + }), + unionizer: (next) => + decode_union_object({ + checker: (v) => + IsProgrammer.decode_object({ + context: props.context, + functor: props.functor, + object: v.object, + input: v.input, + explore: v.explore, + }), + decoder: (v) => + decode_object({ + functor: props.functor, + object: v.object, + input: v.input, + explore: v.explore, + }), + success: (exp) => exp, + escaper: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + input: next.input, + objects: next.objects, + explore: next.explore, + }), + failure: (next) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: next.expected, + input: next.input, + }), + }, + generator: { + arrays: (collection) => + write_array_functions({ + functor: props.functor, + config, + collection, + }), + tuples: (collection) => + write_tuple_functions({ + rename: props.rename, + context: props.context, + functor: props.functor, + config, + collection, + }), + }, }; + return config; + }; - const initializer: FeatureProgrammer.IConfig["initializer"] = - (project) => (importer) => (type) => { - const collection = new MetadataCollection(); - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ + const initializer: FeatureProgrammer.IConfig["initializer"] = (props) => { + const collection = new MetadataCollection(); + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: false, constant: true, absorb: true, - })(collection)(type); - if (result.success === false) - throw TransformerError.from(`typia.misc.${importer.method}`)( - result.errors, - ); - return [collection, result.data]; + }, + collection, + type: props.type, + }); + if (result.success === false) + throw TransformerError.from({ + code: props.functor.method, + errors: result.errors, + }); + return { + collection, + metadata: result.data, }; + }; - const create_throw_error = - (importer: FunctionImporter) => - (expected: string) => - (value: ts.Expression) => - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - importer.use("throws"), - [], - [ - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "expected", - ts.factory.createStringLiteral(expected), - ), - ts.factory.createPropertyAssignment("value", value), - ], - true, - ), - ], - ), - ); - - const is_instance = (meta: Metadata): boolean => - !!meta.objects.length || - !!meta.arrays.length || - !!meta.tuples.length || - !!meta.sets.length || - !!meta.maps.length || - !!meta.natives.length || - (meta.rest !== null && is_instance(meta.rest)); + const create_throw_error = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + expected: string; + input: ts.Expression; + }) => + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + props.context.importer.internal("throwTypeGuardError"), + undefined, + [ + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "method", + ts.factory.createStringLiteral(props.functor.method), + ), + ts.factory.createPropertyAssignment( + "expected", + ts.factory.createStringLiteral(props.expected), + ), + ts.factory.createPropertyAssignment("value", props.input), + ], + true, + ), + ], + ), + ); + + const is_instance = (metadata: Metadata): boolean => + !!metadata.objects.length || + !!metadata.arrays.length || + !!metadata.tuples.length || + !!metadata.sets.length || + !!metadata.maps.length || + !!metadata.natives.length || + (metadata.rest !== null && is_instance(metadata.rest)); } diff --git a/src/programmers/notations/NotationIsGeneralProgrammer.ts b/src/programmers/notations/NotationIsGeneralProgrammer.ts index 47dca1deed..8dbe9dcf40 100644 --- a/src/programmers/notations/NotationIsGeneralProgrammer.ts +++ b/src/programmers/notations/NotationIsGeneralProgrammer.ts @@ -4,24 +4,31 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { NotationGeneralProgrammer } from "./NotationGeneralProgrammer"; export namespace NotationIsGeneralProgrammer { + export interface IProps extends IProgrammerProps { + rename: (str: string) => string; + } + export const decompose = (props: { rename: (str: string) => string; - project: IProject; - importer: FunctionImporter; + context: ITypiaContext; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - equals: false, + config: { + equals: false, + }, }); const notation: FeatureProgrammer.IDecomposed = NotationGeneralProgrammer.decompose({ @@ -36,8 +43,14 @@ export namespace NotationIsGeneralProgrammer { statements: [ ...is.statements, ...notation.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__notation", notation.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__notation", + value: notation.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -75,23 +88,18 @@ export namespace NotationIsGeneralProgrammer { }; }; - export const write = - (rename: (str: string) => string) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - rename, - project, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/notations/NotationValidateGeneralProgrammer.ts b/src/programmers/notations/NotationValidateGeneralProgrammer.ts index 2b9a74014b..25d1343f58 100644 --- a/src/programmers/notations/NotationValidateGeneralProgrammer.ts +++ b/src/programmers/notations/NotationValidateGeneralProgrammer.ts @@ -4,25 +4,32 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { NotationGeneralProgrammer } from "./NotationGeneralProgrammer"; export namespace NotationValidateGeneralProgrammer { + export interface IProps extends IProgrammerProps { + rename: (str: string) => string; + } + export const decompose = (props: { rename: (str: string) => string; - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - equals: false, + config: { + equals: false, + }, }); const notation = NotationGeneralProgrammer.decompose({ ...props, @@ -36,22 +43,30 @@ export namespace NotationValidateGeneralProgrammer { statements: [ ...validate.statements, ...notation.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__notation", notation.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__notation", + value: notation.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - ts.factory.createTypeReferenceNode("typia.IValidation", [ - notation.arrow.type ?? TypeFactory.keyword("any"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [notation.arrow.type ?? TypeFactory.keyword("any")], + }), undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "result", - ts.factory.createAsExpression( + StatementFactory.constant({ + name: "result", + value: ts.factory.createAsExpression( ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), undefined, @@ -59,7 +74,7 @@ export namespace NotationValidateGeneralProgrammer { ), TypeFactory.keyword("any"), ), - ), + }), ts.factory.createIfStatement( ts.factory.createIdentifier("result.success"), ts.factory.createExpressionStatement( @@ -87,24 +102,18 @@ export namespace NotationValidateGeneralProgrammer { }; }; - export const write = - (rename: (str: string) => string) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - rename, - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts b/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts index 417e743fb3..4cc7cf7269 100644 --- a/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts @@ -2,34 +2,37 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufDecodeProgrammer } from "./ProtobufDecodeProgrammer"; export namespace ProtobufAssertDecodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const decode: FeatureProgrammer.IDecomposed = ProtobufDecodeProgrammer.decompose(props); @@ -41,15 +44,24 @@ export namespace ProtobufAssertDecodeProgrammer { statements: [ ...assert.statements, ...decode.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ ...decode.arrow.parameters, - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], decode.arrow.type, undefined, @@ -69,23 +81,18 @@ export namespace ProtobufAssertDecodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts b/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts index 5b8728cf07..d4fadb131c 100644 --- a/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts @@ -4,34 +4,37 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { AssertProgrammer } from "../AssertProgrammer"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufEncodeProgrammer } from "./ProtobufEncodeProgrammer"; export namespace ProtobufAssertEncodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; - init: ts.Expression | undefined; + init?: ts.Expression | undefined; }): FeatureProgrammer.IDecomposed => { const assert: FeatureProgrammer.IDecomposed = AssertProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, - guard: false, + config: { + equals: false, + guard: false, + }, }); const encode: FeatureProgrammer.IDecomposed = ProtobufEncodeProgrammer.decompose(props); @@ -43,15 +46,24 @@ export namespace ProtobufAssertEncodeProgrammer { statements: [ ...assert.statements, ...encode.statements, - StatementFactory.constant("__assert", assert.arrow), - StatementFactory.constant("__encode", encode.arrow), + StatementFactory.constant({ + name: "__assert", + value: assert.arrow, + }), + StatementFactory.constant({ + name: "__encode", + value: encode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [ IdentifierFactory.parameter("input", TypeFactory.keyword("any")), - AssertProgrammer.Guardian.parameter(props.init), + AssertProgrammer.Guardian.parameter({ + context: props.context, + init: props.init, + }), ], encode.arrow.type, undefined, @@ -73,23 +85,18 @@ export namespace ProtobufAssertEncodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string, init?: ts.Expression): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - init, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/protobuf/ProtobufDecodeProgrammer.ts b/src/programmers/protobuf/ProtobufDecodeProgrammer.ts index 22676cd2fe..6d088403a6 100644 --- a/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufDecodeProgrammer.ts @@ -9,43 +9,50 @@ import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataArray } from "../../schemas/metadata/MetadataArray"; -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; +import { IProtobufProperty } from "../../schemas/protobuf/IProtobufProperty"; +import { IProtobufPropertyType } from "../../schemas/protobuf/IProtobufPropertyType"; +import { IProtobufSchema } from "../../schemas/protobuf/IProtobufSchema"; -import { IProject } from "../../transformers/IProject"; - -import { ProtobufAtomic } from "../../typings/ProtobufAtomic"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufUtil } from "../helpers/ProtobufUtil"; export namespace ProtobufDecodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const collection: MetadataCollection = new MetadataCollection(); - const meta: Metadata = ProtobufFactory.metadata(props.modulo.getText())( - props.project.checker, - props.project.context, - )(collection)(props.type); + const meta: Metadata = ProtobufFactory.metadata({ + method: props.modulo.getText(), + checker: props.context.checker, + transformer: props.context.transformer, + collection, + type: props.type, + }); return { functions: Object.fromEntries( collection .objects() - .filter((obj) => ProtobufUtil.isStaticObject(obj)) - .map((obj) => [ - `${PREFIX}o${obj.index}`, - StatementFactory.constant( - props.importer.useLocal(`${PREFIX}o${obj.index}`), - write_object_function(props.project)(props.importer)(obj), - ), + .filter((object) => ProtobufUtil.isStaticObject(object)) + .map((object) => [ + `${PREFIX}o${object.index}`, + StatementFactory.constant({ + name: props.functor.useLocal(`${PREFIX}o${object.index}`), + value: write_object_function({ + context: props.context, + functor: props.functor, + object, + }), + }), ]), ), statements: [], @@ -58,32 +65,35 @@ export namespace ProtobufDecodeProgrammer { ts.factory.createTypeReferenceNode("Uint8Array"), ), ], - ts.factory.createImportTypeNode( - ts.factory.createLiteralTypeNode( - ts.factory.createStringLiteral("typia"), - ), - undefined, - ts.factory.createIdentifier("Resolved"), - [ + props.context.importer.type({ + file: "typia", + name: "Resolved", + arguments: [ ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ], - ), + }), undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "reader", - ts.factory.createNewExpression( - props.importer.use("Reader"), + StatementFactory.constant({ + name: "reader", + value: ts.factory.createNewExpression( + props.context.importer.internal("ProtobufReader"), undefined, [ts.factory.createIdentifier("input")], ), - ), + }), ts.factory.createReturnStatement( - decode_regular_object(true)(meta.objects[0]!), + decode_regular_object({ + top: true, + object: meta.objects[0]!.type, + }), ), ], true, @@ -92,172 +102,155 @@ export namespace ProtobufDecodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - const write_object_function = - (project: IProject) => - (importer: FunctionImporter) => - (obj: MetadataObject): ts.ArrowFunction => - ts.factory.createArrowFunction( - undefined, - undefined, + const write_object_function = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + object: MetadataObjectType; + }): ts.ArrowFunction => + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter("reader"), + IdentifierFactory.parameter( + "length", + TypeFactory.keyword("number"), + ExpressionFactory.number(-1), + ), + ], + TypeFactory.keyword("any"), + undefined, + ts.factory.createBlock( [ - IdentifierFactory.parameter("reader"), - IdentifierFactory.parameter( - "length", - TypeFactory.keyword("number"), - ExpressionFactory.number(-1), - ), - ], - TypeFactory.keyword("any"), - undefined, - ts.factory.createBlock( - [ - ts.factory.createExpressionStatement( - ts.factory.createBinaryExpression( - ts.factory.createIdentifier("length"), - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - ts.factory.createConditionalExpression( - ts.factory.createLessThan( - ts.factory.createIdentifier("length"), - ExpressionFactory.number(0), - ), - undefined, - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("size"), - undefined, - undefined, - ), - undefined, - ts.factory.createAdd( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("index"), - undefined, - undefined, - ), - ts.factory.createIdentifier("length"), - ), + ts.factory.createExpressionStatement( + ts.factory.createBinaryExpression( + ts.factory.createIdentifier("length"), + ts.factory.createToken(ts.SyntaxKind.EqualsToken), + ts.factory.createConditionalExpression( + ts.factory.createLessThan( + ts.factory.createIdentifier("length"), + ExpressionFactory.number(0), ), - ), - ), - ...write_object_function_body(project)(importer)({ - condition: ts.factory.createLessThan( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("index"), - undefined, - undefined, + undefined, + callReader("size"), + undefined, + ts.factory.createAdd( + callReader("index"), + ts.factory.createIdentifier("length"), ), - ts.factory.createIdentifier("length"), ), - tag: "tag", - output: "output", - })(obj.properties), - ts.factory.createReturnStatement( - ts.factory.createIdentifier("output"), ), - ], - true, - ), - ); - - const write_object_function_body = - (project: IProject) => - (importer: FunctionImporter) => - (props: { condition: ts.Expression; tag: string; output: string }) => - (properties: MetadataProperty[]): ts.Statement[] => { - let i: number = 1; - const clauses: ts.CaseClause[] = properties - .map((p) => { - const clause = decode_property(project)(importer)(i)( - IdentifierFactory.access(ts.factory.createIdentifier(props.output))( - p.key.getSoleLiteral()!, + ), + ...write_object_function_body({ + context: props.context, + condition: ts.factory.createLessThan( + callReader("index"), + ts.factory.createIdentifier("length"), ), - p.value, - ); - i += ProtobufUtil.size(p.value); - return clause; - }) - .flat(); - return [ - StatementFactory.constant( - props.output, - ts.factory.createAsExpression( - ts.factory.createObjectLiteralExpression( - properties - .filter( - (p) => - !( - project.compilerOptions.exactOptionalPropertyTypes === - true && p.value.optional === true - ), - ) - .map((p) => - ts.factory.createPropertyAssignment( - IdentifierFactory.identifier(p.key.getSoleLiteral()!), - write_property_default_value(p.value), + tag: "tag", + output: "output", + object: props.object, + }), + ts.factory.createReturnStatement( + ts.factory.createIdentifier("output"), + ), + ], + true, + ), + ); + + const write_object_function_body = (props: { + context: ITypiaContext; + condition: ts.Expression; + tag: string; + output: string; + object: MetadataObjectType; + }): ts.Statement[] => { + if (props.object.properties.some((p) => p.of_protobuf_ === undefined)) + ProtobufFactory.emplaceObject(props.object); + const clauses: ts.CaseClause[] = props.object.properties + .map((p) => + decode_property({ + context: props.context, + accessor: IdentifierFactory.access( + ts.factory.createIdentifier(props.output), + p.key.getSoleLiteral()!, + ), + protobuf: p.of_protobuf_!, + metadata: p.value, + }), + ) + .flat(); + return [ + StatementFactory.constant({ + name: props.output, + value: ts.factory.createAsExpression( + ts.factory.createObjectLiteralExpression( + props.object.properties + .filter( + (p) => + !( + props.context.compilerOptions.exactOptionalPropertyTypes === + true && p.value.optional === true ), + ) + .map((p) => + ts.factory.createPropertyAssignment( + IdentifierFactory.identifier(p.key.getSoleLiteral()!), + write_property_default_value(p.value), ), - true, - ), - TypeFactory.keyword("any"), + ), + true, ), + TypeFactory.keyword("any"), ), - ts.factory.createWhileStatement( - props.condition, - ts.factory.createBlock([ - StatementFactory.constant( - props.tag, - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("uint32"), - undefined, - undefined, - ), + }), + ts.factory.createWhileStatement( + props.condition, + ts.factory.createBlock([ + StatementFactory.constant({ + name: props.tag, + value: callReader("uint32"), + }), + ts.factory.createSwitchStatement( + ts.factory.createUnsignedRightShift( + ts.factory.createIdentifier(props.tag), + ExpressionFactory.number(3), ), - ts.factory.createSwitchStatement( - ts.factory.createUnsignedRightShift( - ts.factory.createIdentifier(props.tag), - ExpressionFactory.number(3), - ), - ts.factory.createCaseBlock([ - ...clauses, - ts.factory.createDefaultClause([ - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("skipType"), - undefined, - [ - ts.factory.createBitwiseAnd( - ts.factory.createIdentifier(props.tag), - ExpressionFactory.number(7), - ), - ], + ts.factory.createCaseBlock([ + ...clauses, + ts.factory.createDefaultClause([ + ts.factory.createExpressionStatement( + callReader("skipType", [ + ts.factory.createBitwiseAnd( + ts.factory.createIdentifier(props.tag), + ExpressionFactory.number(7), ), - ), - ts.factory.createBreakStatement(), - ]), + ]), + ), + ts.factory.createBreakStatement(), ]), - ), - ]), - ), - ]; - }; + ]), + ), + ]), + ), + ]; + }; const write_property_default_value = (value: Metadata) => ts.factory.createAsExpression( @@ -277,7 +270,7 @@ export namespace ProtobufDecodeProgrammer { ? ts.factory.createNewExpression( ts.factory.createIdentifier("Uint8Array"), undefined, - [], + [ts.factory.createArrayLiteralExpression([])], ) : value.atomics.some((a) => a.type === "string") || value.constants.some( @@ -293,7 +286,7 @@ export namespace ProtobufDecodeProgrammer { ? ts.factory.createStringLiteral("") : value.objects.length && value.objects.some( - (obj) => !ProtobufUtil.isStaticObject(obj), + (obj) => !ProtobufUtil.isStaticObject(obj.type), ) ? ts.factory.createObjectLiteralExpression() : ts.factory.createIdentifier("undefined"), @@ -301,107 +294,162 @@ export namespace ProtobufDecodeProgrammer { ); /* ----------------------------------------------------------- - DECODERS - ----------------------------------------------------------- */ - const decode_property = - (project: IProject) => - (importer: FunctionImporter) => - (index: number) => - ( - accessor: ts.ElementAccessExpression | ts.PropertyAccessExpression, - meta: Metadata, - ): ts.CaseClause[] => { - const clauses: ts.CaseClause[] = []; - const emplace = (name: string) => (v: ts.Expression | ts.Statement[]) => - clauses.push( - ts.factory.createCaseClause( - ExpressionFactory.number(index++), - Array.isArray(v) - ? [ - ts.factory.createExpressionStatement( - ts.factory.createIdentifier(`// type: ${name}`), - ), - ...v, - ts.factory.createBreakStatement(), - ] - : [ - ts.factory.createExpressionStatement( - ts.factory.createIdentifier(`// ${name}`), - ), - ts.factory.createExpressionStatement( - ts.factory.createBinaryExpression( - accessor, - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - v, - ), - ), - ts.factory.createBreakStatement(), - ], - ), - ); - - const required: boolean = meta.isRequired() && !meta.nullable; - for (const atomic of ProtobufUtil.getAtomics(meta)) - emplace(atomic)(decode_atomic(meta)(atomic)); - if (meta.natives.length) emplace("bytes")(decode_bytes("bytes")); - for (const array of meta.arrays) - emplace(`Array<${array.type.value.getName()}>`)( - decode_array(accessor, array, required), - ); - for (const map of meta.maps) - emplace(`Map`)( - decode_map(project)(importer)(accessor, map, required), - ); - for (const obj of meta.objects) - emplace(obj.name)( - ProtobufUtil.isStaticObject(obj) - ? decode_regular_object(false)(obj) - : decode_dynamic_object(project)(importer)(accessor, obj, required), - ); - return clauses; - }; - - const decode_atomic = - (meta: Metadata) => - (atomic: ProtobufAtomic): ts.Expression => { - if (atomic === "string") return decode_bytes("string"); + DECODERS + ----------------------------------------------------------- */ + const decode_property = (props: { + context: ITypiaContext; + metadata: Metadata; + protobuf: IProtobufProperty; + accessor: ts.Expression; + }): ts.CaseClause[] => + props.protobuf.union.map((schema) => + decode_property_type({ + context: props.context, + accessor: props.accessor, + schema, + required: + props.metadata.isRequired() && props.metadata.nullable === false, + }), + ); - const call: ts.CallExpression = ts.factory.createCallExpression( - IdentifierFactory.access(ts.factory.createIdentifier("reader"))(atomic), - undefined, - undefined, + const decode_property_type = (props: { + context: ITypiaContext; + accessor: ts.Expression; + schema: IProtobufPropertyType; + required: boolean; + }): ts.CaseClause => { + const out = ( + title: string, + value: ts.Expression | ts.Statement[], + ): ts.CaseClause => + ts.factory.createCaseClause( + ExpressionFactory.number(props.schema.index), + [ + ts.factory.createExpressionStatement( + ts.factory.createIdentifier(`// ${title}`), + ), + ...(Array.isArray(value) + ? value + : [ + ts.factory.createExpressionStatement( + ts.factory.createBinaryExpression( + props.accessor, + ts.factory.createToken(ts.SyntaxKind.EqualsToken), + value, + ), + ), + ]), + ts.factory.createBreakStatement(), + ], ); - if (atomic !== "int64" && atomic !== "uint64") return call; - - const isNumber: boolean = ProtobufUtil.getNumbers(meta).some( - (n) => n === atomic, + // ATOMICS + if (props.schema.type === "bytes") return out("bytes", callReader("bytes")); + else if (props.schema.type === "bool") + return out("bool", callReader("bool")); + else if (props.schema.type === "bigint") + return out(props.schema.name, callReader(props.schema.name)); + else if (props.schema.type === "number") + return out(props.schema.name, decode_number(props.schema)); + else if (props.schema.type === "string") + return out("string", callReader("string")); + // INSTANCES + else if (props.schema.type === "array") + return out( + `Array<${props.schema.array.value.getName()}>`, + decode_array({ + accessor: props.accessor, + schema: props.schema, + required: props.required, + }), ); - return isNumber - ? ts.factory.createCallExpression( - ts.factory.createIdentifier("Number"), - undefined, - [call], - ) - : call; - }; - - const decode_bytes = (method: "bytes" | "string"): ts.Expression => - ts.factory.createCallExpression( - IdentifierFactory.access(ts.factory.createIdentifier("reader"))(method), - undefined, - undefined, + else if (props.schema.type === "object") + return out( + props.schema.object.name, + decode_regular_object({ + top: false, + object: props.schema.object, + }), + ); + else if (props.schema.type === "map") + if (props.schema.map instanceof MetadataObjectType) { + const key: Metadata = props.schema.map.properties[0]!.key; + const value: Metadata = props.schema.map.properties[0]!.value; + return out( + `Record<${key.getName()}, ${value.getName()}>`, + decode_map({ + context: props.context, + accessor: props.accessor, + schema: props.schema, + required: props.required, + key, + value, + initializer: ts.factory.createObjectLiteralExpression([]), + setter: () => + ts.factory.createBinaryExpression( + ts.factory.createElementAccessExpression( + props.accessor, + ts.factory.createIdentifier("entry.key"), + ), + ts.factory.createToken(ts.SyntaxKind.EqualsToken), + ts.factory.createIdentifier("entry.value"), + ), + }), + ); + } else { + const key: Metadata = props.schema.map.key; + const value: Metadata = props.schema.map.value; + return out( + `Map<${key.getName()}, ${value.getName()}>`, + decode_map({ + context: props.context, + accessor: props.accessor, + schema: props.schema, + required: props.required, + key, + value, + initializer: ts.factory.createNewExpression( + ts.factory.createIdentifier("Map"), + [TypeFactory.keyword("any"), TypeFactory.keyword("any")], + [], + ), + setter: () => + ts.factory.createCallExpression( + IdentifierFactory.access(props.accessor, "set"), + undefined, + [ + ts.factory.createIdentifier("entry.key"), + ts.factory.createIdentifier("entry.value"), + ], + ), + }), + ); + } + throw new Error( + "Error on ProtobufDecodeProgrammer.write(): unknown property type", ); + }; - const decode_array = ( - accessor: ts.ElementAccessExpression | ts.PropertyAccessExpression, - array: MetadataArray, - required: boolean, - ): ts.Statement[] => { + const decode_number = (schema: IProtobufSchema.INumber): ts.Expression => { + const value = callReader(schema.name); + return schema.name === "int64" || schema.name === "uint64" + ? ts.factory.createCallExpression( + ts.factory.createIdentifier("Number"), + undefined, + [value], + ) + : value; + }; + + const decode_array = (props: { + accessor: ts.Expression; + schema: IProtobufSchema.IArray; + required: boolean; + }): ts.Statement[] => { const statements: Array = []; - if (required === false) + if (props.required === false) statements.push( ts.factory.createBinaryExpression( - accessor, + props.accessor, ts.factory.createToken(ts.SyntaxKind.QuestionQuestionEqualsToken), ts.factory.createAsExpression( ts.factory.createArrayLiteralExpression(), @@ -409,16 +457,8 @@ export namespace ProtobufDecodeProgrammer { ), ), ); - const atomics = ProtobufUtil.getAtomics(array.type.value); - const decoder = atomics.length - ? () => decode_atomic(array.type.value)(atomics[0]!) - : array.type.value.natives.length - ? () => decode_bytes("bytes") - : array.type.value.objects.length - ? () => decode_regular_object(false)(array.type.value.objects[0]!) - : null; - if (decoder === null) throw new Error("Never reach here."); - else if (atomics.length && atomics[0] !== "string") { + const decoder: ts.Expression = decode_array_value(props.schema.value); + if (["bool", "bigint", "number"].includes(props.schema.value.type)) { statements.push( ts.factory.createIfStatement( ts.factory.createStrictEquality( @@ -430,35 +470,23 @@ export namespace ProtobufDecodeProgrammer { ), ts.factory.createBlock( [ - StatementFactory.constant( - "piece", - ts.factory.createAdd( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("uint32"), - undefined, - undefined, - ), - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("index"), - undefined, - undefined, - ), + StatementFactory.constant({ + name: "piece", + value: ts.factory.createAdd( + callReader("uint32"), + callReader("index"), ), - ), + }), ts.factory.createWhileStatement( ts.factory.createLessThan( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("index"), - undefined, - undefined, - ), + callReader("index"), ts.factory.createIdentifier("piece"), ), ts.factory.createExpressionStatement( ts.factory.createCallExpression( - IdentifierFactory.access(accessor)("push"), + IdentifierFactory.access(props.accessor, "push"), undefined, - [decoder()], + [decoder], ), ), ), @@ -467,9 +495,9 @@ export namespace ProtobufDecodeProgrammer { ), ts.factory.createExpressionStatement( ts.factory.createCallExpression( - IdentifierFactory.access(accessor)("push"), + IdentifierFactory.access(props.accessor, "push"), undefined, - [decoder()], + [decoder], ), ), ), @@ -477,9 +505,9 @@ export namespace ProtobufDecodeProgrammer { } else statements.push( ts.factory.createCallExpression( - IdentifierFactory.access(accessor)("push"), + IdentifierFactory.access(props.accessor, "push"), undefined, - [decoder()], + [decoder], ), ); return statements.map((stmt) => @@ -487,160 +515,140 @@ export namespace ProtobufDecodeProgrammer { ); }; - const decode_regular_object = - (top: boolean) => - (obj: MetadataObject): ts.Expression => - ts.factory.createCallExpression( - ts.factory.createIdentifier(`${PREFIX}o${obj.index}`), - undefined, - [ - ts.factory.createIdentifier("reader"), - ...(top - ? [] - : [ - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("uint32"), - undefined, - undefined, - ), - ]), - ], - ); - - const decode_dynamic_object = - (project: IProject) => - (importer: FunctionImporter) => - ( - accessor: ts.ElementAccessExpression | ts.PropertyAccessExpression, - obj: MetadataObject, - required: boolean, - ): ts.Statement[] => { - const top = obj.properties[0]!; - return decode_entry(project)(importer)({ - initializer: () => - ts.factory.createBinaryExpression( - accessor, - ts.factory.createToken(ts.SyntaxKind.QuestionQuestionEqualsToken), - ts.factory.createObjectLiteralExpression(), - ), - setter: () => - ts.factory.createBinaryExpression( - ts.factory.createElementAccessExpression( - accessor, - ts.factory.createIdentifier("entry.key"), - ), - ts.factory.createToken(ts.SyntaxKind.EqualsToken), - ts.factory.createIdentifier("entry.value"), - ), - })( - MetadataProperty.create({ - ...top, - key: (() => { - const key: Metadata = Metadata.initialize(); - key.atomics.push( - MetadataAtomic.create({ - type: "string", - tags: [], - }), - ); - return key; - })(), - }), - required, - ); - }; - - const decode_map = - (project: IProject) => - (importer: FunctionImporter) => - ( - accessor: ts.ElementAccessExpression | ts.PropertyAccessExpression, - map: Metadata.Entry, - required: boolean, - ): ts.Statement[] => - decode_entry(project)(importer)({ - initializer: () => - ts.factory.createBinaryExpression( - accessor, - ts.factory.createToken(ts.SyntaxKind.QuestionQuestionEqualsToken), - ts.factory.createNewExpression( - ts.factory.createIdentifier("Map"), - [TypeFactory.keyword("any"), TypeFactory.keyword("any")], - [], - ), - ), - setter: () => - ts.factory.createCallExpression( - IdentifierFactory.access(accessor)("set"), - undefined, - [ - ts.factory.createIdentifier("entry.key"), - ts.factory.createIdentifier("entry.value"), - ], - ), - })(map, required); + const decode_regular_object = (props: { + top: boolean; + object: MetadataObjectType; + }): ts.Expression => + ts.factory.createCallExpression( + ts.factory.createIdentifier(`${PREFIX}o${props.object.index}`), + undefined, + [ + ts.factory.createIdentifier("reader"), + ...(props.top ? [] : [callReader("uint32")]), + ], + ); - const decode_entry = - (project: IProject) => - (importer: FunctionImporter) => - (props: { - initializer: () => ts.Expression; - setter: () => ts.Expression; - }) => - (map: Metadata.Entry, required: boolean): ts.Statement[] => { - const statements: ts.Statement[] = [ - ...(required - ? [] - : [ts.factory.createExpressionStatement(props.initializer())]), - StatementFactory.constant( - "piece", - ts.factory.createAdd( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("uint32"), - undefined, - undefined, + const decode_map = (props: { + context: ITypiaContext; + accessor: ts.Expression; + key: Metadata; + value: Metadata; + schema: IProtobufSchema.IMap; + initializer: ts.Expression; + required: boolean; + setter: () => ts.Expression; + }): ts.Statement[] => { + const statements: Array = [ + ...(props.required === true + ? [ + ts.factory.createBinaryExpression( + props.accessor, + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionEqualsToken), + props.initializer, ), - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("index"), - undefined, - undefined, - ), - ), + ] + : []), + StatementFactory.constant({ + name: "piece", + value: ts.factory.createAdd(callReader("uint32"), callReader("index")), + }), + ...write_object_function_body({ + context: props.context, + condition: ts.factory.createLessThan( + callReader("index"), + ts.factory.createIdentifier("piece"), ), - ...write_object_function_body(project)(importer)({ - condition: ts.factory.createLessThan( - ts.factory.createCallExpression( - IdentifierFactory.access(READER())("index"), - undefined, - undefined, + tag: "kind", + output: "entry", + object: createObjectType([ + { + key: "key", + value: props.key, + }, + { + key: "value", + value: props.value, + }, + ]), + }), + ...(props.required === false + ? [ + ts.factory.createBinaryExpression( + props.accessor, + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionEqualsToken), + props.initializer, + ), + ] + : []), + props.setter(), + ]; + return [ + ts.factory.createExpressionStatement( + ExpressionFactory.selfCall( + ts.factory.createBlock( + statements.map((stmt) => + ts.isExpression(stmt) + ? ts.factory.createExpressionStatement(stmt) + : stmt, ), - ts.factory.createIdentifier("piece"), + true, ), - tag: "kind", - output: "entry", - })([ - MetadataProperty.create({ - key: MetadataFactory.soleLiteral("key"), - value: map.key, - description: null, - jsDocTags: [], - }), - MetadataProperty.create({ - key: MetadataFactory.soleLiteral("value"), - value: map.value, - description: null, - jsDocTags: [], - }), - ]), - ts.factory.createExpressionStatement(props.setter()), - ]; - return [ - ts.factory.createExpressionStatement( - ExpressionFactory.selfCall(ts.factory.createBlock(statements, true)), ), - ]; - }; + ), + ]; + }; + + const decode_array_value = ( + schema: IProtobufSchema.IArray["value"], + ): ts.Expression => { + if (schema.type === "bytes") return callReader("bytes"); + else if (schema.type === "bool") return callReader("bool"); + else if (schema.type === "bigint") return callReader(schema.name); + else if (schema.type === "number") return decode_number(schema); + else if (schema.type === "string") return callReader("string"); + else if (schema.type === "object") + return decode_regular_object({ + top: false, + object: schema.object, + }); + throw new Error("unreachable condition"); + }; } -const PREFIX = "$pd"; -const READER = () => ts.factory.createIdentifier("reader"); +const PREFIX = "_pd"; +const callReader = ( + method: string, + args?: ts.Expression[], +): ts.CallExpression => + ts.factory.createCallExpression( + IdentifierFactory.access(ts.factory.createIdentifier("reader"), method), + undefined, + args, + ); +const createObjectType = ( + definitions: Array<{ + key: string; + value: Metadata; + }>, +): MetadataObjectType => { + const properties: MetadataProperty[] = definitions.map((def) => + MetadataProperty.create({ + key: MetadataFactory.soleLiteral(def.key), + value: def.value, + description: null, + jsDocTags: [], + }), + ); + const obj: MetadataObjectType = MetadataObjectType.create({ + name: "object.o" + Math.random().toString().slice(2), + properties, + description: undefined, + jsDocTags: [], + index: -1, + validated: true, + recursive: false, + nullables: [false], + }); + ProtobufFactory.emplaceObject(obj); + return obj; +}; diff --git a/src/programmers/protobuf/ProtobufEncodeProgrammer.ts b/src/programmers/protobuf/ProtobufEncodeProgrammer.ts index 13822bb86a..a678218d74 100644 --- a/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufEncodeProgrammer.ts @@ -9,18 +9,20 @@ import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataArray } from "../../schemas/metadata/MetadataArray"; -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; -import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; +import { MetadataMap } from "../../schemas/metadata/MetadataMap"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; +import { IProtobufProperty } from "../../schemas/protobuf/IProtobufProperty"; +import { IProtobufPropertyType } from "../../schemas/protobuf/IProtobufPropertyType"; +import { IProtobufSchema } from "../../schemas/protobuf/IProtobufSchema"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { ProtobufAtomic } from "../../typings/ProtobufAtomic"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufUtil } from "../helpers/ProtobufUtil"; import { ProtobufWire } from "../helpers/ProtobufWire"; import { UnionPredicator } from "../helpers/UnionPredicator"; @@ -28,33 +30,41 @@ import { decode_union_object } from "../internal/decode_union_object"; export namespace ProtobufEncodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const collection: MetadataCollection = new MetadataCollection(); - const meta: Metadata = ProtobufFactory.metadata(props.modulo.getText())( - props.project.checker, - props.project.context, - )(collection)(props.type); + const metadata: Metadata = ProtobufFactory.metadata({ + method: props.modulo.getText(), + checker: props.context.checker, + transformer: props.context.transformer, + collection, + type: props.type, + }); - const callEncoder = (writer: string) => (factory: ts.NewExpression) => - StatementFactory.constant( - writer, - ts.factory.createCallExpression( + const callEncoder = (writer: string, factory: ts.NewExpression) => + StatementFactory.constant({ + name: writer, + value: ts.factory.createCallExpression( ts.factory.createIdentifier("encoder"), undefined, [factory, ts.factory.createIdentifier("input")], ), - ); + }); return { functions: { - encoder: StatementFactory.constant( - props.importer.useLocal("encoder"), - write_encoder(props.project)(props.importer)(collection)(meta), - ), + encoder: StatementFactory.constant({ + name: props.functor.useLocal("encoder"), + value: write_encoder({ + context: props.context, + functor: props.functor, + collection, + metadata, + }), + }), }, statements: [], arrow: ts.factory.createArrowFunction( @@ -65,7 +75,10 @@ export namespace ProtobufEncodeProgrammer { "input", ts.factory.createTypeReferenceNode( props.name ?? - TypeFactory.getFullName(props.project.checker)(props.type), + TypeFactory.getFullName({ + checker: props.context.checker, + type: props.type, + }), ), ), ], @@ -73,27 +86,23 @@ export namespace ProtobufEncodeProgrammer { undefined, ts.factory.createBlock( [ - callEncoder("sizer")( + callEncoder( + "sizer", ts.factory.createNewExpression( - props.importer.use("Sizer"), + props.context.importer.internal("ProtobufSizer"), undefined, [], ), ), - callEncoder("writer")( + callEncoder( + "writer", ts.factory.createNewExpression( - props.importer.use("Writer"), + props.context.importer.internal("ProtobufWriter"), undefined, [ts.factory.createIdentifier("sizer")], ), ), - ts.factory.createReturnStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("buffer"), - undefined, - undefined, - ), - ), + ts.factory.createReturnStatement(callWriter("buffer")), ], true, ), @@ -101,292 +110,331 @@ export namespace ProtobufEncodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; - const write_encoder = - (project: IProject) => - (importer: FunctionImporter) => - (collection: MetadataCollection) => - (meta: Metadata): ts.ArrowFunction => { - const functors = collection - .objects() - .filter((obj) => ProtobufUtil.isStaticObject(obj)) - .map((obj) => - StatementFactory.constant( - `${PREFIX}o${obj.index}`, - write_object_function(project)(importer)( - ts.factory.createIdentifier("input"), - obj, - { - source: "function", - from: "object", - tracable: false, - postfix: "", - }, - ), - ), - ); - const main = decode(project)(importer)(null)( - ts.factory.createIdentifier("input"), - meta, - { - source: "top", - from: "top", - tracable: false, - postfix: "", - }, + const write_encoder = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + collection: MetadataCollection; + metadata: Metadata; + }): ts.ArrowFunction => { + const functors = props.collection + .objects() + .filter((obj) => ProtobufUtil.isStaticObject(obj)) + .map((object) => + StatementFactory.constant({ + name: `${PREFIX}o${object.index}`, + value: write_object_function({ + context: props.context, + functor: props.functor, + input: ts.factory.createIdentifier("input"), + object, + explore: { + source: "function", + from: "object", + tracable: false, + postfix: "", + }, + }), + }), ); - return ts.factory.createArrowFunction( - undefined, - undefined, - [ - IdentifierFactory.parameter("writer"), - IdentifierFactory.parameter("input"), - ], - TypeFactory.keyword("any"), - undefined, - ts.factory.createBlock( - [ - ...importer.declareUnions(), - ...functors, - ...IsProgrammer.write_function_statements(project)(importer)( - collection, - ), - ...main.statements, - ts.factory.createReturnStatement( - ts.factory.createIdentifier("writer"), - ), - ], - true, + return ts.factory.createArrowFunction( + undefined, + [ + ts.factory.createTypeParameterDeclaration( + undefined, + "Writer", + props.context.importer.type({ + file: "typia/lib/internal/_IProtobufWriter.js", + name: "_IProtobufWriter", + }), ), - ); - }; - - const write_object_function = - (project: IProject) => - (importer: FunctionImporter) => - ( - input: ts.Expression, - obj: MetadataObject, - explore: FeatureProgrammer.IExplore, - ): ts.ArrowFunction => { - let index: number = 1; - const body: ts.Statement[] = obj.properties - .map((p) => { - const block = decode(project)(importer)(index)( - IdentifierFactory.access(input)(p.key.getSoleLiteral()!), - p.value, - explore, - ); - index += ProtobufUtil.size(p.value); - return [ - ts.factory.createExpressionStatement( + ], + [ + IdentifierFactory.parameter( + "writer", + ts.factory.createTypeReferenceNode("Writer"), + ), + IdentifierFactory.parameter("input"), + ], + ts.factory.createTypeReferenceNode("Writer"), + undefined, + ts.factory.createBlock( + [ + ...props.functor.declareUnions(), + ...functors, + ...IsProgrammer.write_function_statements(props), + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( ts.factory.createIdentifier( - `// property "${p.key.getSoleLiteral()!}"`, + props.functor.useLocal( + `${PREFIX}o${props.metadata.objects[0]?.type.index ?? 0}`, + ), ), + [], + [ts.factory.createIdentifier("input")], ), - ...block.statements, - ]; - }) - .flat(); + ), + ts.factory.createReturnStatement( + ts.factory.createIdentifier("writer"), + ), + ], + true, + ), + ); + }; - return ts.factory.createArrowFunction( - undefined, - undefined, - [IdentifierFactory.parameter("input")], - TypeFactory.keyword("any"), - undefined, - ts.factory.createBlock(body, true), - ); - }; + const write_object_function = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + input: ts.Expression; + object: MetadataObjectType; + explore: FeatureProgrammer.IExplore; + }): ts.ArrowFunction => { + const body: ts.Statement[] = props.object.properties + .map((p) => { + const block = decode_property({ + context: props.context, + functor: props.functor, + explore: props.explore, + metadata: p.value, + protobuf: p.of_protobuf_!, + input: IdentifierFactory.access(props.input, p.key.getSoleLiteral()!), + }); + return [ + ts.factory.createExpressionStatement( + ts.factory.createIdentifier( + `// property ${JSON.stringify(p.key.getSoleLiteral())}: ${p.value.getName()}`, + ), + ), + ...block.statements, + ]; + }) + .flat(); + return ts.factory.createArrowFunction( + undefined, + undefined, + [IdentifierFactory.parameter("input")], + TypeFactory.keyword("any"), + undefined, + ts.factory.createBlock(body, true), + ); + }; /* ----------------------------------------------------------- - DECODERS - ----------------------------------------------------------- */ - const decode = - (project: IProject) => - (importer: FunctionImporter) => - (index: number | null) => - ( - input: ts.Expression, - meta: Metadata, - explore: FeatureProgrammer.IExplore, - ): ts.Block => { - const wrapper: (block: ts.Block) => ts.Block = - meta.isRequired() && meta.nullable === false - ? (block) => block - : meta.isRequired() === false && meta.nullable === true - ? (block) => - ts.factory.createBlock( - [ - ts.factory.createIfStatement( - ts.factory.createLogicalAnd( - ts.factory.createStrictInequality( - ts.factory.createIdentifier("undefined"), - input, - ), - ts.factory.createStrictInequality( - ts.factory.createNull(), - input, - ), - ), - block, - ), - ], - true, - ) - : meta.isRequired() === false - ? (block) => - ts.factory.createBlock( - [ - ts.factory.createIfStatement( - ts.factory.createStrictInequality( - ts.factory.createIdentifier("undefined"), - input, - ), - block, - ), - ], - true, - ) - : (block) => - ts.factory.createBlock( - [ - ts.factory.createIfStatement( - ts.factory.createStrictInequality( - ts.factory.createNull(), - input, - ), - block, - ), - ], - true, - ); - - // STARTS FROM ATOMIC TYPES - const unions: IUnion[] = []; - const numbers = ProtobufUtil.getNumbers(meta); - const bigints = ProtobufUtil.getBigints(meta); - - for (const atom of ProtobufUtil.getAtomics(meta)) - if (atom === "bool") - unions.push({ - type: "bool", - is: () => - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("boolean"), - ts.factory.createTypeOfExpression(input), - ), - value: (index) => decode_bool(index)(input), - }); - else if ( - atom === "int32" || - atom === "uint32" || - atom === "float" || - atom === "double" - ) - unions.push(decode_number(numbers)(atom)(input)); - else if (atom === "int64" || atom === "uint64") - if (numbers.some((n) => n === atom)) - unions.push(decode_number(numbers)(atom)(input)); - else unions.push(decode_bigint(bigints)(atom)(input)); - else if (atom === "string") - unions.push({ - type: "string", - is: () => - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("string"), - ts.factory.createTypeOfExpression(input), - ), - value: (index) => decode_bytes("string")(index!)(input), - }); - - // CONSIDER BYTES - if (meta.natives.length) - unions.push({ - type: "bytes", - is: () => ExpressionFactory.isInstanceOf("Uint8Array")(input), - value: (index) => decode_bytes("bytes")(index!)(input), + DECODER STATION + ----------------------------------------------------------- */ + const decode_property = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + metadata: Metadata; + protobuf: IProtobufProperty; + input: ts.Expression; + explore: FeatureProgrammer.IExplore; + }): ts.Block => { + const union: IUnion[] = []; + for (const schema of props.protobuf.union) { + //---- + // ATOMICS + //---- + if (schema.type === "bool") + union.push({ + is: () => + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("boolean"), + ts.factory.createTypeOfExpression(props.input), + ), + value: () => + decode_bool({ + input: props.input, + index: schema.index, + }), }); - - // CONSIDER ARRAYS - if (meta.arrays.length) - unions.push({ - type: "array", - is: () => ExpressionFactory.isArray(input), - value: (index) => - decode_array(project)(importer)(index!)(input, meta.arrays[0]!, { - ...explore, - from: "array", + else if (schema.type === "bigint") + union.push( + decode_bigint({ + input: props.input, + type: schema.name, + candidates: props.protobuf.union + .filter((s) => s.type === "bigint") + .map((s) => s.name), + index: schema.index, + }), + ); + else if (schema.type === "number") + union.push( + decode_number({ + input: props.input, + type: schema.name, + candidates: props.protobuf.union + .filter((s) => s.type === "number") + .map((s) => s.name), + index: schema.index, + }), + ); + else if (schema.type === "string") + union.push({ + is: () => + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("string"), + ts.factory.createTypeOfExpression(props.input), + ), + value: () => + decode_bytes({ + method: "string", + index: schema.index, + input: props.input, }), }); - - // CONSIDER MAPS - if (meta.maps.length) - unions.push({ - type: "map", - is: () => ExpressionFactory.isInstanceOf("Map")(input), - value: (index) => - decode_map(project)(importer)(index!)(input, meta.maps[0]!, { - ...explore, - from: "array", + //---- + // INSTANCES + //---- + else if (schema.type === "bytes") + union.push({ + is: () => ExpressionFactory.isInstanceOf("Uint8Array", props.input), + value: () => + decode_bytes({ + method: "bytes", + index: schema.index, + input: props.input, }), }); - - // CONSIDER OBJECTS - if (meta.objects.length) - unions.push({ - type: "object", + else if (schema.type === "array") + union.push({ + is: () => ExpressionFactory.isArray(props.input), + value: () => + decode_array({ + context: props.context, + functor: props.functor, + input: props.input, + schema, + }), + }); + else if (schema.type === "map" && schema.map instanceof MetadataMap) { + union.push({ + is: () => ExpressionFactory.isInstanceOf("Map", props.input), + value: () => + decode_map({ + context: props.context, + functor: props.functor, + schema, + input: props.input, + }), + }); + } + const objectSchemas: Array< + IProtobufPropertyType.IObject | IProtobufPropertyType.IMap + > = props.protobuf.union + .filter((schema) => schema.type === "object" || schema.type === "map") + .filter( + (schema) => + schema.type === "object" || + (schema.type === "map" && schema.map instanceof MetadataObjectType), + ); + if (objectSchemas.length !== 0) + union.push({ is: () => ExpressionFactory.isObject({ checkNull: true, checkArray: false, - })(input), - value: (index) => - explore_objects(project)(importer)(0)(index)(input, meta.objects, { - ...explore, - from: "object", + input: props.input, + }), + value: () => + explore_objects({ + context: props.context, + functor: props.functor, + level: 0, + schemas: objectSchemas, + explore: { + ...props.explore, + from: "object", + }, + input: props.input, }), }); - - // RETURNS - if (unions.length === 1) return wrapper(unions[0]!.value(index)); - else - return wrapper(iterate(importer)(index)(unions)(meta.getName())(input)); - }; - - const iterate = - (importer: FunctionImporter) => - (index: number | null) => - (unions: IUnion[]) => - (expected: string) => - (input: ts.Expression) => + } + + // RETURNS + const wrapper: (block: ts.Block) => ts.Block = + props.metadata.isRequired() && props.metadata.nullable === false + ? (block) => block + : props.metadata.isRequired() === false && + props.metadata.nullable === true + ? (block) => + ts.factory.createBlock( + [ + ts.factory.createIfStatement( + ts.factory.createLogicalAnd( + ts.factory.createStrictInequality( + ts.factory.createIdentifier("undefined"), + props.input, + ), + ts.factory.createStrictInequality( + ts.factory.createNull(), + props.input, + ), + ), + block, + ), + ], + true, + ) + : props.metadata.isRequired() === false + ? (block) => + ts.factory.createBlock( + [ + ts.factory.createIfStatement( + ts.factory.createStrictInequality( + ts.factory.createIdentifier("undefined"), + props.input, + ), + block, + ), + ], + true, + ) + : (block) => + ts.factory.createBlock( + [ + ts.factory.createIfStatement( + ts.factory.createStrictInequality( + ts.factory.createNull(), + props.input, + ), + block, + ), + ], + true, + ); + if (union.length === 1) return wrapper(union[0]!.value()); + return wrapper( ts.factory.createBlock( [ - unions + union .map((u, i) => ts.factory.createIfStatement( u.is(), - u.value(index ? index + i : null), - i === unions.length - 1 - ? create_throw_error(importer)(expected)(input) + u.value(), + i === union.length - 1 + ? create_throw_error({ + context: props.context, + functor: props.functor, + input: props.input, + expected: props.metadata.getName(), + }) : undefined, ), ) @@ -396,323 +444,454 @@ export namespace ProtobufEncodeProgrammer { ), ], true, - ); + ), + ); + }; - const decode_map = - (project: IProject) => - (importer: FunctionImporter) => - (index: number) => - ( - input: ts.Expression, - map: Metadata.Entry, - explore: FeatureProgrammer.IExplore, - ): ts.Block => { - const each: ts.Statement[] = [ - ts.factory.createExpressionStatement( - decode_tag(ProtobufWire.LEN)(index), - ), - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("fork"), - undefined, - undefined, - ), - ), - ...decode(project)(importer)(1)( - ts.factory.createIdentifier("key"), - map.key, - explore, - ).statements, - ...decode(project)(importer)(2)( - ts.factory.createIdentifier("value"), - map.value, - explore, - ).statements, - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("ldelim"), - undefined, - undefined, - ), - ), - ]; - return ts.factory.createBlock( - [ - ts.factory.createForOfStatement( - undefined, - StatementFactory.entry("key")("value"), - input, - ts.factory.createBlock(each), - ), - ], - true, - ); - }; + /* ----------------------------------------------------------- + ATOMIC DECODERS + ----------------------------------------------------------- */ + const decode_bool = (props: { + input: ts.Expression; + index: number | null; + }): ts.Block => + ts.factory.createBlock( + [ + ...(props.index !== null + ? [ + decode_tag({ + wire: ProtobufWire.VARIANT, + index: props.index, + }), + ] + : []), + callWriter("bool", [props.input]), + ].map((exp) => ts.factory.createExpressionStatement(exp)), + true, + ); - const decode_object = - (project: IProject) => - (importer: FunctionImporter) => - (index: number | null) => - ( - input: ts.Expression, - object: MetadataObject, - explore: FeatureProgrammer.IExplore, - ): ts.Block => { - const top: MetadataProperty = object.properties[0]!; - if (top.key.isSoleLiteral() === false) - return decode_map(project)(importer)(index!)( - ts.factory.createCallExpression( - ts.factory.createIdentifier("Object.entries"), - [], - [input], + const decode_bigint = (props: { + candidates: ProtobufAtomic.BigNumeric[]; + type: ProtobufAtomic.BigNumeric; + input: ts.Expression; + index: number | null; + }): IUnion => ({ + is: () => + props.candidates.length === 1 + ? ts.factory.createStrictEquality( + ts.factory.createStringLiteral("bigint"), + ts.factory.createTypeOfExpression(props.input), + ) + : ts.factory.createLogicalAnd( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("bigint"), + ts.factory.createTypeOfExpression(props.input), + ), + NumericRangeFactory.bigint(props.type, props.input), ), - MetadataProperty.create({ - ...top, - key: (() => { - const key: Metadata = Metadata.initialize(); - key.atomics.push( - MetadataAtomic.create({ - type: "string", - tags: [], - }), - ); - return key; - })(), - }), - explore, - ); - return ts.factory.createBlock( + value: () => + ts.factory.createBlock( [ - ts.factory.createIdentifier( - `//${index !== null ? ` ${index} -> ` : ""}${object.name}`, - ), - ...(index !== null + ...(props.index !== null ? [ - decode_tag(ProtobufWire.LEN)(index), - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("fork"), - undefined, - undefined, - ), + decode_tag({ + wire: ProtobufWire.VARIANT, + index: props.index, + }), ] : []), - ts.factory.createCallExpression( - ts.factory.createIdentifier( - importer.useLocal(`${PREFIX}o${object.index}`), + callWriter(props.type, [props.input]), + ].map((exp) => ts.factory.createExpressionStatement(exp)), + true, + ), + }); + + const decode_number = (props: { + candidates: ProtobufAtomic.Numeric[]; + type: ProtobufAtomic.Numeric; + input: ts.Expression; + index: number | null; + }): IUnion => ({ + is: () => + props.candidates.length === 1 + ? ts.factory.createStrictEquality( + ts.factory.createStringLiteral("number"), + ts.factory.createTypeOfExpression(props.input), + ) + : ts.factory.createLogicalAnd( + ts.factory.createStrictEquality( + ts.factory.createStringLiteral("number"), + ts.factory.createTypeOfExpression(props.input), ), - [], - [input], + NumericRangeFactory.number(props.type, props.input), ), - ...(index !== null + value: () => + ts.factory.createBlock( + [ + ...(props.index !== null ? [ - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("ldelim"), - undefined, - undefined, - ), + decode_tag({ + wire: get_numeric_wire(props.type), + index: props.index, + }), ] : []), - ].map((expr) => ts.factory.createExpressionStatement(expr)), + callWriter(props.type, [props.input]), + ].map((exp) => ts.factory.createExpressionStatement(exp)), true, - ); - }; + ), + }); + + const decode_container_value = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + schema: IProtobufPropertyType.IArray["value"]; + index: number; + kind: "array" | "map"; + input: ts.Expression; + }): ts.Block => { + if (props.schema.type === "bool") + return decode_bool({ + input: props.input, + index: props.kind === "array" ? null : props.index, + }); + else if (props.schema.type === "bigint") + return decode_bigint({ + input: props.input, + type: props.schema.name, + candidates: [props.schema.name], + index: props.kind === "array" ? null : props.index, + }).value(); + else if (props.schema.type === "number") + return decode_number({ + input: props.input, + type: props.schema.name, + candidates: [props.schema.name], + index: props.kind === "array" ? null : props.index, + }).value(); + else if (props.schema.type === "string" || props.schema.type === "bytes") + return decode_bytes({ + method: props.schema.type, + input: props.input, + index: props.index, + }); + return decode_object({ + context: props.context, + functor: props.functor, + schema: props.schema, + input: props.input, + index: props.index, + }); + }; - const decode_array = - (project: IProject) => - (importer: FunctionImporter) => - (index: number) => - ( - input: ts.Expression, - array: MetadataArray, - explore: FeatureProgrammer.IExplore, - ): ts.Block => { - const wire = get_standalone_wire(array.type.value); - const forLoop = (index: number | null) => - ts.factory.createForOfStatement( - undefined, - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration("elem")], - ts.NodeFlags.Const, - ), - input, - decode(project)(importer)(index)( - ts.factory.createIdentifier("elem"), - array.type.value, - explore, - ), - ); - const length = (block: ts.Block) => - ts.factory.createBlock( - [ - ts.factory.createIfStatement( - ts.factory.createStrictInequality( - ExpressionFactory.number(0), - IdentifierFactory.access(input)("length"), - ), - block, - ), - ], - true, - ); + /* ----------------------------------------------------------- + INSTANCE DECODERS + ----------------------------------------------------------- */ + const decode_bytes = (props: { + method: "bytes" | "string"; + index: number; + input: ts.Expression; + }): ts.Block => + ts.factory.createBlock( + [ + decode_tag({ + wire: ProtobufWire.LEN, + index: props.index, + }), + callWriter(props.method, [props.input]), + ].map((expr) => ts.factory.createExpressionStatement(expr)), + true, + ); - if (wire === ProtobufWire.LEN) - return length(ts.factory.createBlock([forLoop(index)], true)); - return length( - ts.factory.createBlock( - [ - ts.factory.createExpressionStatement( - decode_tag(ProtobufWire.LEN)(index), - ), - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("fork"), - undefined, - undefined, - ), - ), - forLoop(null), - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("ldelim"), - undefined, - undefined, - ), - ), - ], - true, + const decode_array = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + schema: IProtobufPropertyType.IArray; + input: ts.Expression; + }): ts.Block => { + const value: IProtobufPropertyType.IArray["value"] = props.schema.value; + const wire: ProtobufWire = (() => { + if ( + value.type === "object" || + value.type === "bytes" || + value.type === "string" + ) + return ProtobufWire.LEN; + else if (value.type === "number" && value.name === "float") + return ProtobufWire.I32; + return ProtobufWire.VARIANT; + })(); + const forLoop = () => + ts.factory.createForOfStatement( + undefined, + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration("elem")], + ts.NodeFlags.Const, ), + props.input, + decode_container_value({ + kind: "array", + context: props.context, + functor: props.functor, + input: ts.factory.createIdentifier("elem"), + index: props.schema.index, + schema: props.schema.value, + }), ); - }; + const length = (block: ts.Block) => + ts.factory.createBlock( + [ + ts.factory.createIfStatement( + ts.factory.createStrictInequality( + ExpressionFactory.number(0), + IdentifierFactory.access(props.input, "length"), + ), + block, + ), + ], + true, + ); + if (wire === ProtobufWire.LEN) + return length(ts.factory.createBlock([forLoop()], true)); + return length( + ts.factory.createBlock( + [ + ts.factory.createExpressionStatement( + decode_tag({ + wire: ProtobufWire.LEN, + index: props.schema.index, + }), + ), + ts.factory.createExpressionStatement(callWriter("fork")), + forLoop(), + ts.factory.createExpressionStatement(callWriter("ldelim")), + ], + true, + ), + ); + }; - const decode_bool = (index: number | null) => (input: ts.Expression) => + const decode_object = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + schema: IProtobufSchema.IObject; + index: number; + input: ts.Expression; + }): ts.Block => ts.factory.createBlock( [ - ...(index !== null ? [decode_tag(ProtobufWire.VARIANT)(index)] : []), + decode_tag({ + wire: ProtobufWire.LEN, + index: props.index, + }), + callWriter("fork"), ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("bool"), - undefined, - [input], + ts.factory.createIdentifier( + props.functor.useLocal(`${PREFIX}o${props.schema.object.index}`), + ), + [], + [props.input], ), - ].map((exp) => ts.factory.createExpressionStatement(exp)), + callWriter("ldelim"), + ].map(ts.factory.createExpressionStatement), true, ); - const decode_number = - (candidates: ProtobufAtomic.Numeric[]) => - (type: ProtobufAtomic.Numeric) => - (input: ts.Expression): IUnion => ({ - type, - is: () => - candidates.length === 1 - ? ts.factory.createStrictEquality( - ts.factory.createStringLiteral("number"), - ts.factory.createTypeOfExpression(input), - ) - : ts.factory.createLogicalAnd( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("number"), - ts.factory.createTypeOfExpression(input), - ), - NumericRangeFactory.number(type)(input), - ), - value: (index) => - ts.factory.createBlock( - [ - ...(index !== null - ? [decode_tag(get_numeric_wire(type))(index)] - : []), - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())(type), - undefined, - [input], - ), - ].map((exp) => ts.factory.createExpressionStatement(exp)), - true, + const decode_map = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + schema: IProtobufPropertyType.IMap; + input: ts.Expression; + }): ts.Block => { + const each: ts.Statement[] = [ + ts.factory.createExpressionStatement( + decode_tag({ + wire: ProtobufWire.LEN, + index: props.schema.index, + }), + ), + ts.factory.createExpressionStatement(callWriter("fork")), + ...decode_container_value({ + kind: "map", + context: props.context, + functor: props.functor, + index: 1, + input: ts.factory.createIdentifier("key"), + schema: props.schema.key, + }).statements, + ...decode_container_value({ + kind: "map", + context: props.context, + functor: props.functor, + index: 2, + input: ts.factory.createIdentifier("value"), + schema: props.schema.value, + }).statements, + ts.factory.createExpressionStatement(callWriter("ldelim")), + ]; + return ts.factory.createBlock( + [ + ts.factory.createForOfStatement( + undefined, + StatementFactory.entry({ + key: "key", + value: "value", + }), + props.input, + ts.factory.createBlock(each), ), - }); + ], + true, + ); + }; - const decode_bigint = - (candidates: ProtobufAtomic.BigNumeric[]) => - (type: ProtobufAtomic.BigNumeric) => - (input: ts.Expression): IUnion => ({ - type, - is: () => - candidates.length === 1 - ? ts.factory.createStrictEquality( - ts.factory.createStringLiteral("bigint"), - ts.factory.createTypeOfExpression(input), - ) - : ts.factory.createLogicalAnd( - ts.factory.createStrictEquality( - ts.factory.createStringLiteral("bigint"), - ts.factory.createTypeOfExpression(input), + const explore_objects = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + level: number; + input: ts.Expression; + schemas: Array; + explore: FeatureProgrammer.IExplore; + }): ts.Block => { + const out = ( + schema: IProtobufPropertyType.IObject | IProtobufPropertyType.IMap, + ) => + schema.type === "object" + ? decode_object({ + context: props.context, + functor: props.functor, + schema, + index: schema.index, + input: props.input, + }) + : decode_map({ + context: props.context, + functor: props.functor, + schema, + input: ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier("Object"), + "entries", ), - NumericRangeFactory.bigint(type)(input), - ), - value: (index) => - ts.factory.createBlock( - [ - ...(index !== null - ? [decode_tag(ProtobufWire.VARIANT)(index)] - : []), - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())(type), undefined, - [input], + [props.input], ), - ].map((exp) => ts.factory.createExpressionStatement(exp)), - true, - ), - }); + }); + if (props.schemas.length === 1) return out(props.schemas[0]!); - const decode_bytes = - (method: "bytes" | "string") => - (index: number) => - (input: ts.Expression): ts.Block => - ts.factory.createBlock( - [ - decode_tag(ProtobufWire.LEN)(index), - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())(method), - undefined, - [input], - ), - ].map((expr) => ts.factory.createExpressionStatement(expr)), - true, - ); + const objects: MetadataObjectType[] = props.schemas.map((s) => + s.type === "map" ? (s.map as MetadataObjectType) : s.object, + ); + const expected: string = `(${objects.map((t) => t.name).join(" | ")})`; + const indexes: WeakMap< + MetadataObjectType, + IProtobufPropertyType.IObject | IProtobufPropertyType.IMap + > = new WeakMap(objects.map((o, i) => [o, props.schemas[i]!])); + const specifications: UnionPredicator.ISpecialized[] = + UnionPredicator.object(objects); + + if (specifications.length === 0) { + const condition: ts.Expression = decode_union_object({ + checker: (v) => + IsProgrammer.decode_object({ + context: props.context, + functor: props.functor, + object: v.object, + input: v.input, + explore: v.explore, + }), + decoder: (v) => ExpressionFactory.selfCall(out(indexes.get(v.object)!)), + success: (expr) => expr, + escaper: (v) => + create_throw_error({ + context: props.context, + functor: props.functor, + expected: v.expected, + input: v.input, + }), + input: props.input, + explore: props.explore, + objects, + }); + return StatementFactory.block(condition); + } + const remained: MetadataObjectType[] = objects.filter( + (o) => specifications.find((s) => s.object === o) === undefined, + ); - const decode_tag = - (wire: ProtobufWire) => - (index: number): ts.CallExpression => - ts.factory.createCallExpression( - IdentifierFactory.access(WRITER())("uint32"), - undefined, - [ExpressionFactory.number((index << 3) | wire)], + // DO SPECIALIZE + const condition: ts.IfStatement = specifications + .filter((spec) => spec.property.key.getSoleLiteral() !== null) + .map((spec, i, array) => { + const key: string = spec.property.key.getSoleLiteral()!; + const accessor: ts.Expression = IdentifierFactory.access( + props.input, + key, + ); + const pred: ts.Expression = spec.neighbour + ? IsProgrammer.decode({ + context: props.context, + functor: props.functor, + input: accessor, + metadata: spec.property.value, + explore: { + ...props.explore, + tracable: false, + postfix: IdentifierFactory.postfix(key), + }, + }) + : ExpressionFactory.isRequired(accessor); + const schema = indexes.get(spec.object)!; + return ts.factory.createIfStatement( + pred, + ts.factory.createExpressionStatement( + ExpressionFactory.selfCall(out(schema)), + ), + i === array.length - 1 + ? remained.length + ? ts.factory.createExpressionStatement( + ExpressionFactory.selfCall( + explore_objects({ + context: props.context, + functor: props.functor, + level: props.level + 1, + input: props.input, + schemas: remained.map((r) => indexes.get(r)!), + explore: props.explore, + }), + ), + ) + : create_throw_error({ + context: props.context, + functor: props.functor, + input: props.input, + expected, + }) + : undefined, + ); + }) + .reverse() + .reduce((a, b) => + ts.factory.createIfStatement(b.expression, b.thenStatement, a), ); - const get_standalone_wire = (meta: Metadata): ProtobufWire => { - if ( - meta.arrays.length || - meta.objects.length || - meta.maps.length || - meta.natives.length - ) - return ProtobufWire.LEN; - - const v = ProtobufUtil.getAtomics(meta)[0]!; - if (v === "string") return ProtobufWire.LEN; - else if ( - v === "bool" || - v === "int32" || - v === "uint32" || - v === "int64" || - v === "uint64" - ) - return ProtobufWire.VARIANT; - else if (v === "float") return ProtobufWire.I32; - return ProtobufWire.I64; + // RETURNS WITH CONDITIONS + return ts.factory.createBlock([condition], true); }; + /* ----------------------------------------------------------- + BACKGROUND FUNCTIONS + ----------------------------------------------------------- */ + const PREFIX = "_pe"; + + const decode_tag = (props: { + wire: ProtobufWire; + index: number; + }): ts.CallExpression => + callWriter("uint32", [ + ExpressionFactory.number((props.index << 3) | props.wire), + ]); + const get_numeric_wire = (type: ProtobufAtomic.Numeric) => type === "double" ? ProtobufWire.I64 @@ -720,133 +899,47 @@ export namespace ProtobufEncodeProgrammer { ? ProtobufWire.I32 : ProtobufWire.VARIANT; - /* ----------------------------------------------------------- - EXPLORERS - ----------------------------------------------------------- */ - const explore_objects = - (project: IProject) => - (importer: FunctionImporter) => - (level: number) => - (index: number | null) => - ( - input: ts.Expression, - targets: MetadataObject[], - explore: FeatureProgrammer.IExplore, - indexes?: Map, - ): ts.Block => { - if (targets.length === 1) - return decode_object(project)(importer)( - indexes ? indexes.get(targets[0]!)! : index, - )(input, targets[0]!, explore); - - const expected: string = `(${targets.map((t) => t.name).join(" | ")})`; - - // POSSIBLE TO SPECIALIZE? - const specList = UnionPredicator.object(targets); - indexes ??= new Map(targets.map((t, i) => [t, index! + i])); - - if (specList.length === 0) { - const condition: ts.Expression = decode_union_object( - IsProgrammer.decode_object(project)(importer), - )((i, o, e) => - ExpressionFactory.selfCall( - decode_object(project)(importer)(indexes!.get(o)!)(i, o, e), - ), - )((expr) => expr)((value, expected) => - create_throw_error(importer)(expected)(value), - )(input, targets, explore); - return StatementFactory.block(condition); - } - const remained: MetadataObject[] = targets.filter( - (t) => specList.find((s) => s.object === t) === undefined, - ); - - // DO SPECIALIZE - const condition: ts.IfStatement = specList - .filter((spec) => spec.property.key.getSoleLiteral() !== null) - .map((spec, i, array) => { - const key: string = spec.property.key.getSoleLiteral()!; - const accessor: ts.Expression = IdentifierFactory.access(input)(key); - const pred: ts.Expression = spec.neighbour - ? IsProgrammer.decode(project)(importer)( - accessor, - spec.property.value, - { - ...explore, - tracable: false, - postfix: IdentifierFactory.postfix(key), - }, - ) - : ExpressionFactory.isRequired(accessor); - return ts.factory.createIfStatement( - pred, - ts.factory.createExpressionStatement( - ExpressionFactory.selfCall( - decode_object(project)(importer)(indexes!.get(spec.object)!)( - input, - spec.object, - explore, - ), + const create_throw_error = (props: { + context: ITypiaContext; + functor: FunctionProgrammer; + expected: string; + input: ts.Expression; + }) => + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + props.context.importer.internal("throwTypeGuardError"), + [], + [ + ts.factory.createObjectLiteralExpression( + [ + ts.factory.createPropertyAssignment( + "method", + ts.factory.createStringLiteral(props.functor.method), ), - ), - i === array.length - 1 - ? remained.length - ? ts.factory.createExpressionStatement( - ExpressionFactory.selfCall( - explore_objects(project)(importer)(level + 1)(index)( - input, - remained, - explore, - indexes!, - ), - ), - ) - : create_throw_error(importer)(expected)(input) - : undefined, - ); - }) - .reverse() - .reduce((a, b) => - ts.factory.createIfStatement(b.expression, b.thenStatement, a), - ); - - // RETURNS WITH CONDITIONS - return ts.factory.createBlock([condition], true); - }; - - /* ----------------------------------------------------------- - CONFIGURATIONS - ----------------------------------------------------------- */ - const PREFIX = "$pe"; - - const create_throw_error = - (importer: FunctionImporter) => - (expected: string) => - (value: ts.Expression) => - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - importer.use("throws"), - [], - [ - ts.factory.createObjectLiteralExpression( - [ - ts.factory.createPropertyAssignment( - "expected", - ts.factory.createStringLiteral(expected), - ), - ts.factory.createPropertyAssignment("value", value), - ], - true, - ), - ], - ), - ); + ts.factory.createPropertyAssignment( + "expected", + ts.factory.createStringLiteral(props.expected), + ), + ts.factory.createPropertyAssignment("value", props.input), + ], + true, + ), + ], + ), + ); } -const WRITER = () => ts.factory.createIdentifier("writer"); +const callWriter = ( + method: string, + args?: ts.Expression[], +): ts.CallExpression => + ts.factory.createCallExpression( + IdentifierFactory.access(ts.factory.createIdentifier("writer"), method), + undefined, + args, + ); interface IUnion { - type: string; is: () => ts.Expression; - value: (index: number | null) => ts.Block; + value: () => ts.Block; } diff --git a/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts b/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts index 08d832de46..1bfb3bd98f 100644 --- a/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts @@ -3,32 +3,35 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufDecodeProgrammer } from "./ProtobufDecodeProgrammer"; export namespace ProtobufIsDecodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); const decode: FeatureProgrammer.IDecomposed = ProtobufDecodeProgrammer.decompose(props); @@ -40,8 +43,14 @@ export namespace ProtobufIsDecodeProgrammer { statements: [ ...is.statements, ...decode.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -54,14 +63,14 @@ export namespace ProtobufIsDecodeProgrammer { undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "value", - ts.factory.createCallExpression( + StatementFactory.constant({ + name: "value", + value: ts.factory.createCallExpression( ts.factory.createIdentifier("__decode"), undefined, [ts.factory.createIdentifier("input")], ), - ), + }), ts.factory.createIfStatement( ts.factory.createPrefixUnaryExpression( ts.SyntaxKind.ExclamationToken, @@ -83,22 +92,18 @@ export namespace ProtobufIsDecodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts b/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts index abe7a4bb24..602e0044a1 100644 --- a/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts @@ -4,32 +4,35 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { IsProgrammer } from "../IsProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufEncodeProgrammer } from "./ProtobufEncodeProgrammer"; export namespace ProtobufIsEncodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const is: FeatureProgrammer.IDecomposed = IsProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, + config: { + equals: false, + }, }); const encode: FeatureProgrammer.IDecomposed = ProtobufEncodeProgrammer.decompose(props); @@ -41,8 +44,14 @@ export namespace ProtobufIsEncodeProgrammer { statements: [ ...is.statements, ...encode.statements, - StatementFactory.constant("__is", is.arrow), - StatementFactory.constant("__encode", encode.arrow), + StatementFactory.constant({ + name: "__is", + value: is.arrow, + }), + StatementFactory.constant({ + name: "__encode", + value: encode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, @@ -72,22 +81,18 @@ export namespace ProtobufIsEncodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/protobuf/ProtobufMessageProgrammer.ts b/src/programmers/protobuf/ProtobufMessageProgrammer.ts index 7ba183755f..884dfc43e4 100644 --- a/src/programmers/protobuf/ProtobufMessageProgrammer.ts +++ b/src/programmers/protobuf/ProtobufMessageProgrammer.ts @@ -1,32 +1,44 @@ import ts from "typescript"; +import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { MetadataCollection } from "../../factories/MetadataCollection"; import { ProtobufFactory } from "../../factories/ProtobufFactory"; import { Metadata } from "../../schemas/metadata/Metadata"; -import { MetadataAtomic } from "../../schemas/metadata/MetadataAtomic"; -import { MetadataObject } from "../../schemas/metadata/MetadataObject"; -import { MetadataProperty } from "../../schemas/metadata/MetadataProperty"; +import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType"; +import { IProtobufProperty } from "../../schemas/protobuf/IProtobufProperty"; +import { IProtobufPropertyType } from "../../schemas/protobuf/IProtobufPropertyType"; +import { IProtobufSchema } from "../../schemas/protobuf/IProtobufSchema"; -import { IProject } from "../../transformers/IProject"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { MapUtil } from "../../utils/MapUtil"; -import { NameEncoder } from "../../utils/NameEncoder"; - -import { ProtobufUtil } from "../helpers/ProtobufUtil"; +import { ProtobufNameEncoder } from "../../utils/ProtobufNameEncoder"; export namespace ProtobufMessageProgrammer { - export const write = (project: IProject) => (type: ts.Type) => { + export interface IProps { + context: ITypiaContext; + type: ts.Type; + } + export const write = (props: IProps) => { // PARSE TARGET TYPE const collection: MetadataCollection = new MetadataCollection(); - ProtobufFactory.metadata("message")(project.checker, project.context)( + ProtobufFactory.metadata({ + method: "message", + checker: props.context.checker, + transformer: props.context.transformer, collection, - )(type); + type: props.type, + }); // STRINGIFY const hierarchies: Map = new Map(); - for (const obj of collection.objects()) - if (is_dynamic_object(obj) === false) emplace(hierarchies)(obj); + for (const object of collection.objects()) + if (is_dynamic_object(object) === false) + emplace({ + hierarchies, + object, + }); const content: string = `syntax = "proto3";\n\n` + @@ -35,33 +47,47 @@ export namespace ProtobufMessageProgrammer { .join("\n\n"); // RETURNS - return ts.factory.createStringLiteral(content); + return ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createArrayLiteralExpression( + content.split("\n").map((str) => ts.factory.createStringLiteral(str)), + true, + ), + "join", + ), + undefined, + [ts.factory.createStringLiteral("\n")], + ); }; - const emplace = (dict: Map) => (obj: MetadataObject) => { - const accessors: string[] = obj.name.split("."); + const emplace = (props: { + hierarchies: Map; + object: MetadataObjectType; + }) => { + let hierarchies: Map = props.hierarchies; + const accessors: string[] = props.object.name.split("."); accessors.forEach((access, i) => { - const hierarchy: Hierarchy = MapUtil.take(dict)(access, () => ({ + const hierarchy: Hierarchy = MapUtil.take(hierarchies, access, () => ({ key: access, object: null!, children: new Map(), })); - dict = hierarchy.children; - if (i === accessors.length - 1) hierarchy.object = obj; + hierarchies = hierarchy.children; + if (i === accessors.length - 1) hierarchy.object = props.object; }); }; - const is_dynamic_object = (obj: MetadataObject): boolean => - obj.properties.length === 1 && - obj.properties[0]!.key.isSoleLiteral() === false; + const is_dynamic_object = (object: MetadataObjectType): boolean => + object.properties.length === 1 && + object.properties[0]!.key.isSoleLiteral() === false; const write_hierarchy = (hierarchy: Hierarchy): string => { const elements: string[] = [ - `message ${NameEncoder.encode(hierarchy.key)} {`, + `message ${ProtobufNameEncoder.encode(hierarchy.key)} {`, ]; if (hierarchy.object !== null) { const text: string = write_object(hierarchy.object); - elements.push(...text.split("\n").map((str) => `${TAB}${str}`)); + elements.push(...text.split("\n").map((str) => ` ${str}`)); } if (hierarchy.children.size) elements.push( @@ -70,7 +96,7 @@ export namespace ProtobufMessageProgrammer { .map((body) => body .split("\n") - .map((line) => `${TAB}${line}`) + .map((line) => ` ${line}`) .join("\n"), ) .join("\n\n"), @@ -79,82 +105,75 @@ export namespace ProtobufMessageProgrammer { return elements.join("\n"); }; - const write_object = (obj: MetadataObject): string => { - const ptr: IPointer = { value: 0 }; + const write_object = (obj: MetadataObjectType): string => { return obj.properties - .map((prop) => { - const key: string = prop.key.getSoleLiteral()!; - const type: string = decode(ptr)(prop.value); - return type.indexOf("${name}") !== -1 - ? type.replace("${name}", key) - : `${ - prop.value.arrays.length || type.startsWith("map<") - ? "" - : !prop.value.isRequired() || prop.value.nullable - ? "optional " - : "required " - }${type} ${key} = ${++ptr.value};`; + .map((p) => { + if (p.of_protobuf_ === undefined) ProtobufFactory.emplaceObject(obj); + const schema: IProtobufProperty = p.of_protobuf_!; + const key: string = p.key.getSoleLiteral()!; + return decodeProperty({ + key, + value: p.value, + union: schema.union, + }); }) .join("\n"); }; /* ----------------------------------------------------------- - DECODERS - ----------------------------------------------------------- */ - const decode = - (ptr: IPointer) => - (meta: Metadata): string => { - const elements: Set = new Set(); - if (meta.natives.length) elements.add("bytes"); - for (const atomic of ProtobufUtil.getAtomics(meta)) elements.add(atomic); - for (const array of meta.arrays) - elements.add(`repeated ${decode(ptr)(array.type.value)}`); - for (const obj of meta.objects) - elements.add( - is_dynamic_object(obj) - ? decode_map(ptr)( - MetadataProperty.create({ - ...obj.properties[0]!, - key: (() => { - const key: Metadata = Metadata.initialize(); - key.atomics.push( - MetadataAtomic.create({ - type: "string", - tags: [], - }), - ); - return key; - })(), - }), - ) - : NameEncoder.encode(obj.name), - ); - for (const map of meta.maps) elements.add(decode_map(ptr)(map)); - return elements.size === 1 - ? [...elements][0]! - : [ - "oneof ${name} {", - ...[...elements].map( - (str) => `${TAB}${str} v${ptr.value + 1} = ${++ptr.value};`, - ), - "}", - ].join("\n"); - }; + DECODERS + ----------------------------------------------------------- */ + const decodeProperty = (props: { + key: string; + value: Metadata; + union: IProtobufPropertyType[]; + }): string => { + if (props.union.length === 1) { + const top = props.union[0]!; + return [ + ...(top.type === "array" || top.type === "map" + ? [] + : [ + props.value.isRequired() && props.value.nullable === false + ? "required" + : "optional", + ]), + decodeSchema(top), + props.key, + "=", + `${top.index};`, + ].join(" "); + } + return [ + `oneof ${props.key} {`, + ...props.union + .map((type) => `${decodeSchema(type)} v${type.index} = ${type.index};`) + .map((str) => str.split("\n")) + .map((str) => ` ${str}`), + `}`, + ].join("\n"); + }; - const decode_map = - (ptr: IPointer) => - (prop: Metadata.Entry): string => - `map<${decode(ptr)(prop.key)}, ${decode(ptr)(prop.value)}>`; + const decodeSchema = (schema: IProtobufSchema): string => { + if ( + schema.type === "bytes" || + schema.type === "bool" || + schema.type === "string" + ) + return schema.type; + else if (schema.type === "bigint" || schema.type === "number") + return schema.name; + else if (schema.type === "array") + return `repeated ${decodeSchema(schema.value)}`; + else if (schema.type === "object") + return ProtobufNameEncoder.encode(schema.object.name); + // else if (schema.type === "map") + return `map<${decodeSchema(schema.key)}, ${decodeSchema(schema.value)}>`; + }; } interface Hierarchy { key: string; - object: MetadataObject | null; + object: MetadataObjectType | null; children: Map; } - -interface IPointer { - value: T; -} - -const TAB = " ".repeat(2); diff --git a/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts b/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts index f130ded784..44decec868 100644 --- a/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts @@ -3,32 +3,35 @@ import ts from "typescript"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufDecodeProgrammer } from "./ProtobufDecodeProgrammer"; export namespace ProtobufValidateDecodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: false, }, }, - equals: false, + config: { + equals: false, + }, }); const decode = ProtobufDecodeProgrammer.decompose(props); return { @@ -38,16 +41,24 @@ export namespace ProtobufValidateDecodeProgrammer { }, statements: [ ...validate.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__decode", decode.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__decode", + value: decode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, decode.arrow.parameters, - ts.factory.createTypeReferenceNode("typia.IValidation", [ - decode.arrow.type ?? TypeFactory.keyword("any"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [decode.arrow.type ?? TypeFactory.keyword("any")], + }), undefined, ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), @@ -64,22 +75,18 @@ export namespace ProtobufValidateDecodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts b/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts index d49d30316a..8354518791 100644 --- a/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts @@ -4,32 +4,35 @@ import { IdentifierFactory } from "../../factories/IdentifierFactory"; import { StatementFactory } from "../../factories/StatementFactory"; import { TypeFactory } from "../../factories/TypeFactory"; -import { IProject } from "../../transformers/IProject"; +import { IProgrammerProps } from "../../transformers/IProgrammerProps"; +import { ITypiaContext } from "../../transformers/ITypiaContext"; import { FeatureProgrammer } from "../FeatureProgrammer"; import { ValidateProgrammer } from "../ValidateProgrammer"; -import { FunctionImporter } from "../helpers/FunctionImporter"; +import { FunctionProgrammer } from "../helpers/FunctionProgrammer"; import { ProtobufEncodeProgrammer } from "./ProtobufEncodeProgrammer"; export namespace ProtobufValidateEncodeProgrammer { export const decompose = (props: { - project: IProject; + context: ITypiaContext; modulo: ts.LeftHandSideExpression; - importer: FunctionImporter; + functor: FunctionProgrammer; type: ts.Type; name: string | undefined; }): FeatureProgrammer.IDecomposed => { const validate = ValidateProgrammer.decompose({ ...props, - project: { - ...props.project, + context: { + ...props.context, options: { - ...props.project.options, + ...props.context.options, functional: false, numeric: true, }, }, - equals: false, + config: { + equals: false, + }, }); const encode = ProtobufEncodeProgrammer.decompose(props); return { @@ -40,22 +43,33 @@ export namespace ProtobufValidateEncodeProgrammer { statements: [ ...validate.statements, ...encode.statements, - StatementFactory.constant("__validate", validate.arrow), - StatementFactory.constant("__encode", encode.arrow), + StatementFactory.constant({ + name: "__validate", + value: validate.arrow, + }), + StatementFactory.constant({ + name: "__encode", + value: encode.arrow, + }), ], arrow: ts.factory.createArrowFunction( undefined, undefined, [IdentifierFactory.parameter("input", TypeFactory.keyword("any"))], - ts.factory.createTypeReferenceNode("typia.IValidation", [ - encode.arrow.type ?? ts.factory.createTypeReferenceNode("Uint8Array"), - ]), + props.context.importer.type({ + file: "typia", + name: "IValidation", + arguments: [ + encode.arrow.type ?? + ts.factory.createTypeReferenceNode("Uint8Array"), + ], + }), undefined, ts.factory.createBlock( [ - StatementFactory.constant( - "result", - ts.factory.createAsExpression( + StatementFactory.constant({ + name: "result", + value: ts.factory.createAsExpression( ts.factory.createCallExpression( ts.factory.createIdentifier("__validate"), undefined, @@ -63,7 +77,7 @@ export namespace ProtobufValidateEncodeProgrammer { ), TypeFactory.keyword("any"), ), - ), + }), ts.factory.createIfStatement( ts.factory.createIdentifier("result.success"), ts.factory.createExpressionStatement( @@ -88,22 +102,18 @@ export namespace ProtobufValidateEncodeProgrammer { }; }; - export const write = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (type: ts.Type, name?: string): ts.CallExpression => { - const importer: FunctionImporter = new FunctionImporter(modulo.getText()); - const result: FeatureProgrammer.IDecomposed = decompose({ - project, - modulo, - importer, - type, - name, - }); - return FeatureProgrammer.writeDecomposed({ - modulo, - importer, - result, - }); - }; + export const write = (props: IProgrammerProps): ts.CallExpression => { + const functor: FunctionProgrammer = new FunctionProgrammer( + props.modulo.getText(), + ); + const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, + functor, + }); + return FeatureProgrammer.writeDecomposed({ + modulo: props.modulo, + functor, + result, + }); + }; } diff --git a/src/protobuf.ts b/src/protobuf.ts index 651fd0afc5..7b81ab5999 100644 --- a/src/protobuf.ts +++ b/src/protobuf.ts @@ -1,5 +1,3 @@ -import * as Namespace from "./functional/Namespace"; - import { IValidation } from "./IValidation"; import { Resolved } from "./Resolved"; import { TypeGuardError } from "./TypeGuardError"; @@ -95,7 +93,7 @@ export function message(): never { * * @author Jeongho Nam - https://github.com/samchon */ -function decode(input: Uint8Array): never; +export function decode(input: Uint8Array): never; /** * Protocol Buffer Decoder. @@ -125,19 +123,14 @@ function decode(input: Uint8Array): never; * * @author Jeongho Nam - https://github.com/samchon */ -function decode(input: Uint8Array): Resolved; +export function decode(input: Uint8Array): Resolved; /** * @internal */ -function decode(): never { +export function decode(): never { halt("decode"); } -const decodePure = /** @__PURE__ */ Object.assign( - decode, - /** @__PURE__ */ Namespace.protobuf.decode("decode"), -); -export { decodePure as decode }; /** * > You must configure the generic argument `T`. @@ -169,7 +162,7 @@ export { decodePure as decode }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertDecode( +export function assertDecode( input: Uint8Array, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -202,7 +195,7 @@ function assertDecode( * * @author Jeongho Nam - https://github.com/samchon */ -function assertDecode( +export function assertDecode( input: Uint8Array, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Resolved; @@ -210,21 +203,10 @@ function assertDecode( /** * @internal */ -function assertDecode(): never { +export function assertDecode(): never { halt("assertDecode"); } -const assertDecodePure = /** @__PURE__ */ Object.assign< - typeof assertDecode, - {}, - {} ->( - assertDecode, - /** @__PURE__ */ Namespace.assert("protobuf.assertDecode"), - /** @__PURE__ */ Namespace.protobuf.decode("assertDecode"), -); -export { assertDecodePure as assertDecode }; - /** * > You must configure the generic argument `T`. * @@ -254,7 +236,7 @@ export { assertDecodePure as assertDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function isDecode(input: Uint8Array): never; +export function isDecode(input: Uint8Array): never; /** * Protocol Buffer Decoder wity type checking, but not safe. @@ -283,20 +265,14 @@ function isDecode(input: Uint8Array): never; * * @author Jeongho Nam - https://github.com/samchon */ -function isDecode(input: Uint8Array): Resolved | null; +export function isDecode(input: Uint8Array): Resolved | null; /** * @internal */ -function isDecode(): never { +export function isDecode(): never { halt("isDecode"); } -const isDecodePure = /** @__PURE__ */ Object.assign( - isDecode, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.protobuf.decode("isDecode"), -); -export { isDecodePure as isDecode }; /** * > You must configure the generic argument `T`. @@ -328,7 +304,7 @@ export { isDecodePure as isDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateDecode(input: Uint8Array): never; +export function validateDecode(input: Uint8Array): never; /** * Protocol Buffer Decoder wity type validation, but not safe. @@ -358,24 +334,14 @@ function validateDecode(input: Uint8Array): never; * * @author Jeongho Nam - https://github.com/samchon */ -function validateDecode(input: Uint8Array): IValidation>; +export function validateDecode(input: Uint8Array): IValidation>; /** * @internal */ -function validateDecode(): never { +export function validateDecode(): never { halt("validateDecode"); } -const validateDecodePure = /** @__PURE__ */ Object.assign< - typeof validateDecode, - {}, - {} ->( - validateDecode, - /** @__PURE__ */ Namespace.validate(), - /** @__PURE__ */ Namespace.protobuf.decode("validateDecode"), -); -export { validateDecodePure as validateDecode }; /* ----------------------------------------------------------- ENCODE @@ -407,19 +373,14 @@ export { validateDecodePure as validateDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function encode(input: T): Uint8Array; +export function encode(input: T): Uint8Array; /** * @internal */ -function encode(): never { +export function encode(): never { halt("encode"); } -const encodePure = /** @__PURE__ */ Object.assign( - encode, - /** @__PURE__ */ Namespace.protobuf.encode("encode"), -); -export { encodePure as encode }; /** * Protocol Buffer Encoder with type assertion. @@ -453,7 +414,7 @@ export { encodePure as encode }; * * @author Jeongho Nam - https://github.com/samchon */ -function assertEncode( +export function assertEncode( input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Uint8Array; @@ -490,7 +451,7 @@ function assertEncode( * * @author Jeongho Nam - https://github.com/samchon */ -function assertEncode( +export function assertEncode( input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): Uint8Array; @@ -498,19 +459,9 @@ function assertEncode( /** * @internal */ -function assertEncode(): never { +export function assertEncode(): never { halt("assertEncode"); } -const assertEncodePure = /** @__PURE__ */ Object.assign< - typeof assertEncode, - {}, - {} ->( - assertEncode, - /** @__PURE__ */ Namespace.assert("protobuf.assertEncode"), - /** @__PURE__ */ Namespace.protobuf.encode("assertEncode"), -); -export { assertEncodePure as assertEncode }; /** * Protocol Buffer Encoder with type checking. @@ -543,7 +494,7 @@ export { assertEncodePure as assertEncode }; * * @author Jeongho Nam - https://github.com/samchon */ -function isEncode(input: T): Uint8Array | null; +export function isEncode(input: T): Uint8Array | null; /** * Protocol Buffer Encoder with type checking. @@ -576,20 +527,14 @@ function isEncode(input: T): Uint8Array | null; * * @author Jeongho Nam - https://github.com/samchon */ -function isEncode(input: unknown): Uint8Array | null; +export function isEncode(input: unknown): Uint8Array | null; /** * @internal */ -function isEncode(): never { +export function isEncode(): never { halt("isEncode"); } -const isEncodePure = /** @__PURE__ */ Object.assign( - isEncode, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.protobuf.encode("isEncode"), -); -export { isEncodePure as isEncode }; /** * Protocol Buffer Encoder with type validation. @@ -623,7 +568,7 @@ export { isEncodePure as isEncode }; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEncode(input: T): IValidation; +export function validateEncode(input: T): IValidation; /** * Protocol Buffer Encoder with type validation. @@ -657,24 +602,14 @@ function validateEncode(input: T): IValidation; * * @author Jeongho Nam - https://github.com/samchon */ -function validateEncode(input: unknown): IValidation; +export function validateEncode(input: unknown): IValidation; /** * @internal */ -function validateEncode(): never { +export function validateEncode(): never { halt("validateEncode"); } -const validateEncodePure = /** @__PURE__ */ Object.assign< - typeof validateEncode, - {}, - {} ->( - validateEncode, - /** @__PURE__ */ Namespace.validate(), - /** @__PURE__ */ Namespace.protobuf.encode("validateEncode"), -); -export { validateEncodePure as validateEncode }; /* ----------------------------------------------------------- FACTORY FUNCTIONS @@ -688,7 +623,7 @@ export { validateEncodePure as validateEncode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createDecode(): never; +export function createDecode(): never; /** * Creates a reusable {@link decode} function. @@ -698,19 +633,14 @@ function createDecode(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createDecode(): (input: Uint8Array) => Resolved; +export function createDecode(): (input: Uint8Array) => Resolved; /** * @internal */ -function createDecode(): (input: Uint8Array) => Resolved { +export function createDecode(): (input: Uint8Array) => Resolved { halt("createDecode"); } -const createDecodePure = /** @__PURE__ */ Object.assign< - typeof createDecode, - {} ->(createDecode, /** @__PURE__ */ Namespace.protobuf.decode("createDecode")); -export { createDecodePure as createDecode }; /** * Creates a reusable {@link isDecode} function. @@ -721,7 +651,7 @@ export { createDecodePure as createDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsDecode(): never; +export function createIsDecode(): never; /** * Creates a reusable {@link isDecode} function. @@ -731,24 +661,14 @@ function createIsDecode(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsDecode(): (input: Uint8Array) => Resolved | null; +export function createIsDecode(): (input: Uint8Array) => Resolved | null; /** * @internal */ -function createIsDecode(): (input: Uint8Array) => Resolved | null { +export function createIsDecode(): (input: Uint8Array) => Resolved | null { halt("createIsDecode"); } -const createIsDecodePure = /** @__PURE__ */ Object.assign< - typeof createIsDecode, - {}, - {} ->( - createIsDecode, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.protobuf.decode("createIsDecode"), -); -export { createIsDecodePure as createIsDecode }; /** * Creates a reusable {@link assertDecode} function. @@ -760,7 +680,7 @@ export { createIsDecodePure as createIsDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertDecode( +export function createAssertDecode( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -773,26 +693,16 @@ function createAssertDecode( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertDecode( +export function createAssertDecode( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: Uint8Array) => Resolved; /** * @internal */ -function createAssertDecode(): (input: Uint8Array) => Resolved { +export function createAssertDecode(): (input: Uint8Array) => Resolved { halt("createAssertDecode"); } -const createAssertDecodePure = /** @__PURE__ */ Object.assign< - typeof createAssertDecode, - {}, - {} ->( - createAssertDecode, - /** @__PURE__ */ Namespace.assert("protobuf.createAssertDecode"), - /** @__PURE__ */ Namespace.protobuf.decode("createAssertDecode"), -); -export { createAssertDecodePure as createAssertDecode }; /** * Creates a reusable {@link validateDecode} function. @@ -803,7 +713,7 @@ export { createAssertDecodePure as createAssertDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateDecode(): never; +export function createValidateDecode(): never; /** * Creates a reusable {@link validateDecode} function. @@ -813,28 +723,18 @@ function createValidateDecode(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateDecode(): ( +export function createValidateDecode(): ( input: Uint8Array, ) => IValidation>; /** * @internal */ -function createValidateDecode(): ( +export function createValidateDecode(): ( input: Uint8Array, ) => IValidation> { halt("createValidateDecode"); } -const createValidateDecodePure = /** @__PURE__ */ Object.assign< - typeof createValidateDecode, - {}, - {} ->( - createValidateDecode, - /** @__PURE__ */ Namespace.validate(), - /** @__PURE__ */ Namespace.protobuf.decode("createValidateDecode"), -); -export { createValidateDecodePure as createValidateDecode }; /** * Creates a reusable {@link encode} function. @@ -845,7 +745,7 @@ export { createValidateDecodePure as createValidateDecode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createEncode(): never; +export function createEncode(): never; /** * Creates a reusable {@link encode} function. @@ -855,19 +755,14 @@ function createEncode(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createEncode(): (input: T) => Uint8Array; +export function createEncode(): (input: T) => Uint8Array; /** * @internal */ -function createEncode(): (input: T) => Uint8Array { +export function createEncode(): (input: T) => Uint8Array { halt("createEncode"); } -const createEncodePure = /** @__PURE__ */ Object.assign< - typeof createEncode, - {} ->(createEncode, /** @__PURE__ */ Namespace.protobuf.encode("createEncode")); -export { createEncodePure as createEncode }; /** * Creates a reusable {@link isEncode} function. @@ -878,7 +773,7 @@ export { createEncodePure as createEncode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsEncode(): never; +export function createIsEncode(): never; /** * Creates a reusable {@link isEncode} function. @@ -888,24 +783,14 @@ function createIsEncode(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createIsEncode(): (input: T) => Uint8Array | null; +export function createIsEncode(): (input: T) => Uint8Array | null; /** * @internal */ -function createIsEncode(): (input: T) => Uint8Array | null { +export function createIsEncode(): (input: T) => Uint8Array | null { halt("createIsEncode"); } -const createIsEncodePure = /** @__PURE__ */ Object.assign< - typeof createIsEncode, - {}, - {} ->( - createIsEncode, - /** @__PURE__ */ Namespace.is(), - /** @__PURE__ */ Namespace.protobuf.encode("createIsEncode"), -); -export { createIsEncodePure as createIsEncode }; /** * Creates a reusable {@link assertEncode} function. @@ -917,7 +802,7 @@ export { createIsEncodePure as createIsEncode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertEncode( +export function createAssertEncode( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): never; @@ -930,26 +815,16 @@ function createAssertEncode( * * @author Jeongho Nam - https://github.com/samchon */ -function createAssertEncode( +export function createAssertEncode( errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error), ): (input: T) => Uint8Array; /** * @internal */ -function createAssertEncode(): (input: T) => Uint8Array { +export function createAssertEncode(): (input: T) => Uint8Array { halt("createAssertEncode"); } -const createAssertEncodePure = /** @__PURE__ */ Object.assign< - typeof createAssertEncode, - {}, - {} ->( - createAssertEncode, - /** @__PURE__ */ Namespace.assert("protobuf.createAssertEncode"), - /** @__PURE__ */ Namespace.protobuf.encode("createAssertEncode"), -); -export { createAssertEncodePure as createAssertEncode }; /** * Creates a reusable {@link validateEncode} function. @@ -960,7 +835,7 @@ export { createAssertEncodePure as createAssertEncode }; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateEncode(): never; +export function createValidateEncode(): never; /** * Creates a reusable {@link validateEncode} function. @@ -970,24 +845,18 @@ function createValidateEncode(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function createValidateEncode(): (input: T) => IValidation; +export function createValidateEncode(): ( + input: T, +) => IValidation; /** * @internal */ -function createValidateEncode(): (input: T) => IValidation { +export function createValidateEncode(): ( + input: T, +) => IValidation { halt("createValidateEncode"); } -const createValidateEncodePure = /** @__PURE__ */ Object.assign< - typeof createValidateEncode, - {}, - {} ->( - createValidateEncode, - /** @__PURE__ */ Namespace.validate(), - /** @__PURE__ */ Namespace.protobuf.encode("createValidateEncode"), -); -export { createValidateEncodePure as createValidateEncode }; /** * @internal diff --git a/src/reflect.ts b/src/reflect.ts index f54512fcb4..270050ddbc 100644 --- a/src/reflect.ts +++ b/src/reflect.ts @@ -16,7 +16,7 @@ import { IMetadataApplication } from "./schemas/metadata/IMetadataApplication"; * * @author Jeongho Nam - https://github.com/samchon */ -function metadata(): never; +export function metadata(): never; /** * Metadata Application. @@ -32,21 +32,15 @@ function metadata(): never; * * @author Jeongho Nam - https://github.com/samchon */ -function metadata(): IMetadataApplication; +export function metadata(): IMetadataApplication; /** * @internal */ -function metadata(): never { +export function metadata(): never { halt("metadata"); } -const metadataPure = /** @__PURE__ */ Object.assign( - metadata, - { from: (input: unknown) => input }, -); -export { metadataPure as metadata }; - export function name(): string; export function name(): never; export function name(): never { diff --git a/src/schemas/json/IJsonApplication.ts b/src/schemas/json/IJsonApplication.ts index eab66010e4..073edca6bd 100644 --- a/src/schemas/json/IJsonApplication.ts +++ b/src/schemas/json/IJsonApplication.ts @@ -1,22 +1,73 @@ -import type { OpenApi, OpenApiV3 } from "@samchon/openapi"; +import { IJsonSchemaCollection } from "./IJsonSchemaCollection"; -export type IJsonApplication< - Version extends "3.0" | "3.1" = "3.1", - Types = unknown[], -> = Version extends "3.0" - ? IJsonApplication.IV3_0 - : IJsonApplication.IV3_1; -export namespace IJsonApplication { - export interface IV3_0 { - version: "3.0"; - schemas: OpenApiV3.IJsonSchema[]; - components: OpenApiV3.IComponents; - __types?: Types | undefined; - } - export interface IV3_1 { - version: "3.1"; - components: OpenApi.IComponents; - schemas: OpenApi.IJsonSchema[]; - __types?: Types | undefined; - } -} +/** + * Collection of JSON schemas. + * + * @deprecated Use {@link IJsonSchemaCollection} instead please. + * This interface type would be changed to {@link ILlmApplication} like + * structure in the future version (maybe next v8 major update). + * @template Version Version of the OpenAPI specification. + * @template Types Original TypeScript types used in the JSON schemas. + * @author Jeongho Nam - https://github.com/samchon + */ +export import IJsonApplication = IJsonSchemaCollection; + +// export interface IJsonApplication< +// Version extends "3.0" | "3.1" = "3.1", +// App extends any = object, +// > { +// version: Version; +// components: IJsonApplication.IComponents>; +// functions: IJsonApplication.IFunction>[]; +// __application?: App | undefined; +// } +// export namespace IJsonApplication { +// export type Schema = Version extends "3.1" +// ? OpenApi.IJsonSchema +// : OpenApiV3.IJsonSchema; + +// export interface IComponents< +// Schema extends +// | OpenApi.IJsonSchema +// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, +// > { +// schemas?: Record; +// } + +// export interface IFunction< +// Schema extends +// | OpenApi.IJsonSchema +// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, +// > { +// async: boolean; +// name: string; +// parameters: IParameter[]; +// output: IOutput | undefined; +// summary?: string | undefined; +// description?: string | undefined; +// deprecated?: boolean; +// tags?: string[]; +// } + +// export interface IParameter< +// Schema extends +// | OpenApi.IJsonSchema +// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, +// > { +// name: string; +// required: boolean; +// schema: Schema; +// title?: string | undefined; +// description?: string | undefined; +// } + +// export interface IOutput< +// Schema extends +// | OpenApi.IJsonSchema +// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, +// > { +// schema: Schema; +// required: boolean; +// description?: string | undefined; +// } +// } diff --git a/src/schemas/json/IJsonSchemaCollection.ts b/src/schemas/json/IJsonSchemaCollection.ts new file mode 100644 index 0000000000..d52469e899 --- /dev/null +++ b/src/schemas/json/IJsonSchemaCollection.ts @@ -0,0 +1,29 @@ +import type { OpenApi, OpenApiV3 } from "@samchon/openapi"; + +/** + * Collection of JSON schemas. + * + * @template Version Version of the OpenAPI specification. + * @template Types Original TypeScript types used in the JSON schemas. + * @author Jeongho Nam - https://github.com/samchon + */ +export type IJsonSchemaCollection< + Version extends "3.0" | "3.1" = "3.1", + Types = unknown[], +> = Version extends "3.0" + ? IJsonSchemaCollection.IV3_0 + : IJsonSchemaCollection.IV3_1; +export namespace IJsonSchemaCollection { + export interface IV3_0 { + version: "3.0"; + schemas: OpenApiV3.IJsonSchema[]; + components: OpenApiV3.IComponents; + __types?: Types | undefined; + } + export interface IV3_1 { + version: "3.1"; + components: OpenApi.IComponents; + schemas: OpenApi.IJsonSchema[]; + __types?: Types | undefined; + } +} diff --git a/src/schemas/json/__IJsonApplication.ts b/src/schemas/json/__IJsonApplication.ts new file mode 100644 index 0000000000..9d968eec0b --- /dev/null +++ b/src/schemas/json/__IJsonApplication.ts @@ -0,0 +1,63 @@ +import { OpenApi, OpenApiV3 } from "@samchon/openapi"; + +export interface __IJsonApplication< + Version extends "3.0" | "3.1" = "3.1", + App extends any = object, +> { + version: Version; + components: __IJsonApplication.IComponents< + __IJsonApplication.Schema + >; + functions: __IJsonApplication.IFunction<__IJsonApplication.Schema>[]; + __application?: App | undefined; +} +export namespace __IJsonApplication { + export type Schema = Version extends "3.1" + ? OpenApi.IJsonSchema + : OpenApiV3.IJsonSchema; + + export interface IComponents< + Schema extends + | OpenApi.IJsonSchema + | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, + > { + schemas?: Record; + } + + export interface IFunction< + Schema extends + | OpenApi.IJsonSchema + | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, + > { + async: boolean; + name: string; + parameters: IParameter[]; + output: IOutput | undefined; + summary?: string | undefined; + description?: string | undefined; + deprecated?: boolean; + tags?: string[]; + } + + export interface IParameter< + Schema extends + | OpenApi.IJsonSchema + | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, + > { + name: string; + required: boolean; + schema: Schema; + title?: string | undefined; + description?: string | undefined; + } + + export interface IOutput< + Schema extends + | OpenApi.IJsonSchema + | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema, + > { + schema: Schema; + required: boolean; + description?: string | undefined; + } +} diff --git a/src/schemas/metadata/IMetadata.ts b/src/schemas/metadata/IMetadata.ts index 27d81384ea..4eb8486304 100644 --- a/src/schemas/metadata/IMetadata.ts +++ b/src/schemas/metadata/IMetadata.ts @@ -1,10 +1,15 @@ +import { IMetadataAlias } from "./IMetadataAlias"; +import { IMetadataArray } from "./IMetadataArray"; import { IMetadataAtomic } from "./IMetadataAtomic"; import { IMetadataConstant } from "./IMetadataConstant"; -import { IMetadataEntry } from "./IMetadataEntry"; import { IMetadataEscaped } from "./IMetadataEscaped"; import { IMetadataFunction } from "./IMetadataFunction"; +import { IMetadataMap } from "./IMetadataMap"; +import { IMetadataNative } from "./IMetadataNative"; +import { IMetadataObject } from "./IMetadataObject"; +import { IMetadataSet } from "./IMetadataSet"; import { IMetadataTemplate } from "./IMetadataTemplate"; -import { IMetadataTypeTag } from "./IMetadataTypeTag"; +import { IMetadataTuple } from "./IMetadataTuple"; export interface IMetadata { any: boolean; @@ -19,18 +24,12 @@ export interface IMetadata { escaped: IMetadataEscaped | null; rest: IMetadata | null; - arrays: { - name: string; - tags: IMetadataTypeTag[][]; - }[]; - tuples: { - name: string; - tags: IMetadataTypeTag[][]; - }[]; - objects: string[]; - aliases: string[]; + arrays: IMetadataArray[]; + tuples: IMetadataTuple[]; + objects: IMetadataObject[]; + aliases: IMetadataAlias[]; - natives: string[]; - sets: IMetadata[]; - maps: IMetadataEntry[]; + natives: IMetadataNative[]; + sets: IMetadataSet[]; + maps: IMetadataMap[]; } diff --git a/src/schemas/metadata/IMetadataAlias.ts b/src/schemas/metadata/IMetadataAlias.ts index 3827c73329..80d593c85b 100644 --- a/src/schemas/metadata/IMetadataAlias.ts +++ b/src/schemas/metadata/IMetadataAlias.ts @@ -1,12 +1,6 @@ -import { IJsDocTagInfo } from "./IJsDocTagInfo"; -import { IMetadata } from "./IMetadata"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; export interface IMetadataAlias { name: string; - value: IMetadata; - nullables: boolean[]; - - description: string | null; - jsDocTags: IJsDocTagInfo[]; - recursive: boolean; + tags: IMetadataTypeTag[][]; } diff --git a/src/schemas/metadata/IMetadataAliasType.ts b/src/schemas/metadata/IMetadataAliasType.ts new file mode 100644 index 0000000000..b6fcdba089 --- /dev/null +++ b/src/schemas/metadata/IMetadataAliasType.ts @@ -0,0 +1,12 @@ +import { IJsDocTagInfo } from "./IJsDocTagInfo"; +import { IMetadata } from "./IMetadata"; + +export interface IMetadataAliasType { + name: string; + value: IMetadata; + nullables: boolean[]; + + description: string | null; + jsDocTags: IJsDocTagInfo[]; + recursive: boolean; +} diff --git a/src/schemas/metadata/IMetadataArray.ts b/src/schemas/metadata/IMetadataArray.ts index 581d4e1093..3695fb6198 100644 --- a/src/schemas/metadata/IMetadataArray.ts +++ b/src/schemas/metadata/IMetadataArray.ts @@ -1,7 +1,6 @@ -import { IMetadataArrayType } from "./IMetadataArrayType"; import { IMetadataTypeTag } from "./IMetadataTypeTag"; export interface IMetadataArray { - type: IMetadataArrayType; + name: string; tags: IMetadataTypeTag[][]; } diff --git a/src/schemas/metadata/IMetadataComponents.ts b/src/schemas/metadata/IMetadataComponents.ts index 4f6f9c44f6..48099a307d 100644 --- a/src/schemas/metadata/IMetadataComponents.ts +++ b/src/schemas/metadata/IMetadataComponents.ts @@ -1,11 +1,11 @@ -import { IMetadataAlias } from "./IMetadataAlias"; +import { IMetadataAliasType } from "./IMetadataAliasType"; import { IMetadataArrayType } from "./IMetadataArrayType"; -import { IMetadataObject } from "./IMetadataObject"; +import { IMetadataObjectType } from "./IMetadataObjectType"; import { IMetadataTupleType } from "./IMetadataTupleType"; export interface IMetadataComponents { - objects: IMetadataObject[]; - aliases: IMetadataAlias[]; + objects: IMetadataObjectType[]; + aliases: IMetadataAliasType[]; arrays: IMetadataArrayType[]; tuples: IMetadataTupleType[]; } diff --git a/src/schemas/metadata/IMetadataConstantValue.ts b/src/schemas/metadata/IMetadataConstantValue.ts index 34f3fe6f4b..949c30bbd5 100644 --- a/src/schemas/metadata/IMetadataConstantValue.ts +++ b/src/schemas/metadata/IMetadataConstantValue.ts @@ -5,7 +5,7 @@ import { IMetadataTypeTag } from "./IMetadataTypeTag"; export interface IMetadataConstantValue { value: T; - tags?: IMetadataTypeTag[][] | undefined; + tags: IMetadataTypeTag[][]; description?: string | null; jsDocTags?: IJsDocTagInfo[]; } diff --git a/src/schemas/metadata/IMetadataDictionary.ts b/src/schemas/metadata/IMetadataDictionary.ts index a7a0836c67..74be2a39e1 100644 --- a/src/schemas/metadata/IMetadataDictionary.ts +++ b/src/schemas/metadata/IMetadataDictionary.ts @@ -1,11 +1,11 @@ -import { MetadataAlias } from "./MetadataAlias"; +import { MetadataAliasType } from "./MetadataAliasType"; import { MetadataArrayType } from "./MetadataArrayType"; -import { MetadataObject } from "./MetadataObject"; +import { MetadataObjectType } from "./MetadataObjectType"; import { MetadataTupleType } from "./MetadataTupleType"; export interface IMetadataDictionary { - objects: Map; - aliases: Map; + objects: Map; + aliases: Map; arrays: Map; tuples: Map; } diff --git a/src/schemas/metadata/IMetadataEntry.ts b/src/schemas/metadata/IMetadataEntry.ts deleted file mode 100644 index ba4abc8abe..0000000000 --- a/src/schemas/metadata/IMetadataEntry.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IMetadata } from "./IMetadata"; - -export interface IMetadataEntry { - key: IMetadata; - value: IMetadata; -} diff --git a/src/schemas/metadata/IMetadataMap.ts b/src/schemas/metadata/IMetadataMap.ts new file mode 100644 index 0000000000..d28b7f7f50 --- /dev/null +++ b/src/schemas/metadata/IMetadataMap.ts @@ -0,0 +1,8 @@ +import { IMetadata } from "./IMetadata"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; + +export interface IMetadataMap { + key: IMetadata; + value: IMetadata; + tags: IMetadataTypeTag[][]; +} diff --git a/src/schemas/metadata/IMetadataNative.ts b/src/schemas/metadata/IMetadataNative.ts new file mode 100644 index 0000000000..16f0105f5e --- /dev/null +++ b/src/schemas/metadata/IMetadataNative.ts @@ -0,0 +1,6 @@ +import { IMetadataTypeTag } from "./IMetadataTypeTag"; + +export interface IMetadataNative { + name: string; + tags: IMetadataTypeTag[][]; +} diff --git a/src/schemas/metadata/IMetadataObject.ts b/src/schemas/metadata/IMetadataObject.ts index bdcb9b85c5..6dfe0bc3a1 100644 --- a/src/schemas/metadata/IMetadataObject.ts +++ b/src/schemas/metadata/IMetadataObject.ts @@ -1,13 +1,6 @@ -import { IJsDocTagInfo } from "./IJsDocTagInfo"; -import { IMetadataProperty } from "./IMetadataProperty"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; export interface IMetadataObject { name: string; - properties: IMetadataProperty[]; - description?: undefined | string; - jsDocTags: IJsDocTagInfo[]; - - index: number; - recursive: boolean; - nullables: boolean[]; + tags: IMetadataTypeTag[][]; } diff --git a/src/schemas/metadata/IMetadataObjectType.ts b/src/schemas/metadata/IMetadataObjectType.ts new file mode 100644 index 0000000000..b00552f790 --- /dev/null +++ b/src/schemas/metadata/IMetadataObjectType.ts @@ -0,0 +1,13 @@ +import { IJsDocTagInfo } from "./IJsDocTagInfo"; +import { IMetadataProperty } from "./IMetadataProperty"; + +export interface IMetadataObjectType { + name: string; + properties: IMetadataProperty[]; + description?: undefined | string; + jsDocTags: IJsDocTagInfo[]; + + index: number; + recursive: boolean; + nullables: boolean[]; +} diff --git a/src/schemas/metadata/IMetadataSet.ts b/src/schemas/metadata/IMetadataSet.ts new file mode 100644 index 0000000000..fd805905b9 --- /dev/null +++ b/src/schemas/metadata/IMetadataSet.ts @@ -0,0 +1,7 @@ +import { IMetadata } from "./IMetadata"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; + +export interface IMetadataSet { + value: IMetadata; + tags: IMetadataTypeTag[][]; +} diff --git a/src/schemas/metadata/IMetadataTemplate.ts b/src/schemas/metadata/IMetadataTemplate.ts index 61ec2759cf..84f5db72a2 100644 --- a/src/schemas/metadata/IMetadataTemplate.ts +++ b/src/schemas/metadata/IMetadataTemplate.ts @@ -3,5 +3,5 @@ import { IMetadataTypeTag } from "./IMetadataTypeTag"; export interface IMetadataTemplate { row: IMetadata[]; - tags?: IMetadataTypeTag[][] | undefined; + tags: IMetadataTypeTag[][]; } diff --git a/src/schemas/metadata/IMetadataTuple.ts b/src/schemas/metadata/IMetadataTuple.ts index 5283194b62..a50598fa8c 100644 --- a/src/schemas/metadata/IMetadataTuple.ts +++ b/src/schemas/metadata/IMetadataTuple.ts @@ -1,7 +1,6 @@ -import { IMetadataTupleType } from "./IMetadataTupleType"; import { IMetadataTypeTag } from "./IMetadataTypeTag"; export interface IMetadataTuple { - type: IMetadataTupleType; + name: string; tags: IMetadataTypeTag[][]; } diff --git a/src/schemas/metadata/IMetadataTypeTag.ts b/src/schemas/metadata/IMetadataTypeTag.ts index 20f254fc34..c028a759dc 100644 --- a/src/schemas/metadata/IMetadataTypeTag.ts +++ b/src/schemas/metadata/IMetadataTypeTag.ts @@ -1,7 +1,7 @@ import type ts from "typescript"; export interface IMetadataTypeTag { - target: "boolean" | "bigint" | "number" | "string" | "array"; + target: "boolean" | "bigint" | "number" | "string" | "array" | "object"; name: string; kind: string; exclusive: boolean | string[]; diff --git a/src/schemas/metadata/Metadata.ts b/src/schemas/metadata/Metadata.ts index 5c0a06f282..4c78d8a0f6 100644 --- a/src/schemas/metadata/Metadata.ts +++ b/src/schemas/metadata/Metadata.ts @@ -11,7 +11,11 @@ import { MetadataAtomic } from "./MetadataAtomic"; import { MetadataConstant } from "./MetadataConstant"; import { MetadataEscaped } from "./MetadataEscaped"; import { MetadataFunction } from "./MetadataFunction"; +import { MetadataMap } from "./MetadataMap"; +import { MetadataNative } from "./MetadataNative"; import { MetadataObject } from "./MetadataObject"; +import { MetadataObjectType } from "./MetadataObjectType"; +import { MetadataSet } from "./MetadataSet"; import { MetadataTemplate } from "./MetadataTemplate"; import { MetadataTuple } from "./MetadataTuple"; @@ -33,15 +37,16 @@ export class Metadata { public objects: MetadataObject[]; public functions: MetadataFunction[]; - public natives: string[]; - public sets: Metadata[]; - public maps: Metadata.Entry[]; + public natives: MetadataNative[]; + public sets: MetadataSet[]; + public maps: MetadataMap[]; /** @internal */ private name_?: string; /** @internal */ private parent_resolved_: boolean = false; /** @internal */ public union_index?: number; /** @internal */ public fixed_?: number | null; /** @internal */ public boolean_literal_intersected_?: boolean; + /** @internal */ private is_sequence_?: boolean; /* ----------------------------------------------------------- CONSTRUCTORS @@ -122,23 +127,14 @@ export class Metadata { escaped: this.escaped ? this.escaped.toJSON() : null, rest: this.rest ? this.rest.toJSON() : null, - arrays: this.arrays.map((array) => ({ - name: array.type.name, - tags: array.tags.map((r) => r.slice()), - })), - tuples: this.tuples.map((tuple) => ({ - name: tuple.type.name, - tags: tuple.tags.map((r) => r.slice()), - })), - objects: this.objects.map((obj) => obj.name), - aliases: this.aliases.map((alias) => alias.name), - - natives: this.natives.slice(), - sets: this.sets.map((meta) => meta.toJSON()), - maps: this.maps.map((entry) => ({ - key: entry.key.toJSON(), - value: entry.value.toJSON(), - })), + arrays: this.arrays.map((array) => array.toJSON()), + tuples: this.tuples.map((tuple) => tuple.toJSON()), + objects: this.objects.map((obj) => obj.toJSON()), + aliases: this.aliases.map((alias) => alias.toJSON()), + + natives: this.natives.map((native) => native.toJSON()), + sets: this.sets.map((set) => set.toJSON()), + maps: this.maps.map((map) => map.toJSON()), }; } @@ -178,29 +174,42 @@ export class Metadata { tags: t.tags.map((r) => r.slice()), }); }), - objects: meta.objects.map((name) => { - const found = dict.objects.get(name); + objects: meta.objects.map((obj) => { + const found = dict.objects.get(obj.name); if (found === undefined) throw new RangeError( `Error on Metadata.from(): failed to find object "${name}".`, ); - return found; + return MetadataObject.create({ + type: found, + tags: obj.tags.map((r) => r.slice()), + }); }), aliases: meta.aliases.map((alias) => { - const found = dict.aliases.get(alias); - if (found === undefined) + const type = dict.aliases.get(alias.name); + if (type === undefined) throw new RangeError( `Error on Metadata.from(): failed to find alias "${alias}".`, ); - return found; + return MetadataAlias.create({ + type, + tags: alias.tags.map((r) => r.slice()), + }); }), - - natives: meta.natives.slice(), - sets: meta.sets.map((meta) => this.from(meta, dict)), - maps: meta.maps.map((entry) => ({ - key: this.from(entry.key, dict), - value: this.from(entry.value, dict), - })), + natives: meta.natives.map((native) => MetadataNative.create(native)), + sets: meta.sets.map((set) => + MetadataSet.create({ + value: Metadata.from(set.value, dict), + tags: set.tags.map((r) => r.slice()), + }), + ), + maps: meta.maps.map((map) => + MetadataMap.create({ + key: this.from(map.key, dict), + value: this.from(map.value, dict), + tags: map.tags.map((r) => r.slice()), + }), + ), }); } @@ -253,6 +262,39 @@ export class Metadata { ); } + /** + * @internal + */ + public isSequence(): boolean { + return (this.is_sequence_ ??= (() => { + const exists = (tags: IMetadataTypeTag[][]): boolean => + tags.some((row) => { + const sequence = row.find( + (t) => + t.kind === "sequence" && + typeof (t.schema as any)?.["x-protobuf-sequence"] === "number", + ); + if (sequence === undefined) return false; + const value: number = Number( + (sequence.schema as any)["x-protobuf-sequence"], + ); + return !Number.isNaN(value); + }); + return ( + this.atomics.some((atomic) => exists(atomic.tags)) && + this.constants.some((c) => + c.values.some((v) => exists(v.tags ?? [])), + ) && + this.templates.some((tpl) => exists(tpl.tags)) && + this.arrays.some((array) => exists(array.tags)) && + this.objects.some((object) => exists(object.tags)) && + this.natives.some( + (native) => native.name === "Uint8Array" && exists(native.tags), + ) + ); + })()); + } + public isConstant(): boolean { return this.bucket() === (this.constants.length ? 1 : 0); } @@ -418,12 +460,16 @@ export namespace Metadata { // OBJECTS for (const yo of y.objects) - if (x.objects.some((xo) => MetadataObject.covers(xo, yo)) === false) + if ( + x.objects.some((xo) => MetadataObjectType.covers(xo.type, yo.type)) === + false + ) return false; // ALIASES for (const yd of y.aliases) - if (x.aliases.some((xd) => xd.name === yd.name) === false) return false; + if (x.aliases.some((xd) => xd.type.name === yd.type.name) === false) + return false; // NATIVES for (const yn of y.natives) @@ -431,7 +477,8 @@ export namespace Metadata { // SETS for (const ys of y.sets) - if (x.sets.some((xs) => covers(xs, ys)) === false) return false; + if (x.sets.some((xs) => covers(xs.value, ys.value)) === false) + return false; //---- // VALUES @@ -476,7 +523,6 @@ export namespace Metadata { required: x.required && y.required, optional: x.optional || y.optional, functions: x.functions.length ? x.functions : y.functions, // @todo - escaped: x.escaped !== null && y.escaped !== null ? MetadataEscaped.create({ @@ -491,12 +537,10 @@ export namespace Metadata { })(y.atomics), constants: [...x.constants], templates: x.templates.slice(), - rest: x.rest !== null && y.rest !== null ? merge(x.rest, y.rest) : (x.rest ?? y.rest), - // arrays: x.arrays.slice(), arrays: mergeTaggedTypes({ container: x.arrays, equals: (x, y) => x.type.name === y.type.name, @@ -507,12 +551,33 @@ export namespace Metadata { equals: (x, y) => x.type.name === y.type.name, getter: (x) => x.tags, })(y.tuples), - objects: x.objects.slice(), - aliases: x.aliases.slice(), - - natives: [...new Set([...x.natives, ...y.natives])], - sets: x.sets.slice(), - maps: x.maps.slice(), + objects: mergeTaggedTypes({ + container: x.objects, + equals: (x, y) => x.type.name === y.type.name, + getter: (x) => x.tags, + })(y.objects), + aliases: mergeTaggedTypes({ + container: x.aliases, + equals: (x, y) => x.type.name === y.type.name, + getter: (x) => x.tags, + })(y.aliases), + natives: mergeTaggedTypes({ + container: x.natives, + equals: (x, y) => x.name === y.name, + getter: (x) => x.tags, + })(y.natives), + sets: mergeTaggedTypes({ + container: x.sets, + equals: (x, y) => x.value.getName() === y.value.getName(), + getter: (x) => x.tags, + })(y.sets), + maps: mergeTaggedTypes({ + container: x.maps, + equals: (x, y) => + x.key.getName() === y.key.getName() && + x.value.getName() === y.value.getName(), + getter: (x) => x.tags, + })(y.maps), }); for (const constant of y.constants) { const target: MetadataConstant = ArrayUtil.take( @@ -527,11 +592,6 @@ export namespace Metadata { for (const value of constant.values) ArrayUtil.add(target.values, value, (a, b) => a.value === b.value); } - for (const obj of y.objects) - ArrayUtil.set(output.objects, obj, (elem) => elem.name); - for (const alias of y.aliases) - ArrayUtil.set(output.aliases, alias, (elem) => elem.name); - return output; }; } @@ -554,17 +614,16 @@ const getName = (metadata: Metadata): string => { for (const template of metadata.templates) elements.push(template.getName()); // NATIVES - for (const native of metadata.natives) elements.push(native); - for (const set of metadata.sets) elements.push(`Set<${set.getName()}>`); - for (const map of metadata.maps) - elements.push(`Map<${map.key.getName()}, ${map.value.getName()}>`); + for (const native of metadata.natives) elements.push(native.getName()); + for (const set of metadata.sets) elements.push(set.getName()); + for (const map of metadata.maps) elements.push(map.getName()); // INSTANCES if (metadata.rest !== null) elements.push(`...${metadata.rest.getName()}`); for (const tuple of metadata.tuples) elements.push(tuple.type.name); for (const array of metadata.arrays) elements.push(array.getName()); - for (const object of metadata.objects) elements.push(object.name); - for (const alias of metadata.aliases) elements.push(alias.name); + for (const object of metadata.objects) elements.push(object.getName()); + for (const alias of metadata.aliases) elements.push(alias.getName()); if (metadata.escaped !== null) elements.push(metadata.escaped.getName()); // RETURNS @@ -574,12 +633,6 @@ const getName = (metadata: Metadata): string => { elements.sort(); return `(${elements.join(" | ")})`; }; -export namespace Metadata { - export interface Entry { - key: Metadata; - value: Metadata; - } -} const mergeTaggedTypes = (props: { diff --git a/src/schemas/metadata/MetadataAlias.ts b/src/schemas/metadata/MetadataAlias.ts index 5ecfe71fcf..83b57679d6 100644 --- a/src/schemas/metadata/MetadataAlias.ts +++ b/src/schemas/metadata/MetadataAlias.ts @@ -1,61 +1,46 @@ import { ClassProperties } from "../../typings/ClassProperties"; -import { IJsDocTagInfo } from "./IJsDocTagInfo"; import { IMetadataAlias } from "./IMetadataAlias"; -import { Metadata } from "./Metadata"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; +import { MetadataAliasType } from "./MetadataAliasType"; export class MetadataAlias { - public readonly name: string; - public readonly value: Metadata; - public readonly description: string | null; - public readonly jsDocTags: IJsDocTagInfo[]; - public readonly recursive: boolean; - public readonly nullables: boolean[]; + public readonly type: MetadataAliasType; + public readonly tags: IMetadataTypeTag[][]; + private name_?: string; - /* ----------------------------------------------------------- - CONSTRUCTORS - ----------------------------------------------------------- */ - /** - * @hidden - */ private constructor(props: ClassProperties) { - this.name = props.name; - this.value = props.value; - this.description = props.description; - this.jsDocTags = props.jsDocTags; - this.recursive = props.recursive; - this.nullables = props.nullables; + this.type = props.type; + this.tags = props.tags; + this.type = props.type; } - /** - * @internal - */ public static create(props: ClassProperties): MetadataAlias { return new MetadataAlias(props); } - /** - * @internal - */ - public static _From_without_value(props: Omit) { - return MetadataAlias.create({ - name: props.name, - value: null!, - description: props.description, - recursive: props.recursive, - jsDocTags: props.jsDocTags.slice(), - nullables: props.nullables.slice(), - }); + public getName(): string { + return (this.name_ ??= (() => { + if (this.tags.length === 0) return this.type.name; + else if (this.tags.length === 1) { + const str: string = [ + this.type.name, + ...this.tags[0]!.map((t) => t.name), + ].join(" & "); + return `(${str})`; + } + const rows: string[] = this.tags.map((row) => { + const str: string = row.map((t) => t.name).join(" & "); + return row.length === 1 ? str : `(${str})`; + }); + return `(${this.type.name} & (${rows.join(" | ")}))`; + })()); } public toJSON(): IMetadataAlias { return { - name: this.name, - value: this.value.toJSON(), - description: this.description, - recursive: this.recursive, - jsDocTags: this.jsDocTags.slice(), - nullables: this.nullables.slice(), + name: this.type.name, + tags: this.tags, }; } } diff --git a/src/schemas/metadata/MetadataAliasType.ts b/src/schemas/metadata/MetadataAliasType.ts new file mode 100644 index 0000000000..3d56a12df1 --- /dev/null +++ b/src/schemas/metadata/MetadataAliasType.ts @@ -0,0 +1,63 @@ +import { ClassProperties } from "../../typings/ClassProperties"; + +import { IJsDocTagInfo } from "./IJsDocTagInfo"; +import { IMetadataAliasType } from "./IMetadataAliasType"; +import { Metadata } from "./Metadata"; + +export class MetadataAliasType { + public readonly name: string; + public readonly value: Metadata; + public readonly description: string | null; + public readonly jsDocTags: IJsDocTagInfo[]; + public readonly recursive: boolean; + public readonly nullables: boolean[]; + + /* ----------------------------------------------------------- + CONSTRUCTORS + ----------------------------------------------------------- */ + /** + * @hidden + */ + private constructor(props: ClassProperties) { + this.name = props.name; + this.value = props.value; + this.description = props.description; + this.jsDocTags = props.jsDocTags; + this.recursive = props.recursive; + this.nullables = props.nullables; + } + + /** + * @internal + */ + public static create( + props: ClassProperties, + ): MetadataAliasType { + return new MetadataAliasType(props); + } + + /** + * @internal + */ + public static _From_without_value(props: Omit) { + return MetadataAliasType.create({ + name: props.name, + value: null!, + description: props.description, + recursive: props.recursive, + jsDocTags: props.jsDocTags.slice(), + nullables: props.nullables.slice(), + }); + } + + public toJSON(): IMetadataAliasType { + return { + name: this.name, + value: this.value.toJSON(), + description: this.description, + recursive: this.recursive, + jsDocTags: this.jsDocTags.slice(), + nullables: this.nullables.slice(), + }; + } +} diff --git a/src/schemas/metadata/MetadataArray.ts b/src/schemas/metadata/MetadataArray.ts index 6d60a786eb..b5e1fdb9b4 100644 --- a/src/schemas/metadata/MetadataArray.ts +++ b/src/schemas/metadata/MetadataArray.ts @@ -42,7 +42,7 @@ export class MetadataArray { public toJSON(): IMetadataArray { return { - type: this.type.toJSON(), + name: this.type.name, tags: this.tags.map((row) => row.slice()), }; } diff --git a/src/schemas/metadata/MetadataComponents.ts b/src/schemas/metadata/MetadataComponents.ts index 6a9b9e3a74..339d61a924 100644 --- a/src/schemas/metadata/MetadataComponents.ts +++ b/src/schemas/metadata/MetadataComponents.ts @@ -4,15 +4,15 @@ import { Writable } from "../../typings/Writable"; import { IMetadataComponents } from "./IMetadataComponents"; import { IMetadataDictionary } from "./IMetadataDictionary"; import { Metadata } from "./Metadata"; -import { MetadataAlias } from "./MetadataAlias"; +import { MetadataAliasType } from "./MetadataAliasType"; import { MetadataArrayType } from "./MetadataArrayType"; -import { MetadataObject } from "./MetadataObject"; +import { MetadataObjectType } from "./MetadataObjectType"; import { MetadataProperty } from "./MetadataProperty"; import { MetadataTupleType } from "./MetadataTupleType"; export class MetadataComponents { - public readonly aliases: MetadataAlias[]; - public readonly objects: MetadataObject[]; + public readonly aliases: MetadataAliasType[]; + public readonly objects: MetadataObjectType[]; public readonly arrays: MetadataArrayType[]; public readonly tuples: MetadataTupleType[]; public readonly dictionary: IMetadataDictionary; @@ -31,13 +31,13 @@ export class MetadataComponents { objects: new Map( json.objects.map((obj) => [ obj.name, - MetadataObject._From_without_properties(obj), + MetadataObjectType._From_without_properties(obj), ]), ), aliases: new Map( json.aliases.map((alias) => [ alias.name, - MetadataAlias._From_without_value(alias), + MetadataAliasType._From_without_value(alias), ]), ), arrays: new Map( diff --git a/src/schemas/metadata/MetadataConstantValue.ts b/src/schemas/metadata/MetadataConstantValue.ts index 3266ae2893..c6d01d0f84 100644 --- a/src/schemas/metadata/MetadataConstantValue.ts +++ b/src/schemas/metadata/MetadataConstantValue.ts @@ -6,7 +6,7 @@ import { IMetadataTypeTag } from "./IMetadataTypeTag"; export class MetadataConstantValue { public readonly value: boolean | bigint | number | string; - public tags: IMetadataTypeTag[][] | undefined; + public tags: IMetadataTypeTag[][]; public readonly description?: string | null; public readonly jsDocTags?: IJsDocTagInfo[]; private name_?: string; diff --git a/src/schemas/metadata/MetadataMap.ts b/src/schemas/metadata/MetadataMap.ts new file mode 100644 index 0000000000..e1217c9d77 --- /dev/null +++ b/src/schemas/metadata/MetadataMap.ts @@ -0,0 +1,48 @@ +import { ClassProperties } from "../../typings/ClassProperties"; + +import { IMetadataMap } from "./IMetadataMap"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; +import { Metadata } from "./Metadata"; + +export class MetadataMap { + public readonly key: Metadata; + public readonly value: Metadata; + public readonly tags: IMetadataTypeTag[][]; + private name_?: string; + + private constructor(props: ClassProperties) { + this.key = props.key; + this.value = props.value; + this.tags = props.tags; + } + + public static create(props: ClassProperties): MetadataMap { + return new MetadataMap(props); + } + + public getName(): string { + return (this.name_ ??= (() => { + const symbol: string = `Map<${this.key.getName()}, ${this.value.getName()}>`; + if (this.tags.length === 0) return symbol; + else if (this.tags.length === 1) { + const str: string = [symbol, ...this.tags[0]!.map((t) => t.name)].join( + " & ", + ); + return `(${str})`; + } + const rows: string[] = this.tags.map((row) => { + const str: string = row.map((t) => t.name).join(" & "); + return row.length === 1 ? str : `(${str})`; + }); + return `(${symbol} & (${rows.join(" | ")}))`; + })()); + } + + public toJSON(): IMetadataMap { + return { + key: this.key.toJSON(), + value: this.value.toJSON(), + tags: this.tags, + }; + } +} diff --git a/src/schemas/metadata/MetadataNative.ts b/src/schemas/metadata/MetadataNative.ts new file mode 100644 index 0000000000..ebd63ecb32 --- /dev/null +++ b/src/schemas/metadata/MetadataNative.ts @@ -0,0 +1,44 @@ +import { ClassProperties } from "../../typings/ClassProperties"; + +import { IMetadataNative } from "./IMetadataNative"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; + +export class MetadataNative { + public readonly name: string; + public readonly tags: IMetadataTypeTag[][]; + private typeName_?: string; + + private constructor(props: ClassProperties) { + this.name = props.name; + this.tags = props.tags; + } + + public static create(props: ClassProperties): MetadataNative { + return new MetadataNative(props); + } + + public getName(): string { + return (this.typeName_ ??= (() => { + if (this.tags.length === 0) return this.name; + else if (this.tags.length === 1) { + const str: string = [ + this.name, + ...this.tags[0]!.map((t) => t.name), + ].join(" & "); + return `(${str})`; + } + const rows: string[] = this.tags.map((row) => { + const str: string = row.map((t) => t.name).join(" & "); + return row.length === 1 ? str : `(${str})`; + }); + return `(${this.name} & (${rows.join(" | ")}))`; + })()); + } + + public toJSON(): IMetadataNative { + return { + name: this.name, + tags: this.tags, + }; + } +} diff --git a/src/schemas/metadata/MetadataObject.ts b/src/schemas/metadata/MetadataObject.ts index e10ebe4192..b5cbcf69a5 100644 --- a/src/schemas/metadata/MetadataObject.ts +++ b/src/schemas/metadata/MetadataObject.ts @@ -1,139 +1,48 @@ import { ClassProperties } from "../../typings/ClassProperties"; -import { IJsDocTagInfo } from "./IJsDocTagInfo"; import { IMetadataObject } from "./IMetadataObject"; -import { MetadataProperty } from "./MetadataProperty"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; +import { MetadataObjectType } from "./MetadataObjectType"; export class MetadataObject { - public readonly name: string; - public readonly properties: Array; - public readonly description: string | undefined; - public readonly jsDocTags: IJsDocTagInfo[]; - - public readonly index: number; - public validated: boolean; - public recursive: boolean; - public nullables: boolean[] = []; - - /** - * @internal - */ - public tagged_: boolean = false; + public readonly type: MetadataObjectType; + public readonly tags: IMetadataTypeTag[][]; + private name_?: string; - /** - * @internal - */ - private literal_?: boolean; - - /* ----------------------------------------------------------- - CONSTRUCTORS - ----------------------------------------------------------- */ /** * @hidden */ - private constructor(props: Omit, "tagged_">) { - this.name = props.name; - this.properties = props.properties; - this.description = props.description; - this.jsDocTags = props.jsDocTags; - - this.index = props.index; - this.validated = props.validated; - this.recursive = props.recursive; - this.nullables = props.nullables.slice(); - - this.tagged_ = false; + private constructor(props: ClassProperties) { + this.type = props.type; + this.tags = props.tags; } - /** - * @internal - */ - public static create( - props: Omit, "tagged_">, - ) { + public static create(props: ClassProperties): MetadataObject { return new MetadataObject(props); } - /** - * @internal - */ - public static _From_without_properties(obj: IMetadataObject): MetadataObject { - return MetadataObject.create({ - name: obj.name, - properties: [], - description: obj.description, - jsDocTags: obj.jsDocTags, - - index: obj.index, - validated: false, - recursive: obj.recursive, - nullables: obj.nullables.slice(), - }); - } - - public isPlain(level: number = 0): boolean { - return ( - this.recursive === false && - this.properties.length < 10 && - this.properties.every( - (property) => - property.key.isSoleLiteral() && - property.value.size() === 1 && - property.value.isRequired() === true && - property.value.nullable === false && - (property.value.atomics.length === 1 || - (level < 1 && - property.value.objects.length === 1 && - property.value.objects[0]!.isPlain(level + 1))), - ) - ); - } - - public isLiteral(): boolean { - return (this.literal_ ??= (() => { - if (this.recursive === true) return false; - return ( - this.name === "__type" || - this.name === "__object" || - this.name.startsWith("__type.") || - this.name.startsWith("__object.") || - this.name.includes("readonly [") - ); + public getName(): string { + return (this.name_ ??= (() => { + if (this.tags.length === 0) return this.type.name; + else if (this.tags.length === 1) { + const str: string = [ + this.type.name, + ...this.tags[0]!.map((t) => t.name), + ].join(" & "); + return `(${str})`; + } + const rows: string[] = this.tags.map((row) => { + const str: string = row.map((t) => t.name).join(" & "); + return row.length === 1 ? str : `(${str})`; + }); + return `(${this.type.name} & (${rows.join(" | ")}))`; })()); } public toJSON(): IMetadataObject { return { - name: this.name, - properties: this.properties.map((property) => property.toJSON()), - description: this.description, - jsDocTags: this.jsDocTags, - - index: this.index, - recursive: this.recursive, - nullables: this.nullables.slice(), + name: this.type.name, + tags: this.tags.map((row) => row.slice()), }; } } - -/** - * @internal - */ -export namespace MetadataObject { - export const intersects = (x: MetadataObject, y: MetadataObject): boolean => - x.properties.some( - (prop) => - y.properties.find( - (oppo) => prop.key.getName() === oppo.key.getName(), - ) !== undefined, - ); - - export const covers = (x: MetadataObject, y: MetadataObject): boolean => - x.properties.length >= y.properties.length && - x.properties.every( - (prop) => - y.properties.find( - (oppo) => prop.key.getName() === oppo.key.getName(), - ) !== undefined, - ); -} diff --git a/src/schemas/metadata/MetadataObjectType.ts b/src/schemas/metadata/MetadataObjectType.ts new file mode 100644 index 0000000000..d2a51b06df --- /dev/null +++ b/src/schemas/metadata/MetadataObjectType.ts @@ -0,0 +1,149 @@ +import { ClassProperties } from "../../typings/ClassProperties"; + +import { IJsDocTagInfo } from "./IJsDocTagInfo"; +import { IMetadataObjectType } from "./IMetadataObjectType"; +import { MetadataProperty } from "./MetadataProperty"; + +export class MetadataObjectType { + public readonly name: string; + public readonly properties: Array; + public readonly description: string | undefined; + public readonly jsDocTags: IJsDocTagInfo[]; + + public readonly index: number; + public validated: boolean; + public recursive: boolean; + public nullables: boolean[] = []; + + /** + * @internal + */ + public tagged_: boolean = false; + + /** + * @internal + */ + private literal_?: boolean; + + /* ----------------------------------------------------------- + CONSTRUCTORS + ----------------------------------------------------------- */ + /** + * @hidden + */ + private constructor( + props: Omit, "tagged_">, + ) { + this.name = props.name; + this.properties = props.properties; + this.description = props.description; + this.jsDocTags = props.jsDocTags; + + this.index = props.index; + this.validated = props.validated; + this.recursive = props.recursive; + this.nullables = props.nullables.slice(); + + this.tagged_ = false; + } + + /** + * @internal + */ + public static create( + props: Omit, "tagged_">, + ) { + return new MetadataObjectType(props); + } + + /** + * @internal + */ + public static _From_without_properties( + obj: IMetadataObjectType, + ): MetadataObjectType { + return MetadataObjectType.create({ + name: obj.name, + properties: [], + description: obj.description, + jsDocTags: obj.jsDocTags, + + index: obj.index, + validated: false, + recursive: obj.recursive, + nullables: obj.nullables.slice(), + }); + } + + public isPlain(level: number = 0): boolean { + return ( + this.recursive === false && + this.properties.length < 10 && + this.properties.every( + (property) => + property.key.isSoleLiteral() && + property.value.size() === 1 && + property.value.isRequired() === true && + property.value.nullable === false && + (property.value.atomics.length === 1 || + (level < 1 && + property.value.objects.length === 1 && + property.value.objects[0]!.type.isPlain(level + 1))), + ) + ); + } + + public isLiteral(): boolean { + return (this.literal_ ??= (() => { + if (this.recursive === true) return false; + return ( + this.name === "__type" || + this.name === "__object" || + this.name.startsWith("__type.") || + this.name.startsWith("__object.") || + this.name.includes("readonly [") + ); + })()); + } + + public toJSON(): IMetadataObjectType { + return { + name: this.name, + properties: this.properties.map((property) => property.toJSON()), + description: this.description, + jsDocTags: this.jsDocTags, + + index: this.index, + recursive: this.recursive, + nullables: this.nullables.slice(), + }; + } +} + +/** + * @internal + */ +export namespace MetadataObjectType { + export const intersects = ( + x: MetadataObjectType, + y: MetadataObjectType, + ): boolean => + x.properties.some( + (prop) => + y.properties.find( + (oppo) => prop.key.getName() === oppo.key.getName(), + ) !== undefined, + ); + + export const covers = ( + x: MetadataObjectType, + y: MetadataObjectType, + ): boolean => + x.properties.length >= y.properties.length && + x.properties.every( + (prop) => + y.properties.find( + (oppo) => prop.key.getName() === oppo.key.getName(), + ) !== undefined, + ); +} diff --git a/src/schemas/metadata/MetadataProperty.ts b/src/schemas/metadata/MetadataProperty.ts index 52867fdfaa..9ad98dc5b0 100644 --- a/src/schemas/metadata/MetadataProperty.ts +++ b/src/schemas/metadata/MetadataProperty.ts @@ -1,5 +1,6 @@ import { ClassProperties } from "../../typings/ClassProperties"; +import { IProtobufProperty } from "../protobuf/IProtobufProperty"; import { IJsDocTagInfo } from "./IJsDocTagInfo"; import { IMetadataDictionary } from "./IMetadataDictionary"; import { IMetadataProperty } from "./IMetadataProperty"; @@ -11,6 +12,8 @@ export class MetadataProperty { public readonly description: string | null; public readonly jsDocTags: IJsDocTagInfo[]; + public of_protobuf_?: IProtobufProperty; + /* ----------------------------------------------------------- CONSTRUCTORS ----------------------------------------------------------- */ diff --git a/src/schemas/metadata/MetadataSet.ts b/src/schemas/metadata/MetadataSet.ts new file mode 100644 index 0000000000..6ef94d0600 --- /dev/null +++ b/src/schemas/metadata/MetadataSet.ts @@ -0,0 +1,45 @@ +import { ClassProperties } from "../../typings/ClassProperties"; + +import { IMetadataSet } from "./IMetadataSet"; +import { IMetadataTypeTag } from "./IMetadataTypeTag"; +import { Metadata } from "./Metadata"; + +export class MetadataSet { + public readonly value: Metadata; + public readonly tags: IMetadataTypeTag[][]; + private name_?: string; + + private constructor(props: ClassProperties) { + this.value = props.value; + this.tags = props.tags; + } + + public static create(props: ClassProperties): MetadataSet { + return new MetadataSet(props); + } + + public getName(): string { + return (this.name_ ??= (() => { + const symbol: string = `Set<${this.value.getName()}>`; + if (this.tags.length === 0) return symbol; + else if (this.tags.length === 1) { + const str: string = [symbol, ...this.tags[0]!.map((t) => t.name)].join( + " & ", + ); + return `(${str})`; + } + const rows: string[] = this.tags.map((row) => { + const str: string = row.map((t) => t.name).join(" & "); + return row.length === 1 ? str : `(${str})`; + }); + return `(${symbol} & (${rows.join(" | ")}))`; + })()); + } + + public toJSON(): IMetadataSet { + return { + value: this.value.toJSON(), + tags: this.tags, + }; + } +} diff --git a/src/schemas/metadata/MetadataTemplate.ts b/src/schemas/metadata/MetadataTemplate.ts index 86f11d7ac6..bf0424d5b0 100644 --- a/src/schemas/metadata/MetadataTemplate.ts +++ b/src/schemas/metadata/MetadataTemplate.ts @@ -7,7 +7,7 @@ import { Metadata } from "./Metadata"; export class MetadataTemplate { public readonly row: Metadata[]; - public tags: IMetadataTypeTag[][] | undefined; + public readonly tags: IMetadataTypeTag[][]; private name_?: string; diff --git a/src/schemas/metadata/MetadataTuple.ts b/src/schemas/metadata/MetadataTuple.ts index 0ba902231c..288918beab 100644 --- a/src/schemas/metadata/MetadataTuple.ts +++ b/src/schemas/metadata/MetadataTuple.ts @@ -25,7 +25,7 @@ export class MetadataTuple { public toJSON(): IMetadataTuple { return { - type: this.type.toJSON(), + name: this.type.name, tags: this.tags.map((row) => row.slice()), }; } diff --git a/src/schemas/protobuf/IProtobufProperty.ts b/src/schemas/protobuf/IProtobufProperty.ts new file mode 100644 index 0000000000..5fbcebdb30 --- /dev/null +++ b/src/schemas/protobuf/IProtobufProperty.ts @@ -0,0 +1,6 @@ +import { IProtobufPropertyType } from "./IProtobufPropertyType"; + +export interface IProtobufProperty { + fixed: boolean; + union: IProtobufPropertyType[]; +} diff --git a/src/schemas/protobuf/IProtobufPropertyType.ts b/src/schemas/protobuf/IProtobufPropertyType.ts new file mode 100644 index 0000000000..0edae1ca44 --- /dev/null +++ b/src/schemas/protobuf/IProtobufPropertyType.ts @@ -0,0 +1,37 @@ +import { IProtobufSchema } from "./IProtobufSchema"; + +export type IProtobufPropertyType = + | IProtobufPropertyType.IByte + | IProtobufPropertyType.IBoolean + | IProtobufPropertyType.IBigint + | IProtobufPropertyType.INumber + | IProtobufPropertyType.IString + | IProtobufPropertyType.IArray + | IProtobufPropertyType.IObject + | IProtobufPropertyType.IMap; +export namespace IProtobufPropertyType { + export interface IByte extends IProtobufSchema.IByte { + index: number; + } + export interface IBoolean extends IProtobufSchema.IBoolean { + index: number; + } + export interface IBigint extends IProtobufSchema.IBigint { + index: number; + } + export interface INumber extends IProtobufSchema.INumber { + index: number; + } + export interface IString extends IProtobufSchema.IString { + index: number; + } + export interface IArray extends IProtobufSchema.IArray { + index: number; + } + export interface IObject extends IProtobufSchema.IObject { + index: number; + } + export interface IMap extends IProtobufSchema.IMap { + index: number; + } +} diff --git a/src/schemas/protobuf/IProtobufSchema.ts b/src/schemas/protobuf/IProtobufSchema.ts new file mode 100644 index 0000000000..c9dd88b3a4 --- /dev/null +++ b/src/schemas/protobuf/IProtobufSchema.ts @@ -0,0 +1,50 @@ +import { MetadataArrayType } from "../metadata/MetadataArrayType"; +import { MetadataMap } from "../metadata/MetadataMap"; +import { MetadataObjectType } from "../metadata/MetadataObjectType"; + +export type IProtobufSchema = + | IProtobufSchema.IByte + | IProtobufSchema.IBoolean + | IProtobufSchema.IBigint + | IProtobufSchema.INumber + | IProtobufSchema.IString + | IProtobufSchema.IArray + | IProtobufSchema.IObject + | IProtobufSchema.IMap; +export namespace IProtobufSchema { + export interface IByte { + type: "bytes"; + } + export interface IBoolean { + type: "bool"; + } + export interface IBigint { + type: "bigint"; + name: "int64" | "uint64"; + } + export interface INumber { + type: "number"; + name: "int32" | "int64" | "uint32" | "uint64" | "float" | "double"; + } + export interface IString { + type: "string"; + } + export interface IArray { + type: "array"; + array: MetadataArrayType; + value: Exclude; + } + export interface IObject { + type: "object"; + object: MetadataObjectType; + } + export interface IMap { + type: "map"; + map: MetadataMap | MetadataObjectType; + key: + | IProtobufSchema.IBoolean + | IProtobufSchema.INumber + | IProtobufSchema.IString; + value: Exclude; + } +} diff --git a/src/tags/Example.ts b/src/tags/Example.ts index 927d3c4795..b412c5af96 100644 --- a/src/tags/Example.ts +++ b/src/tags/Example.ts @@ -1,9 +1,16 @@ import { TagBase } from "./TagBase"; export type Example< - Value extends boolean | bigint | number | string | Array | null, + Value extends + | boolean + | bigint + | number + | string + | object + | Array + | null, > = TagBase<{ - target: "boolean" | "bigint" | "number" | "string" | "array"; + target: "boolean" | "bigint" | "number" | "string" | "array" | "object"; kind: "example"; value: Value; exclusive: true; diff --git a/src/tags/Examples.ts b/src/tags/Examples.ts index 72f1971f0c..cd47af8d32 100644 --- a/src/tags/Examples.ts +++ b/src/tags/Examples.ts @@ -3,10 +3,10 @@ import { TagBase } from "./TagBase"; export type Examples< Dict extends Record< string, - boolean | bigint | number | string | Array | null + boolean | bigint | number | string | object | Array | null >, > = TagBase<{ - target: "boolean" | "bigint" | "number" | "string" | "array"; + target: "boolean" | "bigint" | "number" | "string" | "array" | "object"; kind: "examples"; value: Dict; exclusive: true; diff --git a/src/tags/Format.ts b/src/tags/Format.ts index 646024fb68..e6375ae7a1 100644 --- a/src/tags/Format.ts +++ b/src/tags/Format.ts @@ -1,16 +1,50 @@ import type { TagBase } from "./TagBase"; -import type { FormatCheatSheet } from "./internal/FormatCheatSheet"; -export type Format = TagBase<{ +export type Format = TagBase<{ target: "string"; kind: "format"; value: Value; - validate: Format.Validator[Value]; + validate: `$importInternal("isFormat${PascalizeString}")($input)`; exclusive: ["format", "pattern"]; schema: { format: Value; }; }>; export namespace Format { - export type Validator = typeof FormatCheatSheet; + export type Value = + | "byte" + | "password" + | "regex" + | "uuid" + | "email" + | "hostname" + | "idn-email" + | "idn-hostname" + | "iri" + | "iri-reference" + | "ipv4" + | "ipv6" + | "uri" + | "uri-reference" + | "uri-template" + | "url" + | "date-time" + | "date" + | "time" + | "duration" + | "json-pointer" + | "relative-json-pointer"; } + +type PascalizeString = Key extends `-${infer R}` + ? `${PascalizeString}` + : Key extends `${infer _F}-${infer _R}` + ? PascalizeSnakeString + : Capitalize; +type PascalizeSnakeString = Key extends `-${infer R}` + ? PascalizeSnakeString + : Key extends `${infer F}${infer M}-${infer R}` + ? `${Uppercase}${Lowercase}${PascalizeSnakeString}` + : Key extends `${infer F}${infer R}` + ? `${Uppercase}${Lowercase}` + : Key; diff --git a/src/tags/JsonSchemaPlugin.ts b/src/tags/JsonSchemaPlugin.ts index bae9ea87be..af6298deeb 100644 --- a/src/tags/JsonSchemaPlugin.ts +++ b/src/tags/JsonSchemaPlugin.ts @@ -1,7 +1,7 @@ import { TagBase } from "./TagBase"; export type JsonSchemaPlugin = TagBase<{ - target: "string" | "boolean" | "bigint" | "number" | "array"; + target: "string" | "boolean" | "bigint" | "number" | "array" | "object"; kind: "jsonPlugin"; value: undefined; schema: Schema; diff --git a/src/tags/Sequence.ts b/src/tags/Sequence.ts new file mode 100644 index 0000000000..7a5d9ed088 --- /dev/null +++ b/src/tags/Sequence.ts @@ -0,0 +1,10 @@ +import { TagBase } from "./TagBase"; + +export type Sequence = TagBase<{ + target: "boolean" | "bigint" | "number" | "string" | "array" | "object"; + kind: "sequence"; + value: N; + schema: { + "x-protobuf-sequence": N; + }; +}>; diff --git a/src/tags/TagBase.ts b/src/tags/TagBase.ts index ee8938e363..2f48b1f930 100644 --- a/src/tags/TagBase.ts +++ b/src/tags/TagBase.ts @@ -10,7 +10,13 @@ export type TagBase< }; export namespace TagBase { export interface IProps< - Target extends "boolean" | "bigint" | "number" | "string" | "array", + Target extends + | "boolean" + | "bigint" + | "number" + | "string" + | "array" + | "object", Kind extends string, Value extends boolean | bigint | number | string | undefined, Validate extends diff --git a/src/tags/Type.ts b/src/tags/Type.ts index c473ef96e6..8f4ef63f4f 100644 --- a/src/tags/Type.ts +++ b/src/tags/Type.ts @@ -7,21 +7,21 @@ export type Type< kind: "type"; value: Value; validate: Value extends "int32" - ? `Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647` + ? `$importInternal("isTypeInt32")($input)` : Value extends "uint32" - ? `Math.floor($input) === $input && 0 <= $input && $input <= 4294967295` + ? `$importInternal("isTypeUint32")($input)` : Value extends "int64" ? { - number: `Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807`; + number: `$importInternal("isTypeInt64")($input)`; bigint: `true`; } : Value extends "uint64" ? { - number: `Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615`; + number: `$importInternal("isTypeUint64")($input)`; bigint: `BigInt(0) <= $input`; } : Value extends "float" - ? `-1.175494351e38 <= $input && $input <= 3.4028235e38` + ? `$importInternal("isTypeFloat")($input)` : `true`; exclusive: true; schema: { diff --git a/src/tags/UniqueItems.ts b/src/tags/UniqueItems.ts index fdf2cfc970..4ca7c37078 100644 --- a/src/tags/UniqueItems.ts +++ b/src/tags/UniqueItems.ts @@ -5,7 +5,7 @@ export type UniqueItems = TagBase<{ kind: "uniqueItems"; value: Value; validate: Value extends true - ? `$input.length <= 1 || ($input.length === new Set($input).size)` + ? `$importInternal("isUniqueItems")($input)` : undefined; exclusive: true; schema: { diff --git a/src/tags/index.ts b/src/tags/index.ts index e4f84ff1f0..4bce2294cd 100644 --- a/src/tags/index.ts +++ b/src/tags/index.ts @@ -15,6 +15,7 @@ export * from "./MinItems"; export * from "./MinLength"; export * from "./MultipleOf"; export * from "./Pattern"; +export * from "./Sequence"; export * from "./TagBase"; export * from "./Type"; export * from "./UniqueItems"; diff --git a/src/transform.ts b/src/transform.ts index 3ea619796f..db1c066435 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,13 +1,13 @@ import ts from "typescript"; import { FileTransformer } from "./transformers/FileTransformer"; -import { IProject } from "./transformers/IProject"; import { ITransformOptions } from "./transformers/ITransformOptions"; +import { ITypiaContext } from "./transformers/ITypiaContext"; export const transform = ( program: ts.Program, options: ITransformOptions | undefined, - extras: IProject["extras"], + extras: ITypiaContext["extras"], ): ts.TransformerFactory => { const compilerOptions: ts.CompilerOptions = program.getCompilerOptions(); const strict: boolean = diff --git a/src/transformers/CallExpressionTransformer.ts b/src/transformers/CallExpressionTransformer.ts index cbd8f3d98f..e934752741 100644 --- a/src/transformers/CallExpressionTransformer.ts +++ b/src/transformers/CallExpressionTransformer.ts @@ -14,7 +14,8 @@ import { FunctionalGenericTransformer } from "./features/functional/FunctionalGe import { NamingConvention } from "../utils/NamingConvention"; -import { IProject } from "./IProject"; +import { ITransformProps } from "./ITransformProps"; +import { ITypiaContext } from "./ITypiaContext"; import { AssertTransformer } from "./features/AssertTransformer"; import { CreateAssertTransformer } from "./features/CreateAssertTransformer"; import { CreateIsTransformer } from "./features/CreateIsTransformer"; @@ -49,7 +50,7 @@ import { HttpQueryTransformer } from "./features/http/HttpQueryTransformer"; import { HttpValidateFormDataTransformer } from "./features/http/HttpValidateFormDataTransformer"; import { HttpValidateHeadersTransformer } from "./features/http/HttpValidateHeadersTransformer"; import { HttpValidateQueryTransformer } from "./features/http/HttpValidateQueryTransformer"; -import { JsonApplicationTransformer } from "./features/json/JsonApplicationTransformer"; +// import { JsonApplicationTransformer } from "./features/json/JsonApplicationTransformer"; import { JsonAssertParseTransformer } from "./features/json/JsonAssertParseTransformer"; import { JsonAssertStringifyTransformer } from "./features/json/JsonAssertStringifyTransformer"; import { JsonCreateAssertParseTransformer } from "./features/json/JsonCreateAssertParseTransformer"; @@ -61,10 +62,12 @@ import { JsonCreateValidateParseTransformer } from "./features/json/JsonCreateVa import { JsonCreateValidateStringifyTransformer } from "./features/json/JsonCreateValidateStringifyProgrammer"; import { JsonIsParseTransformer } from "./features/json/JsonIsParseTransformer"; import { JsonIsStringifyTransformer } from "./features/json/JsonIsStringifyTransformer"; +import { JsonSchemasTransformer } from "./features/json/JsonSchemasTransformer"; import { JsonStringifyTransformer } from "./features/json/JsonStringifyTransformer"; import { JsonValidateParseTransformer } from "./features/json/JsonValidateParseTransformer"; import { JsonValidateStringifyTransformer } from "./features/json/JsonValidateStringifyTransformer"; import { LlmApplicationTransformer } from "./features/llm/LlmApplicationTransformer"; +import { LlmParametersTransformer } from "./features/llm/LlmParametersTransformer"; import { LlmSchemaTransformer } from "./features/llm/LlmSchemaTransformer"; import { MiscAssertCloneTransformer } from "./features/misc/MiscAssertCloneTransformer"; import { MiscAssertPruneTransformer } from "./features/misc/MiscAssertPruneTransformer"; @@ -112,40 +115,42 @@ import { ReflectMetadataTransformer } from "./features/reflect/ReflectMetadataTr import { ReflectNameTransformer } from "./features/reflect/ReflectNameTransformer"; export namespace CallExpressionTransformer { - export const transform = - (project: IProject) => - (expression: ts.CallExpression): ts.Expression | null => { - //---- - // VALIDATIONS - //---- - // SIGNATURE DECLARATION - const declaration: ts.Declaration | undefined = - project.checker.getResolvedSignature(expression)?.declaration; - if (!declaration) return expression; - - // FILE PATH - const location: string = path.resolve( - declaration.getSourceFile().fileName, - ); - if (isTarget(location) === false) return expression; - - //---- - // TRANSFORMATION - //---- - // FUNCTION NAME - const module: string = location.split(path.sep).at(-1)!.split(".")[0]!; - const { name } = project.checker.getTypeAtLocation(declaration).symbol; - - // FIND TRANSFORMER - const functor: (() => Task) | undefined = FUNCTORS[module]?.[name]; - if (functor === undefined) return expression; - - // RETURNS WITH TRANSFORMATION - const result: ts.Expression | null = functor()(project)( - expression.expression, - )(expression); - return result ?? expression; - }; + export const transform = (props: { + context: ITypiaContext; + expression: ts.CallExpression; + }): ts.Expression | null => { + //---- + // VALIDATIONS + //---- + // SIGNATURE DECLARATION + const declaration: ts.Declaration | undefined = + props.context.checker.getResolvedSignature(props.expression)?.declaration; + if (!declaration) return props.expression; + + // FILE PATH + const location: string = path.resolve(declaration.getSourceFile().fileName); + if (isTarget(location) === false) return props.expression; + + //---- + // TRANSFORMATION + //---- + // FUNCTION NAME + const module: string = location.split(path.sep).at(-1)!.split(".")[0]!; + const { name } = + props.context.checker.getTypeAtLocation(declaration).symbol; + + // FIND TRANSFORMER + const functor: (() => Task) | undefined = FUNCTORS[module]?.[name]; + if (functor === undefined) return props.expression; + + // RETURNS WITH TRANSFORMATION + const result: ts.Expression | null = functor()({ + context: props.context, + modulo: props.expression.expression, + expression: props.expression, + }); + return result ?? props.expression; + }; const isTarget = (location: string): boolean => { const files: string[] = Object.keys(FUNCTORS); @@ -155,11 +160,7 @@ export namespace CallExpressionTransformer { }; } -type Task = ( - project: IProject, -) => ( - modulo: ts.LeftHandSideExpression, -) => (expression: ts.CallExpression) => ts.Expression | null; +type Task = (props: ITransformProps) => ts.Expression | null; const FUNCTORS: Record Task>> = { module: { @@ -169,21 +170,20 @@ const FUNCTORS: Record Task>> = { AssertTransformer.transform({ equals: false, guard: true }), assertType: () => AssertTransformer.transform({ equals: false, guard: false }), - is: () => IsTransformer.transform(false), - validate: () => ValidateTransformer.transform(false), + is: () => IsTransformer.transform({ equals: false }), + validate: () => ValidateTransformer.transform({ equals: false }), // STRICT assertEquals: () => AssertTransformer.transform({ equals: true, guard: false }), assertGuardEquals: () => AssertTransformer.transform({ equals: true, guard: true }), - equals: () => IsTransformer.transform(true), - validateEquals: () => ValidateTransformer.transform(true), + equals: () => IsTransformer.transform({ equals: true }), + validateEquals: () => ValidateTransformer.transform({ equals: true }), // RANDOM + INTERNAL random: () => RandomTransformer.transform, - metadata: () => (project) => () => - ReflectMetadataTransformer.transform(project), + metadata: () => ReflectMetadataTransformer.transform, // FACTORIES createAssert: () => @@ -192,14 +192,16 @@ const FUNCTORS: Record Task>> = { CreateAssertTransformer.transform({ equals: false, guard: true }), createAssertType: () => CreateAssertTransformer.transform({ equals: false, guard: false }), - createIs: () => CreateIsTransformer.transform(false), - createValidate: () => CreateValidateTransformer.transform(false), + createIs: () => CreateIsTransformer.transform({ equals: false }), + createValidate: () => + CreateValidateTransformer.transform({ equals: false }), createAssertEquals: () => CreateAssertTransformer.transform({ equals: true, guard: false }), createAssertGuardEquals: () => CreateAssertTransformer.transform({ equals: true, guard: true }), - createEquals: () => CreateIsTransformer.transform(true), - createValidateEquals: () => CreateValidateTransformer.transform(true), + createEquals: () => CreateIsTransformer.transform({ equals: true }), + createValidateEquals: () => + CreateValidateTransformer.transform({ equals: true }), createRandom: () => CreateRandomTransformer.transform, }, functional: { @@ -207,37 +209,49 @@ const FUNCTORS: Record Task>> = { assertFunction: () => FunctionalGenericTransformer.transform({ method: "assertFunction", - equals: false, + config: { + equals: false, + }, programmer: FunctionalAssertFunctionProgrammer.write, }), assertParameters: () => FunctionalGenericTransformer.transform({ method: "assertParameters", - equals: false, + config: { + equals: false, + }, programmer: FunctionalAssertParametersProgrammer.write, }), assertReturn: () => FunctionalGenericTransformer.transform({ method: "assertReturn", - equals: false, + config: { + equals: false, + }, programmer: FunctionAssertReturnProgrammer.write, }), assertEqualsFunction: () => FunctionalGenericTransformer.transform({ method: "assertEqualsFunction", - equals: true, + config: { + equals: true, + }, programmer: FunctionalAssertFunctionProgrammer.write, }), assertEqualsParameters: () => FunctionalGenericTransformer.transform({ method: "assertEqualsParameters", - equals: true, + config: { + equals: true, + }, programmer: FunctionalAssertParametersProgrammer.write, }), assertEqualsReturn: () => FunctionalGenericTransformer.transform({ method: "assertEqualsReturn", - equals: true, + config: { + equals: true, + }, programmer: FunctionAssertReturnProgrammer.write, }), @@ -245,37 +259,49 @@ const FUNCTORS: Record Task>> = { isFunction: () => FunctionalGenericTransformer.transform({ method: "isFunction", - equals: false, + config: { + equals: false, + }, programmer: FunctionalIsFunctionProgrammer.write, }), isParameters: () => FunctionalGenericTransformer.transform({ method: "isParameters", - equals: false, + config: { + equals: false, + }, programmer: FunctionalIsParametersProgrammer.write, }), isReturn: () => FunctionalGenericTransformer.transform({ method: "isReturn", - equals: false, + config: { + equals: false, + }, programmer: FunctionalIsReturnProgrammer.write, }), equalsFunction: () => FunctionalGenericTransformer.transform({ method: "equalsFunction", - equals: true, + config: { + equals: true, + }, programmer: FunctionalIsFunctionProgrammer.write, }), equalsParameters: () => FunctionalGenericTransformer.transform({ method: "equalsParameters", - equals: true, + config: { + equals: true, + }, programmer: FunctionalIsParametersProgrammer.write, }), equalsReturn: () => FunctionalGenericTransformer.transform({ method: "equalsReturn", - equals: true, + config: { + equals: true, + }, programmer: FunctionalIsReturnProgrammer.write, }), @@ -283,37 +309,49 @@ const FUNCTORS: Record Task>> = { validateFunction: () => FunctionalGenericTransformer.transform({ method: "validateFunction", - equals: false, + config: { + equals: false, + }, programmer: FunctionalValidateFunctionProgrammer.write, }), validateParameters: () => FunctionalGenericTransformer.transform({ method: "validateParameters", - equals: false, + config: { + equals: false, + }, programmer: FunctionalValidateParametersProgrammer.write, }), validateReturn: () => FunctionalGenericTransformer.transform({ method: "validateReturn", - equals: false, + config: { + equals: false, + }, programmer: FunctionalValidateReturnProgrammer.write, }), validateEqualsFunction: () => FunctionalGenericTransformer.transform({ method: "validateEqualsFunction", - equals: true, + config: { + equals: true, + }, programmer: FunctionalValidateFunctionProgrammer.write, }), validateEqualsParameters: () => FunctionalGenericTransformer.transform({ method: "validateEqualsParameters", - equals: true, + config: { + equals: true, + }, programmer: FunctionalValidateParametersProgrammer.write, }), validateEqualsReturn: () => FunctionalGenericTransformer.transform({ method: "validateEqualsReturn", - equals: true, + config: { + equals: true, + }, programmer: FunctionalValidateReturnProgrammer.write, }), }, @@ -356,14 +394,15 @@ const FUNCTORS: Record Task>> = { createValidateQuery: () => CreateHttpValidateQueryTransformer.transform, }, llm: { - application: () => (project) => - LlmApplicationTransformer.transform(project), - schema: () => (project) => () => LlmSchemaTransformer.transform(project), + application: () => LlmApplicationTransformer.transform, + parameters: () => LlmParametersTransformer.transform, + schema: () => LlmSchemaTransformer.transform, }, json: { - // SCHEMA - application: () => (project) => () => - JsonApplicationTransformer.transform(project), + // METADATA + // application: () => JsonApplicationTransformer.transform, + application: () => JsonSchemasTransformer.transform, + schemas: () => JsonSchemasTransformer.transform, // PARSER isParse: () => JsonIsParseTransformer.transform, @@ -415,13 +454,11 @@ const FUNCTORS: Record Task>> = { ProtobufCreateValidateDecodeTransformer.transform, }, reflect: { - metadata: () => (project) => () => - ReflectMetadataTransformer.transform(project), - name: () => (project) => () => ReflectNameTransformer.transform(project), + metadata: () => ReflectMetadataTransformer.transform, + name: () => ReflectNameTransformer.transform, }, misc: { - literals: () => (project) => () => - MiscLiteralsTransformer.transform(project), + literals: () => MiscLiteralsTransformer.transform, // CLONE clone: () => MiscCloneTransformer.transform, diff --git a/src/transformers/FileTransformer.ts b/src/transformers/FileTransformer.ts index 4dbca098b2..8e507b15da 100644 --- a/src/transformers/FileTransformer.ts +++ b/src/transformers/FileTransformer.ts @@ -1,60 +1,85 @@ import ts from "typescript"; +import { ImportProgrammer } from "../programmers/ImportProgrammer"; + import { Singleton } from "../utils/Singleton"; -import { IProject } from "./IProject"; +import { ITypiaContext } from "./ITypiaContext"; import { NodeTransformer } from "./NodeTransformer"; import { TransformerError } from "./TransformerError"; export namespace FileTransformer { export const transform = - (environments: Omit) => - (context: ts.TransformationContext) => + (environments: Omit) => + (transformer: ts.TransformationContext) => (file: ts.SourceFile): ts.SourceFile => { if (file.isDeclarationFile) return file; - const project: IProject = { + const importer: ImportProgrammer = new ImportProgrammer({ + internalPrefix: "typia_transform_", + }); + const context: ITypiaContext = { ...environments, - context, + transformer, + importer, }; - checkJsDocParsingMode.get(project, file); + checkJsDocParsingMode.get(context, file); - return ts.visitEachChild( + file = ts.visitEachChild( + file, + (node) => + iterate_node({ + context, + node, + }), + transformer, + ); + return ts.factory.updateSourceFile( file, - (node) => iterate_node(project)(node), - context, + [...importer.toStatements(), ...file.statements], + false, + file.referencedFiles, + file.typeReferenceDirectives, + file.hasNoDefaultLib, + file.libReferenceDirectives, ); }; - const iterate_node = - (project: IProject) => - (node: ts.Node): ts.Node => - ts.visitEachChild( - try_transform_node(project)(node) ?? node, - (child) => iterate_node(project)(child), - project.context, - ); + const iterate_node = (props: { + context: ITypiaContext; + node: ts.Node; + }): ts.Node => + ts.visitEachChild( + try_transform_node(props) ?? props.node, + (node) => + iterate_node({ + context: props.context, + node, + }), + props.context.transformer, + ); - const try_transform_node = - (project: IProject) => - (node: ts.Node): ts.Node | null => { - try { - return NodeTransformer.transform(project)(node); - } catch (exp) { - // ONLY ACCEPT TRANSFORMER-ERROR - if (!isTransformerError(exp)) throw exp; + const try_transform_node = (props: { + context: ITypiaContext; + node: ts.Node; + }): ts.Node | null => { + try { + return NodeTransformer.transform(props); + } catch (exp) { + // ONLY ACCEPT TRANSFORMER-ERROR + if (!isTransformerError(exp)) throw exp; - // REPORT DIAGNOSTIC - const diagnostic = ts.createDiagnosticForNode(node, { - key: exp.code, - category: ts.DiagnosticCategory.Error, - message: exp.message, - code: `(${exp.code})` as any, - }); - project.extras.addDiagnostic(diagnostic); - return null; - } - }; + // REPORT DIAGNOSTIC + const diagnostic = ts.createDiagnosticForNode(props.node, { + key: exp.code, + category: ts.DiagnosticCategory.Error, + message: exp.message, + code: `(${exp.code})` as any, + }); + props.context.extras.addDiagnostic(diagnostic); + return null; + } + }; } const isTransformerError = (error: any): error is TransformerError => @@ -65,12 +90,12 @@ const isTransformerError = (error: any): error is TransformerError => typeof error.message === "string"; const checkJsDocParsingMode = new Singleton( - (project: IProject, file: ts.SourceFile) => { + (context: ITypiaContext, file: ts.SourceFile) => { if ( typeof file.jsDocParsingMode === "number" && file.jsDocParsingMode !== 0 ) { - project.extras.addDiagnostic( + context.extras.addDiagnostic( ts.createDiagnosticForNode(file, { code: `(typia setup)` as any, key: "jsDocParsingMode", diff --git a/src/transformers/IProgrammerProps.ts b/src/transformers/IProgrammerProps.ts new file mode 100644 index 0000000000..3fa1fce8db --- /dev/null +++ b/src/transformers/IProgrammerProps.ts @@ -0,0 +1,11 @@ +import ts from "typescript"; + +import { ITypiaContext } from "./ITypiaContext"; + +export interface IProgrammerProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + type: ts.Type; + name: string | undefined; + init?: ts.Expression | undefined; +} diff --git a/src/transformers/IProject.ts b/src/transformers/IProject.ts deleted file mode 100644 index 5138bf9627..0000000000 --- a/src/transformers/IProject.ts +++ /dev/null @@ -1,15 +0,0 @@ -import ts from "typescript"; - -import { ITransformOptions } from "./ITransformOptions"; - -export interface IProject { - program: ts.Program; - compilerOptions: ts.CompilerOptions; - checker: ts.TypeChecker; - printer: ts.Printer; - options: ITransformOptions; - context: ts.TransformationContext; - extras: { - addDiagnostic: (diag: ts.Diagnostic) => number; - }; -} diff --git a/src/transformers/ITransformProps.ts b/src/transformers/ITransformProps.ts new file mode 100644 index 0000000000..386c110732 --- /dev/null +++ b/src/transformers/ITransformProps.ts @@ -0,0 +1,9 @@ +import ts from "typescript"; + +import { ITypiaContext } from "./ITypiaContext"; + +export interface ITransformProps { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + expression: ts.CallExpression; +} diff --git a/src/transformers/ITypiaContext.ts b/src/transformers/ITypiaContext.ts new file mode 100644 index 0000000000..0615dda3b9 --- /dev/null +++ b/src/transformers/ITypiaContext.ts @@ -0,0 +1,18 @@ +import ts from "typescript"; + +import { ImportProgrammer } from "../programmers/ImportProgrammer"; + +import { ITransformOptions } from "./ITransformOptions"; + +export interface ITypiaContext { + program: ts.Program; + compilerOptions: ts.CompilerOptions; + checker: ts.TypeChecker; + printer: ts.Printer; + options: ITransformOptions; + transformer: ts.TransformationContext; + importer: ImportProgrammer; + extras: { + addDiagnostic: (diag: ts.Diagnostic) => number; + }; +} diff --git a/src/transformers/ImportTransformer.ts b/src/transformers/ImportTransformer.ts index b60c617b49..0117d8d2b7 100644 --- a/src/transformers/ImportTransformer.ts +++ b/src/transformers/ImportTransformer.ts @@ -3,60 +3,75 @@ import ts from "typescript"; export namespace ImportTransformer { export const transform = - (from: string) => - (to: string) => + (props: { from: string; to: string }) => (context: ts.TransformationContext) => (file: ts.SourceFile) => - transform_file(from)(to)(context)(file); + transform_file({ + top: props.from, + to: props.to, + context, + file, + }); - const transform_file = - (top: string) => - (to: string) => - (context: ts.TransformationContext) => - (file: ts.SourceFile): ts.SourceFile => { - if (file.isDeclarationFile) return file; + const transform_file = (props: { + top: string; + to: string; + context: ts.TransformationContext; + file: ts.SourceFile; + }): ts.SourceFile => { + if (props.file.isDeclarationFile) return props.file; - const from: string = get_directory_path( - path.resolve(file.getSourceFile().fileName), - ); - to = from.replace(top, to); + const from: string = get_directory_path( + path.resolve(props.file.getSourceFile().fileName), + ); + const to: string = from.replace(props.top, props.to); - return ts.visitEachChild( - file, - (node) => transform_node(top)(from)(to)(node), - context, - ); - }; + return ts.visitEachChild( + props.file, + (node) => + transform_node({ + top: props.top, + from, + to, + node, + }), + props.context, + ); + }; - const transform_node = - (top: string) => (from: string) => (to: string) => (node: ts.Node) => { - if ( - !ts.isImportDeclaration(node) || - !ts.isStringLiteral(node.moduleSpecifier) - ) - return node; + const transform_node = (props: { + top: string; + from: string; + to: string; + node: ts.Node; + }) => { + if ( + !ts.isImportDeclaration(props.node) || + !ts.isStringLiteral(props.node.moduleSpecifier) + ) + return props.node; - const text: string = node.moduleSpecifier.text; - if (text[0] !== ".") return node; + const text: string = props.node.moduleSpecifier.text; + if (text[0] !== ".") return props.node; - const location: string = path.resolve(from, text); - if (location.indexOf(top) === 0) return node; + const location: string = path.resolve(props.from, text); + if (location.indexOf(props.top) === 0) return props.node; - const replaced: string = (() => { - const simple: string = path - .relative(to, location) - .split(path.sep) - .join("/"); - return simple[0] === "." ? simple : `./${simple}`; - })(); + const replaced: string = (() => { + const simple: string = path + .relative(props.to, location) + .split(path.sep) + .join("/"); + return simple[0] === "." ? simple : `./${simple}`; + })(); - return ts.factory.createImportDeclaration( - undefined, - node.importClause, - ts.factory.createStringLiteral(replaced), - node.assertClause, - ); - }; + return ts.factory.createImportDeclaration( + undefined, + props.node.importClause, + ts.factory.createStringLiteral(replaced), + props.node.assertClause, + ); + }; } const get_directory_path = (file: string): string => { diff --git a/src/transformers/NodeTransformer.ts b/src/transformers/NodeTransformer.ts index 98e915c22f..ffce0d80b2 100644 --- a/src/transformers/NodeTransformer.ts +++ b/src/transformers/NodeTransformer.ts @@ -1,13 +1,17 @@ import ts from "typescript"; import { CallExpressionTransformer } from "./CallExpressionTransformer"; -import { IProject } from "./IProject"; +import { ITypiaContext } from "./ITypiaContext"; export namespace NodeTransformer { - export const transform = - (project: IProject) => - (expression: ts.Node): ts.Node | null => - ts.isCallExpression(expression) && expression.parent - ? CallExpressionTransformer.transform(project)(expression) - : expression; + export const transform = (props: { + context: ITypiaContext; + node: ts.Node; + }): ts.Node | null => + ts.isCallExpression(props.node) && props.node.parent + ? CallExpressionTransformer.transform({ + context: props.context, + expression: props.node, + }) + : props.node; } diff --git a/src/transformers/TransformerError.ts b/src/transformers/TransformerError.ts index fcecfdc6da..62f7df8e1e 100644 --- a/src/transformers/TransformerError.ts +++ b/src/transformers/TransformerError.ts @@ -1,6 +1,6 @@ import { MetadataFactory } from "../factories/MetadataFactory"; -import { MetadataObject } from "../schemas/metadata/MetadataObject"; +import { MetadataObjectType } from "../schemas/metadata/MetadataObjectType"; import { Escaper } from "../utils/Escaper"; @@ -23,38 +23,38 @@ export namespace TransformerError { message: string; } - export const from = - (method: string) => - (errors: MetadataFactory.IError[]): TransformerError => { - const body: string = errors - .map((e) => { - const subject: string = - e.explore.object === null - ? "" - : join(e.explore.object)(e.explore.property); - const middle: string = e.explore.parameter - ? `(parameter: ${JSON.stringify(e.explore.parameter)})` - : e.explore.output - ? "(return type)" - : ""; - const type: string = `${subject.length ? `${subject}: ` : ""}${ - e.name - }`; - return `- ${type}${middle}\n${e.messages - .map((msg) => ` - ${msg}`) - .join("\n")}`; - }) - .join("\n\n"); - return new TransformerError({ - code: method, - message: `unsupported type detected\n\n${body}`, - }); - }; - - const join = (object: MetadataObject) => (key: string | object | null) => { - if (key === null) return object.name; - else if (typeof key === "object") return `${object.name}[key]`; - else if (Escaper.variable(key)) return `${object.name}.${key}`; - return `${object.name}[${JSON.stringify(key)}]`; + export const from = (props: { + code: string; + errors: MetadataFactory.IError[]; + }): TransformerError => { + const body: string = props.errors + .map((e) => { + const subject: string = + e.explore.object === null + ? "" + : join(e.explore.object)(e.explore.property); + const middle: string = e.explore.parameter + ? `(parameter: ${JSON.stringify(e.explore.parameter)})` + : e.explore.output + ? "(return type)" + : ""; + const type: string = `${subject.length ? `${subject}: ` : ""}${e.name}`; + return `- ${type}${middle}\n${e.messages + .map((msg) => ` - ${msg}`) + .join("\n")}`; + }) + .join("\n\n"); + return new TransformerError({ + code: props.code, + message: `unsupported type detected\n\n${body}`, + }); }; + + const join = + (object: MetadataObjectType) => (key: string | object | null) => { + if (key === null) return object.name; + else if (typeof key === "object") return `${object.name}[key]`; + else if (Escaper.variable(key)) return `${object.name}.${key}`; + return `${object.name}[${JSON.stringify(key)}]`; + }; } diff --git a/src/transformers/features/AssertTransformer.ts b/src/transformers/features/AssertTransformer.ts index 4b64577eba..06eb67345c 100644 --- a/src/transformers/features/AssertTransformer.ts +++ b/src/transformers/features/AssertTransformer.ts @@ -1,16 +1,24 @@ import { AssertProgrammer } from "../../programmers/AssertProgrammer"; +import { ITransformProps } from "../ITransformProps"; import { GenericTransformer } from "../internal/GenericTransformer"; export namespace AssertTransformer { - export const transform = (props: { equals: boolean; guard: boolean }) => - GenericTransformer.scalar( - props.equals - ? props.guard - ? "assertGuardEquals" - : "assertEquals" - : props.guard - ? "assertGuard" - : "assert", - )((project) => (modulo) => AssertProgrammer.write(project)(modulo)(props)); + export const transform = + (config: AssertProgrammer.IConfig) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: config.equals + ? config.guard + ? "assertGuardEquals" + : "assertEquals" + : config.guard + ? "assertGuard" + : "assert", + write: (x) => + AssertProgrammer.write({ + ...x, + config, + }), + }); } diff --git a/src/transformers/features/CreateAssertTransformer.ts b/src/transformers/features/CreateAssertTransformer.ts index 384ce79fb2..78485efef1 100644 --- a/src/transformers/features/CreateAssertTransformer.ts +++ b/src/transformers/features/CreateAssertTransformer.ts @@ -1,16 +1,24 @@ import { AssertProgrammer } from "../../programmers/AssertProgrammer"; +import { ITransformProps } from "../ITransformProps"; import { GenericTransformer } from "../internal/GenericTransformer"; export namespace CreateAssertTransformer { - export const transform = (props: { equals: boolean; guard: boolean }) => - GenericTransformer.factory( - props.equals - ? props.guard - ? "createAssertGuardEquals" - : "createAssertEquals" - : props.guard - ? "createAssertGuard" - : "createAssert", - )((project) => (modulo) => AssertProgrammer.write(project)(modulo)(props)); + export const transform = + (config: AssertProgrammer.IConfig) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: config.equals + ? config.guard + ? "assertGuardEquals" + : "assertEquals" + : config.guard + ? "assertGuard" + : "assert", + write: (x) => + AssertProgrammer.write({ + ...x, + config, + }), + }); } diff --git a/src/transformers/features/CreateIsTransformer.ts b/src/transformers/features/CreateIsTransformer.ts index 3ace32e84c..56b2ebb1dd 100644 --- a/src/transformers/features/CreateIsTransformer.ts +++ b/src/transformers/features/CreateIsTransformer.ts @@ -1,10 +1,18 @@ import { IsProgrammer } from "../../programmers/IsProgrammer"; +import { ITransformProps } from "../ITransformProps"; import { GenericTransformer } from "../internal/GenericTransformer"; export namespace CreateIsTransformer { - export const transform = (equals: boolean) => - GenericTransformer.factory(equals ? "createEquals" : "createIs")( - (project) => (modulo) => IsProgrammer.write(project)(modulo)(equals), - ); + export const transform = + (config: IsProgrammer.IConfig) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: config.equals ? "equals" : "is", + write: (x) => + IsProgrammer.write({ + ...x, + config, + }), + }); } diff --git a/src/transformers/features/CreateRandomTransformer.ts b/src/transformers/features/CreateRandomTransformer.ts index f0bc8a34d7..ac5bbc9a94 100644 --- a/src/transformers/features/CreateRandomTransformer.ts +++ b/src/transformers/features/CreateRandomTransformer.ts @@ -2,39 +2,42 @@ import ts from "typescript"; import { RandomProgrammer } from "../../programmers/RandomProgrammer"; -import { IProject } from "../IProject"; +import { ITransformProps } from "../ITransformProps"; import { TransformerError } from "../TransformerError"; export namespace CreateRandomTransformer { - export const transform = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression): ts.Expression => { - // CHECK GENERIC ARGUMENT EXISTENCE - if (!expression.typeArguments?.[0]) - throw new TransformerError({ - code: "typia.createRandom", - message: "generic argument is not specified.", - }); + export const transform = (props: ITransformProps): ts.Expression => { + // CHECK GENERIC ARGUMENT EXISTENCE + if (!props.expression.typeArguments?.[0]) + throw new TransformerError({ + code: "typia.createRandom", + message: "generic argument is not specified.", + }); - // GET TYPE INFO - const node: ts.TypeNode = expression.typeArguments[0]; - const type: ts.Type = project.checker.getTypeFromTypeNode(node); + // GET TYPE INFO + const node: ts.TypeNode = props.expression.typeArguments[0]; + const type: ts.Type = props.context.checker.getTypeFromTypeNode(node); - if (type.isTypeParameter()) - throw new TransformerError({ - code: "typia.createRandom", - message: "non-specified generic argument.", - }); + if (type.isTypeParameter()) + throw new TransformerError({ + code: "typia.createRandom", + message: "non-specified generic argument.", + }); - // DO TRANSFORM - return RandomProgrammer.write({ - ...project, + // DO TRANSFORM + return RandomProgrammer.write({ + context: { + ...props.context, options: { - ...project.options, + ...props.context.options, functional: false, numeric: false, }, - })(modulo)(expression.arguments?.[0])(type, node.getFullText().trim()); - }; + }, + modulo: props.modulo, + type, + name: node.getFullText().trim(), + init: props.expression.arguments?.[0], + }); + }; } diff --git a/src/transformers/features/CreateValidateTransformer.ts b/src/transformers/features/CreateValidateTransformer.ts index f583c38e1a..1968f181c4 100644 --- a/src/transformers/features/CreateValidateTransformer.ts +++ b/src/transformers/features/CreateValidateTransformer.ts @@ -1,13 +1,18 @@ import { ValidateProgrammer } from "../../programmers/ValidateProgrammer"; +import { ITransformProps } from "../ITransformProps"; import { GenericTransformer } from "../internal/GenericTransformer"; export namespace CreateValidateTransformer { - export const transform = (equals: boolean) => - GenericTransformer.factory( - equals ? "createValidateEquals" : "createValidate", - )( - (project) => (modulo) => - ValidateProgrammer.write(project)(modulo)(equals), - ); + export const transform = + (config: ValidateProgrammer.IConfig) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: config.equals ? "validateEquals" : "validate", + write: (x) => + ValidateProgrammer.write({ + ...x, + config, + }), + }); } diff --git a/src/transformers/features/IsTransformer.ts b/src/transformers/features/IsTransformer.ts index 4146bce507..1cabf757b4 100644 --- a/src/transformers/features/IsTransformer.ts +++ b/src/transformers/features/IsTransformer.ts @@ -1,10 +1,18 @@ import { IsProgrammer } from "../../programmers/IsProgrammer"; +import { ITransformProps } from "../ITransformProps"; import { GenericTransformer } from "../internal/GenericTransformer"; export namespace IsTransformer { - export const transform = (equals: boolean) => - GenericTransformer.scalar(equals ? "equals" : "is")( - (project) => (modulo) => IsProgrammer.write(project)(modulo)(equals), - ); + export const transform = + (config: IsProgrammer.IConfig) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: config.equals ? "equals" : "is", + write: (x) => + IsProgrammer.write({ + ...x, + config, + }), + }); } diff --git a/src/transformers/features/RandomTransformer.ts b/src/transformers/features/RandomTransformer.ts index b656dd4a7c..9e4a157802 100644 --- a/src/transformers/features/RandomTransformer.ts +++ b/src/transformers/features/RandomTransformer.ts @@ -2,43 +2,40 @@ import ts from "typescript"; import { RandomProgrammer } from "../../programmers/RandomProgrammer"; -import { IProject } from "../IProject"; +import { ITransformProps } from "../ITransformProps"; import { TransformerError } from "../TransformerError"; export namespace RandomTransformer { - export const transform = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression): ts.Expression => { - // CHECK GENERIC ARGUMENT EXISTENCE - if (!expression.typeArguments?.[0]) - throw new TransformerError({ - code: `typia.${modulo.getText()}`, - message: "generic argument is not specified.", - }); + export const transform = (props: ITransformProps): ts.Expression => { + // CHECK GENERIC ARGUMENT EXISTENCE + if (!props.expression.typeArguments?.[0]) + throw new TransformerError({ + code: `typia.${props.modulo.getText()}`, + message: "generic argument is not specified.", + }); - // GET TYPE INFO - const node: ts.TypeNode = expression.typeArguments[0]; - const type: ts.Type = project.checker.getTypeFromTypeNode(node); + // GET TYPE INFO + const node: ts.TypeNode = props.expression.typeArguments[0]; + const type: ts.Type = props.context.checker.getTypeFromTypeNode(node); - if (type.isTypeParameter()) - throw new TransformerError({ - code: `typia.${modulo.getText()}`, - message: "non-specified generic argument.", - }); + if (type.isTypeParameter()) + throw new TransformerError({ + code: `typia.${props.modulo.getText()}`, + message: "non-specified generic argument.", + }); - // DO TRANSFORM - return ts.factory.createCallExpression( - RandomProgrammer.write({ - ...project, - options: { - ...project.options, - functional: false, - numeric: false, - }, - })(modulo)()(type, node.getFullText().trim()), - undefined, - expression.arguments.length ? [expression.arguments[0]!] : undefined, - ); - }; + return ts.factory.createCallExpression( + RandomProgrammer.write({ + context: props.context, + modulo: props.modulo, + type, + name: node.getFullText().trim(), + init: undefined, + }), + undefined, + props.expression.arguments.length + ? [props.expression.arguments[0]!] + : undefined, + ); + }; } diff --git a/src/transformers/features/ValidateTransformer.ts b/src/transformers/features/ValidateTransformer.ts index 4bed1f5231..3a016f2408 100644 --- a/src/transformers/features/ValidateTransformer.ts +++ b/src/transformers/features/ValidateTransformer.ts @@ -1,11 +1,18 @@ import { ValidateProgrammer } from "../../programmers/ValidateProgrammer"; +import { ITransformProps } from "../ITransformProps"; import { GenericTransformer } from "../internal/GenericTransformer"; export namespace ValidateTransformer { - export const transform = (equals: boolean) => - GenericTransformer.scalar(equals ? "validateEquals" : "validate")( - (project) => (modulo) => - ValidateProgrammer.write(project)(modulo)(equals), - ); + export const transform = + (config: ValidateProgrammer.IConfig) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: config.equals ? "validateEquals" : "validate", + write: (x) => + ValidateProgrammer.write({ + ...x, + config, + }), + }); } diff --git a/src/transformers/features/functional/FunctionalGenericTransformer.ts b/src/transformers/features/functional/FunctionalGenericTransformer.ts index 4ef8f3e257..821aefbe7b 100644 --- a/src/transformers/features/functional/FunctionalGenericTransformer.ts +++ b/src/transformers/features/functional/FunctionalGenericTransformer.ts @@ -2,56 +2,56 @@ import ts from "typescript"; import { TypeFactory } from "../../../factories/TypeFactory"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; +import { ITypiaContext } from "../../ITypiaContext"; import { TransformerError } from "../../TransformerError"; export namespace FunctionalGenericTransformer { + export interface IConfig { + equals: boolean; + } + export interface ISpecification { + method: string; + config: IConfig; + programmer: (p: { + context: ITypiaContext; + modulo: ts.LeftHandSideExpression; + expression: ts.Expression; + declaration: ts.FunctionDeclaration; + config: IConfig; + init?: ts.Expression; + }) => ts.Expression; + } export const transform = - (props: { - method: string; - programmer: ( - project: IProject, - ) => ( - modulo: ts.LeftHandSideExpression, - ) => ( - equals: boolean, - ) => ( - expression: ts.Expression, - declaration: ts.FunctionDeclaration, - init?: ts.Expression, - ) => ts.Expression; - equals: boolean; - }) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression) => { + (spec: ISpecification) => + (props: ITransformProps): ts.Expression => { // CHECK PARAMETER - if (expression.arguments.length === 0) + if (props.expression.arguments.length === 0) throw new TransformerError({ - code: `typia.functional.${props.method}`, + code: `typia.functional.${spec.method}`, message: `no input value.`, }); // GET TYPE INFO const type: ts.Type = - expression.typeArguments && expression.typeArguments[0] - ? project.checker.getTypeFromTypeNode(expression.typeArguments[0]) - : project.checker.getTypeAtLocation(expression.arguments[0]!); - // if (type. === true) - // throw new TransformerError({ - // code: `typia.functional.${props.method}`, - // message: `non-specified generic argument.`, - // }); - // else + props.expression.typeArguments && props.expression.typeArguments[0] + ? props.context.checker.getTypeFromTypeNode( + props.expression.typeArguments[0], + ) + : props.context.checker.getTypeAtLocation( + props.expression.arguments[0]!, + ); if (TypeFactory.isFunction(type) === false) throw new TransformerError({ - code: `typia.functional.${props.method}`, + code: `typia.functional.${spec.method}`, message: `input value is not a function.`, }); - return props.programmer(project)(modulo)(props.equals)( - expression.arguments[0]!, - type.symbol!.declarations![0] as ts.FunctionDeclaration, - expression.arguments[1], - ); + return spec.programmer({ + ...props, + config: spec.config, + expression: props.expression.arguments[0] as ts.Expression, + declaration: type.symbol!.declarations![0] as ts.FunctionDeclaration, + init: props.expression.arguments[1], + }); }; } diff --git a/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts b/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts index e4068d5f58..39c612181f 100644 --- a/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts +++ b/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts @@ -1,12 +1,13 @@ import { HttpAssertFormDataProgrammer } from "../../../programmers/http/HttpAssertFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpAssertFormDataTransformer { - export const transform = GenericTransformer.factory( - "http.createAssertFormData", - )( - (project) => (modulo) => - HttpAssertFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createAssertFormData", + write: HttpAssertFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts b/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts index 5bfb86a4b9..58975724dc 100644 --- a/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +++ b/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts @@ -1,11 +1,13 @@ import { HttpAssertHeadersProgrammer } from "../../../programmers/http/HttpAssertHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpAssertHeadersTransformer { - export const transform = GenericTransformer.factory( - "http.createAssertHeaders", - )( - (project) => (modulo) => HttpAssertHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createAssertHeaders", + write: HttpAssertHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts b/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts index dae8801167..7d814d50b8 100644 --- a/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +++ b/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpAssertQueryProgrammer } from "../../../programmers/http/HttpAssertQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpAssertQueryTransformer { - export const transform = GenericTransformer.factory("http.createAssertQuery")( - (project) => (modulo) => HttpAssertQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createAssertQuery", + write: HttpAssertQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpFormDataTransformer.ts b/src/transformers/features/http/CreateHttpFormDataTransformer.ts index 4da4bbd42c..0fe3e6a9d2 100644 --- a/src/transformers/features/http/CreateHttpFormDataTransformer.ts +++ b/src/transformers/features/http/CreateHttpFormDataTransformer.ts @@ -1,9 +1,13 @@ import { HttpFormDataProgrammer } from "../../../programmers/http/HttpFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpFormDataTransformer { - export const transform = GenericTransformer.factory("http.createFormData")( - (project) => (modulo) => HttpFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createFormData", + write: HttpFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpHeadersTransformer.ts b/src/transformers/features/http/CreateHttpHeadersTransformer.ts index ca389b3516..1a5677f958 100644 --- a/src/transformers/features/http/CreateHttpHeadersTransformer.ts +++ b/src/transformers/features/http/CreateHttpHeadersTransformer.ts @@ -1,9 +1,13 @@ import { HttpHeadersProgrammer } from "../../../programmers/http/HttpHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpHeadersTransformer { - export const transform = GenericTransformer.factory("http.createHeaders")( - (project) => (modulo) => HttpHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createHeaders", + write: HttpHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts b/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts index f3ef14c1f5..61c002eb03 100644 --- a/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts +++ b/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts @@ -1,9 +1,13 @@ import { HttpIsFormDataProgrammer } from "../../../programmers/http/HttpIsFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpIsFormDataTransformer { - export const transform = GenericTransformer.factory("http.createIsFormData")( - (project) => (modulo) => HttpIsFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createIsFormData", + write: HttpIsFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts b/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts index 22f743ca51..6239763544 100644 --- a/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +++ b/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts @@ -1,9 +1,13 @@ import { HttpIsHeadersProgrammer } from "../../../programmers/http/HttpIsHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpIsHeadersTransformer { - export const transform = GenericTransformer.factory("http.createIsHeaders")( - (project) => (modulo) => HttpIsHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createIsHeaders", + write: HttpIsHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpIsQueryTransformer.ts b/src/transformers/features/http/CreateHttpIsQueryTransformer.ts index 4e8f1df87e..d04713f304 100644 --- a/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +++ b/src/transformers/features/http/CreateHttpIsQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpIsQueryProgrammer } from "../../../programmers/http/HttpIsQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpIsQueryTransformer { - export const transform = GenericTransformer.factory("http.createIsQuery")( - (project) => (modulo) => HttpIsQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createIsQuery", + write: HttpIsQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpParameterTransformer.ts b/src/transformers/features/http/CreateHttpParameterTransformer.ts index bd54ca91b1..4c2a435c85 100644 --- a/src/transformers/features/http/CreateHttpParameterTransformer.ts +++ b/src/transformers/features/http/CreateHttpParameterTransformer.ts @@ -1,9 +1,13 @@ import { HttpParameterProgrammer } from "../../../programmers/http/HttpParameterProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpParameterTransformer { - export const transform = GenericTransformer.factory("http.createParameter")( - (project) => (modulo) => HttpParameterProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createParameter", + write: HttpParameterProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpQueryTransformer.ts b/src/transformers/features/http/CreateHttpQueryTransformer.ts index 1aa964efc4..f1bcc5030f 100644 --- a/src/transformers/features/http/CreateHttpQueryTransformer.ts +++ b/src/transformers/features/http/CreateHttpQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpQueryProgrammer } from "../../../programmers/http/HttpQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpQueryTransformer { - export const transform = GenericTransformer.factory("http.createQuery")( - (project) => (modulo) => HttpQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createQuery", + write: HttpQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts b/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts index ae4095844d..6b15b712a9 100644 --- a/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts +++ b/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts @@ -1,12 +1,13 @@ import { HttpValidateFormDataProgrammer } from "../../../programmers/http/HttpValidateFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpValidateFormDataTransformer { - export const transform = GenericTransformer.factory( - "http.createValidateFormData", - )( - (project) => (modulo) => - HttpValidateFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createValidateFormData", + write: HttpValidateFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts b/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts index 5abfb03732..d8673f48b9 100644 --- a/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +++ b/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts @@ -1,12 +1,13 @@ import { HttpValidateHeadersProgrammer } from "../../../programmers/http/HttpValidateHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpValidateHeadersTransformer { - export const transform = GenericTransformer.factory( - "http.createValidateHeaders", - )( - (project) => (modulo) => - HttpValidateHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createValidateHeaders", + write: HttpValidateHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts b/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts index 690c41c693..d762ed0193 100644 --- a/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +++ b/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts @@ -1,11 +1,13 @@ import { HttpValidateQueryProgrammer } from "../../../programmers/http/HttpValidateQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace CreateHttpValidateQueryTransformer { - export const transform = GenericTransformer.factory( - "http.createValidateQuery", - )( - (project) => (modulo) => HttpValidateQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "http.createValidateQuery", + write: HttpValidateQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpAssertFormDataTransformer.ts b/src/transformers/features/http/HttpAssertFormDataTransformer.ts index 40de9836e7..c6f588d8ab 100644 --- a/src/transformers/features/http/HttpAssertFormDataTransformer.ts +++ b/src/transformers/features/http/HttpAssertFormDataTransformer.ts @@ -1,10 +1,13 @@ import { HttpAssertFormDataProgrammer } from "../../../programmers/http/HttpAssertFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpAssertFormDataTransformer { - export const transform = GenericTransformer.scalar("http.assertFormData")( - (project) => (modulo) => - HttpAssertFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.assertFormData", + write: HttpAssertFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpAssertHeadersTransformer.ts b/src/transformers/features/http/HttpAssertHeadersTransformer.ts index c6e8cdbb83..54d819db0a 100644 --- a/src/transformers/features/http/HttpAssertHeadersTransformer.ts +++ b/src/transformers/features/http/HttpAssertHeadersTransformer.ts @@ -1,9 +1,13 @@ import { HttpAssertHeadersProgrammer } from "../../../programmers/http/HttpAssertHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpAssertHeadersTransformer { - export const transform = GenericTransformer.scalar("http.assertHeaders")( - (project) => (modulo) => HttpAssertHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.assertHeaders", + write: HttpAssertHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpAssertQueryTransformer.ts b/src/transformers/features/http/HttpAssertQueryTransformer.ts index 6b632ec521..93dfab6969 100644 --- a/src/transformers/features/http/HttpAssertQueryTransformer.ts +++ b/src/transformers/features/http/HttpAssertQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpAssertQueryProgrammer } from "../../../programmers/http/HttpAssertQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpAssertQueryTransformer { - export const transform = GenericTransformer.scalar("http.assertQuery")( - (project) => (modulo) => HttpAssertQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.assertQuery", + write: HttpAssertQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpFormDataTransformer.ts b/src/transformers/features/http/HttpFormDataTransformer.ts index 5b7c3f29ad..fcad78e637 100644 --- a/src/transformers/features/http/HttpFormDataTransformer.ts +++ b/src/transformers/features/http/HttpFormDataTransformer.ts @@ -1,9 +1,13 @@ import { HttpFormDataProgrammer } from "../../../programmers/http/HttpFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpFormDataTransformer { - export const transform = GenericTransformer.scalar("http.formdata")( - (project) => (modulo) => HttpFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.formdata", + write: HttpFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpHeadersTransformer.ts b/src/transformers/features/http/HttpHeadersTransformer.ts index 1381a24f05..56112c6044 100644 --- a/src/transformers/features/http/HttpHeadersTransformer.ts +++ b/src/transformers/features/http/HttpHeadersTransformer.ts @@ -1,9 +1,13 @@ import { HttpHeadersProgrammer } from "../../../programmers/http/HttpHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpHeadersTransformer { - export const transform = GenericTransformer.scalar("http.headers")( - (project) => (modulo) => HttpHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.headers", + write: HttpHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpIsFormDataTransformer.ts b/src/transformers/features/http/HttpIsFormDataTransformer.ts index b5ffa9de33..5cd8f86dbb 100644 --- a/src/transformers/features/http/HttpIsFormDataTransformer.ts +++ b/src/transformers/features/http/HttpIsFormDataTransformer.ts @@ -1,9 +1,13 @@ import { HttpIsFormDataProgrammer } from "../../../programmers/http/HttpIsFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpIsFormDataTransformer { - export const transform = GenericTransformer.scalar("http.isFormData")( - (project) => (modulo) => HttpIsFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.isFormData", + write: HttpIsFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpIsHeadersTransformer.ts b/src/transformers/features/http/HttpIsHeadersTransformer.ts index 017ff17f18..bcdb495c95 100644 --- a/src/transformers/features/http/HttpIsHeadersTransformer.ts +++ b/src/transformers/features/http/HttpIsHeadersTransformer.ts @@ -1,9 +1,13 @@ import { HttpIsHeadersProgrammer } from "../../../programmers/http/HttpIsHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpIsHeadersTransformer { - export const transform = GenericTransformer.scalar("http.isHeaders")( - (project) => (modulo) => HttpIsHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.isHeaders", + write: HttpIsHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpIsQueryTransformer.ts b/src/transformers/features/http/HttpIsQueryTransformer.ts index 29d6dc9a8a..dd2bb468e0 100644 --- a/src/transformers/features/http/HttpIsQueryTransformer.ts +++ b/src/transformers/features/http/HttpIsQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpIsQueryProgrammer } from "../../../programmers/http/HttpIsQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpIsQueryTransformer { - export const transform = GenericTransformer.scalar("http.isQuery")( - (project) => (modulo) => HttpIsQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.isQuery", + write: HttpIsQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpParameterTransformer.ts b/src/transformers/features/http/HttpParameterTransformer.ts index 93cdb76b73..c80ac5bcb6 100644 --- a/src/transformers/features/http/HttpParameterTransformer.ts +++ b/src/transformers/features/http/HttpParameterTransformer.ts @@ -1,9 +1,13 @@ import { HttpParameterProgrammer } from "../../../programmers/http/HttpParameterProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpParameterTransformer { - export const transform = GenericTransformer.scalar("http.parameter")( - (project) => (modulo) => HttpParameterProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.parameter", + write: HttpParameterProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpQueryTransformer.ts b/src/transformers/features/http/HttpQueryTransformer.ts index e9c1bf4861..ce22cb071b 100644 --- a/src/transformers/features/http/HttpQueryTransformer.ts +++ b/src/transformers/features/http/HttpQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpQueryProgrammer } from "../../../programmers/http/HttpQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpQueryTransformer { - export const transform = GenericTransformer.scalar("http.query")( - (project) => (modulo) => HttpQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.query", + write: HttpQueryProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpValidateFormDataTransformer.ts b/src/transformers/features/http/HttpValidateFormDataTransformer.ts index 3cf3d5b794..4c99af1806 100644 --- a/src/transformers/features/http/HttpValidateFormDataTransformer.ts +++ b/src/transformers/features/http/HttpValidateFormDataTransformer.ts @@ -1,10 +1,13 @@ import { HttpValidateFormDataProgrammer } from "../../../programmers/http/HttpValidateFormDataProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpValidateFormDataTransformer { - export const transform = GenericTransformer.scalar("http.validateFormData")( - (project) => (modulo) => - HttpValidateFormDataProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.validateFormData", + write: HttpValidateFormDataProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpValidateHeadersTransformer.ts b/src/transformers/features/http/HttpValidateHeadersTransformer.ts index 010c67de26..35695fc138 100644 --- a/src/transformers/features/http/HttpValidateHeadersTransformer.ts +++ b/src/transformers/features/http/HttpValidateHeadersTransformer.ts @@ -1,10 +1,13 @@ import { HttpValidateHeadersProgrammer } from "../../../programmers/http/HttpValidateHeadersProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpValidateHeadersTransformer { - export const transform = GenericTransformer.scalar("http.validateHeaders")( - (project) => (modulo) => - HttpValidateHeadersProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.validateHeaders", + write: HttpValidateHeadersProgrammer.write, + }); } diff --git a/src/transformers/features/http/HttpValidateQueryTransformer.ts b/src/transformers/features/http/HttpValidateQueryTransformer.ts index 229c74037d..c24c745bd4 100644 --- a/src/transformers/features/http/HttpValidateQueryTransformer.ts +++ b/src/transformers/features/http/HttpValidateQueryTransformer.ts @@ -1,9 +1,13 @@ import { HttpValidateQueryProgrammer } from "../../../programmers/http/HttpValidateQueryProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace HttpValidateQueryTransformer { - export const transform = GenericTransformer.scalar("http.validateQuery")( - (project) => (modulo) => HttpValidateQueryProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "http.validateQuery", + write: HttpValidateQueryProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonApplicationTransformer.ts b/src/transformers/features/json/JsonApplicationTransformer.ts index f059dd8a2f..583502d74b 100644 --- a/src/transformers/features/json/JsonApplicationTransformer.ts +++ b/src/transformers/features/json/JsonApplicationTransformer.ts @@ -1,124 +1,105 @@ -import ts from "typescript"; +// import ts from "typescript"; -import { LiteralFactory } from "../../../factories/LiteralFactory"; -import { MetadataCollection } from "../../../factories/MetadataCollection"; -import { MetadataFactory } from "../../../factories/MetadataFactory"; +// import { LiteralFactory } from "../../../factories/LiteralFactory"; +// import { MetadataCollection } from "../../../factories/MetadataCollection"; +// import { MetadataFactory } from "../../../factories/MetadataFactory"; -import { IJsonApplication } from "../../../schemas/json/IJsonApplication"; -import { Metadata } from "../../../schemas/metadata/Metadata"; +// import { IJsonApplication } from "../../../schemas/json/IJsonApplication"; +// import { Metadata } from "../../../schemas/metadata/Metadata"; -import { JsonApplicationProgrammer } from "../../../programmers/json/JsonApplicationProgrammer"; +// import { JsonApplicationProgrammer } from "../../../programmers/json/JsonApplicationProgrammer"; -import { ValidationPipe } from "../../../typings/ValidationPipe"; +// import { ValidationPipe } from "../../../typings/ValidationPipe"; -import { IProject } from "../../IProject"; -import { TransformerError } from "../../TransformerError"; +// import { ITransformProps } from "../../ITransformProps"; +// import { TransformerError } from "../../TransformerError"; -export namespace JsonApplicationTransformer { - export const transform = - (project: IProject) => - (expression: ts.CallExpression): ts.Expression => { - if (!expression.typeArguments?.length) - throw new TransformerError({ - code: "typia.json.application", - message: "no generic argument.", - }); +// export namespace JsonApplicationTransformer { +// export const transform = (props: ITransformProps): ts.Expression => { +// // GET GENERIC ARGUMENT +// if (!props.expression.typeArguments?.length) +// throw new TransformerError({ +// code: "typia.json.application", +// message: "no generic argument.", +// }); - //---- - // GET ARGUMENTS - //---- - // VALIDATE TUPLE ARGUMENTS - const top: ts.Node = expression.typeArguments[0]!; - if (!ts.isTupleTypeNode(top)) return expression; - else if (top.elements.some((child) => !ts.isTypeNode(child))) - return expression; +// const top: ts.Node = props.expression.typeArguments[0]!; +// if (ts.isTypeNode(top) === false) return props.expression; - // GET TYPES - const types: ts.Type[] = top.elements.map((child) => - project.checker.getTypeFromTypeNode(child as ts.TypeNode), - ); - if (types.some((t) => t.isTypeParameter())) - throw new TransformerError({ - code: "typia.json.application", - message: "non-specified generic argument(s).", - }); +// const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({ +// checker: props.context.checker, +// name: "Version", +// is: (str) => str === "3.0" || str === "3.1", +// cast: (str) => str as "3.0" | "3.1", +// default: () => "3.1", +// })(props.expression.typeArguments[1]); - // ADDITIONAL PARAMETERS - const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({ - checker: project.checker, - name: "Version", - is: (str) => str === "3.0" || str === "3.1", - cast: (str) => str as "3.0" | "3.1", - default: () => "3.1", - })(expression.typeArguments[1]); +// // GET TYPE +// const type: ts.Type = props.context.checker.getTypeFromTypeNode(top); +// const collection: MetadataCollection = new MetadataCollection({ +// replace: MetadataCollection.replace, +// }); +// const result: ValidationPipe = +// MetadataFactory.analyze({ +// checker: props.context.checker, +// transformer: props.context.transformer, +// options: { +// escape: true, +// constant: true, +// absorb: false, +// functional: true, +// validate: JsonApplicationProgrammer.validate, +// }, +// collection, +// type, +// }); +// if (result.success === false) +// throw TransformerError.from({ +// code: "typia.json.application", +// errors: result.errors, +// }); - //---- - // GENERATORS - //---- - // METADATA - const collection: MetadataCollection = new MetadataCollection({ - replace: MetadataCollection.replace, - }); - const results: ValidationPipe[] = - types.map((type) => - MetadataFactory.analyze( - project.checker, - project.context, - )({ - escape: true, - constant: true, - absorb: false, - validate: JsonApplicationProgrammer.validate, - })(collection)(type), - ); +// // GENERATE LLM APPLICATION +// const app: IJsonApplication<"3.0" | "3.1"> = +// JsonApplicationProgrammer.write({ +// version, +// metadata: result.data, +// }); +// const literal: ts.Expression = LiteralFactory.write(app); +// return literal; +// }; - // REPORT BUG IF REQUIRED - const metadatas: Metadata[] = []; - const errors: MetadataFactory.IError[] = []; - for (const r of results) { - if (r.success === false) errors.push(...r.errors); - else metadatas.push(r.data); - } - if (errors.length) - throw TransformerError.from("typia.json.application")(errors); +// const get_parameter = +// (props: { +// checker: ts.TypeChecker; +// name: string; +// is: (value: string) => boolean; +// cast: (value: string) => Value; +// default: () => Value; +// }) => +// (node: ts.TypeNode | undefined): Value => { +// if (!node) return props.default(); - // APPLICATION - const app: IJsonApplication = - JsonApplicationProgrammer.write(version)(metadatas); - return LiteralFactory.generate(app); - }; +// // CHECK LITERAL TYPE +// const type: ts.Type = props.checker.getTypeFromTypeNode(node); +// if ( +// !type.isLiteral() && +// (type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0 +// ) +// throw new TransformerError({ +// code: "typia.json.application", +// message: `generic argument "${props.name}" must be constant.`, +// }); - const get_parameter = - (props: { - checker: ts.TypeChecker; - name: string; - is: (value: string) => boolean; - cast: (value: string) => Value; - default: () => Value; - }) => - (node: ts.TypeNode | undefined): Value => { - if (!node) return props.default(); - - // CHECK LITERAL TYPE - const type: ts.Type = props.checker.getTypeFromTypeNode(node); - if ( - !type.isLiteral() && - (type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0 - ) - throw new TransformerError({ - code: "typia.json.application", - message: `generic argument "${props.name}" must be constant.`, - }); - - // GET VALUE AND VALIDATE IT - const value = type.isLiteral() - ? type.value - : props.checker.typeToString(type); - if (typeof value !== "string" || props.is(value) === false) - throw new TransformerError({ - code: "typia.json.application", - message: `invalid value on generic argument "${props.name}".`, - }); - return props.cast(value); - }; -} +// // GET VALUE AND VALIDATE IT +// const value = type.isLiteral() +// ? type.value +// : props.checker.typeToString(type); +// if (typeof value !== "string" || props.is(value) === false) +// throw new TransformerError({ +// code: "typia.json.application", +// message: `invalid value on generic argument "${props.name}".`, +// }); +// return props.cast(value); +// }; +// } diff --git a/src/transformers/features/json/JsonAssertParseTransformer.ts b/src/transformers/features/json/JsonAssertParseTransformer.ts index bb4cb008d1..e5509a9ed5 100644 --- a/src/transformers/features/json/JsonAssertParseTransformer.ts +++ b/src/transformers/features/json/JsonAssertParseTransformer.ts @@ -1,9 +1,13 @@ import { JsonAssertParseProgrammer } from "../../../programmers/json/JsonAssertParseProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonAssertParseTransformer { - export const transform = GenericTransformer.scalar("json.assertParse")( - (project) => (modulo) => JsonAssertParseProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.assertParse", + write: JsonAssertParseProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonAssertStringifyTransformer.ts b/src/transformers/features/json/JsonAssertStringifyTransformer.ts index b0bd9330af..4ac68a3491 100644 --- a/src/transformers/features/json/JsonAssertStringifyTransformer.ts +++ b/src/transformers/features/json/JsonAssertStringifyTransformer.ts @@ -1,10 +1,13 @@ import { JsonAssertStringifyProgrammer } from "../../../programmers/json/JsonAssertStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonAssertStringifyTransformer { - export const transform = GenericTransformer.scalar("json.assertStringify")( - (project) => (modulo) => - JsonAssertStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.assertStringify", + write: JsonAssertStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateAssertParseTransformer.ts b/src/transformers/features/json/JsonCreateAssertParseTransformer.ts index 8533089b4e..966b230f60 100644 --- a/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +++ b/src/transformers/features/json/JsonCreateAssertParseTransformer.ts @@ -1,9 +1,13 @@ import { JsonAssertParseProgrammer } from "../../../programmers/json/JsonAssertParseProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateAssertParseTransformer { - export const transform = GenericTransformer.factory("json.createAssertParse")( - (project) => (modulo) => JsonAssertParseProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.createAssertParse", + write: JsonAssertParseProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts b/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts index 52b807d8ef..d88f4769f5 100644 --- a/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +++ b/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts @@ -1,12 +1,13 @@ import { JsonAssertStringifyProgrammer } from "../../../programmers/json/JsonAssertStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateAssertStringifyTransformer { - export const transform = GenericTransformer.factory( - "json.createAssertStringify", - )( - (project) => (modulo) => - JsonAssertStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.createAssertStringify", + write: JsonAssertStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateIsParseTransformer.ts b/src/transformers/features/json/JsonCreateIsParseTransformer.ts index 6379f65890..fa0acc0a41 100644 --- a/src/transformers/features/json/JsonCreateIsParseTransformer.ts +++ b/src/transformers/features/json/JsonCreateIsParseTransformer.ts @@ -1,9 +1,13 @@ import { JsonIsParseProgrammer } from "../../../programmers/json/JsonIsParseProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateIsParseTransformer { - export const transform = GenericTransformer.factory("json.createIsParse")( - (project) => (modulo) => JsonIsParseProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.createIsParse", + write: JsonIsParseProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts b/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts index ab65e325a5..20013fa6de 100644 --- a/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +++ b/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts @@ -1,9 +1,13 @@ import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateIsStringifyTransformer { - export const transform = GenericTransformer.factory("json.createIsStringify")( - (project) => (modulo) => JsonIsStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.stringify", + write: JsonIsStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateStringifyTransformer.ts b/src/transformers/features/json/JsonCreateStringifyTransformer.ts index a2e8bd3c97..ec8a3bb16f 100644 --- a/src/transformers/features/json/JsonCreateStringifyTransformer.ts +++ b/src/transformers/features/json/JsonCreateStringifyTransformer.ts @@ -1,9 +1,13 @@ import { JsonStringifyProgrammer } from "../../../programmers/json/JsonStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateStringifyTransformer { - export const transform = GenericTransformer.factory("json.createStringify")( - (project) => (modulo) => JsonStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.createStringify", + write: JsonStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateValidateParseTransformer.ts b/src/transformers/features/json/JsonCreateValidateParseTransformer.ts index 40281e3c58..bcd4921fac 100644 --- a/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +++ b/src/transformers/features/json/JsonCreateValidateParseTransformer.ts @@ -1,11 +1,13 @@ import { JsonValidateParseProgrammer } from "../../../programmers/json/JsonValidateParseProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateValidateParseTransformer { - export const transform = GenericTransformer.factory( - "json.createValidateParse", - )( - (project) => (modulo) => JsonValidateParseProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.createValidateParse", + write: JsonValidateParseProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts b/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts index 6653204e23..3ba39bec17 100644 --- a/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +++ b/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts @@ -1,12 +1,13 @@ import { JsonValidateStringifyProgrammer } from "../../../programmers/json/JsonValidateStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonCreateValidateStringifyTransformer { - export const transform = GenericTransformer.factory( - "json.createValidateStringify", - )( - (project) => (modulo) => - JsonValidateStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "json.createValidateStringify", + write: JsonValidateStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonIsParseTransformer.ts b/src/transformers/features/json/JsonIsParseTransformer.ts index 65fbf40a4a..3629a1d92c 100644 --- a/src/transformers/features/json/JsonIsParseTransformer.ts +++ b/src/transformers/features/json/JsonIsParseTransformer.ts @@ -1,9 +1,13 @@ import { JsonIsParseProgrammer } from "../../../programmers/json/JsonIsParseProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonIsParseTransformer { - export const transform = GenericTransformer.scalar("json.isParse")( - (project) => (modulo) => JsonIsParseProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.isParse", + write: JsonIsParseProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonIsStringifyTransformer.ts b/src/transformers/features/json/JsonIsStringifyTransformer.ts index 65ce3a5619..3533660239 100644 --- a/src/transformers/features/json/JsonIsStringifyTransformer.ts +++ b/src/transformers/features/json/JsonIsStringifyTransformer.ts @@ -1,9 +1,13 @@ import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonIsStringifyTransformer { - export const transform = GenericTransformer.scalar("json.isStringify")( - (project) => (modulo) => JsonIsStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.isStringify", + write: JsonIsStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonSchemasTransformer.ts b/src/transformers/features/json/JsonSchemasTransformer.ts new file mode 100644 index 0000000000..ae502412c2 --- /dev/null +++ b/src/transformers/features/json/JsonSchemasTransformer.ts @@ -0,0 +1,143 @@ +import ts from "typescript"; + +import { LiteralFactory } from "../../../factories/LiteralFactory"; +import { MetadataCollection } from "../../../factories/MetadataCollection"; +import { MetadataFactory } from "../../../factories/MetadataFactory"; + +import { IJsonSchemaCollection } from "../../../schemas/json/IJsonSchemaCollection"; +import { Metadata } from "../../../schemas/metadata/Metadata"; + +import { JsonSchemasProgrammer } from "../../../programmers/json/JsonSchemasProgrammer"; + +import { ValidationPipe } from "../../../typings/ValidationPipe"; + +import { ITransformProps } from "../../ITransformProps"; +import { TransformerError } from "../../TransformerError"; + +export namespace JsonSchemasTransformer { + export const transform = ( + props: Pick, + ): ts.Expression => { + if (!props.expression.typeArguments?.length) + throw new TransformerError({ + code: "typia.json.application", + message: "no generic argument.", + }); + + //---- + // GET ARGUMENTS + //---- + // VALIDATE TUPLE ARGUMENTS + const top: ts.Node = props.expression.typeArguments[0]!; + if (!ts.isTupleTypeNode(top)) return props.expression; + else if (top.elements.some((child) => !ts.isTypeNode(child))) + return props.expression; + + // GET TYPES + const types: ts.Type[] = top.elements.map((child) => + props.context.checker.getTypeFromTypeNode(child as ts.TypeNode), + ); + if (types.some((t) => t.isTypeParameter())) + throw new TransformerError({ + code: "typia.json.application", + message: "non-specified generic argument(s).", + }); + + // ADDITIONAL PARAMETERS + const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({ + checker: props.context.checker, + name: "Version", + is: (str) => str === "3.0" || str === "3.1", + cast: (str) => str as "3.0" | "3.1", + default: () => "3.1", + })(props.expression.typeArguments[1]); + + //---- + // GENERATORS + //---- + // METADATA + const collection: MetadataCollection = new MetadataCollection({ + replace: MetadataCollection.replace, + }); + const results: ValidationPipe[] = + types.map((type) => + MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: true, + constant: true, + absorb: false, + validate: JsonSchemasProgrammer.validate, + }, + collection, + type, + }), + ); + + // REPORT BUG IF REQUIRED + const metadatas: Metadata[] = []; + const errors: MetadataFactory.IError[] = []; + for (const r of results) { + if (r.success === false) errors.push(...r.errors); + else metadatas.push(r.data); + } + if (errors.length) + throw TransformerError.from({ + code: "typia.json.application", + errors, + }); + + // APPLICATION + const app: IJsonSchemaCollection = JsonSchemasProgrammer.write({ + version, + metadatas, + }); + return ts.factory.createAsExpression( + LiteralFactory.write(app), + props.context.importer.type({ + file: "typia", + name: "IJsonSchemaCollection", + arguments: [ + ts.factory.createLiteralTypeNode( + ts.factory.createStringLiteral(version), + ), + ], + }), + ); + }; + + const get_parameter = + (props: { + checker: ts.TypeChecker; + name: string; + is: (value: string) => boolean; + cast: (value: string) => Value; + default: () => Value; + }) => + (node: ts.TypeNode | undefined): Value => { + if (!node) return props.default(); + + // CHECK LITERAL TYPE + const type: ts.Type = props.checker.getTypeFromTypeNode(node); + if ( + !type.isLiteral() && + (type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0 + ) + throw new TransformerError({ + code: "typia.json.application", + message: `generic argument "${props.name}" must be constant.`, + }); + + // GET VALUE AND VALIDATE IT + const value = type.isLiteral() + ? type.value + : props.checker.typeToString(type); + if (typeof value !== "string" || props.is(value) === false) + throw new TransformerError({ + code: "typia.json.application", + message: `invalid value on generic argument "${props.name}".`, + }); + return props.cast(value); + }; +} diff --git a/src/transformers/features/json/JsonStringifyTransformer.ts b/src/transformers/features/json/JsonStringifyTransformer.ts index d25de51ebe..bb059cf8d8 100644 --- a/src/transformers/features/json/JsonStringifyTransformer.ts +++ b/src/transformers/features/json/JsonStringifyTransformer.ts @@ -1,9 +1,13 @@ import { JsonStringifyProgrammer } from "../../../programmers/json/JsonStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonStringifyTransformer { - export const transform = GenericTransformer.scalar("json.stringify")( - (project) => (modulo) => JsonStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.stringify", + write: JsonStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonValidateParseTransformer.ts b/src/transformers/features/json/JsonValidateParseTransformer.ts index 93a09533f6..5decc11ef4 100644 --- a/src/transformers/features/json/JsonValidateParseTransformer.ts +++ b/src/transformers/features/json/JsonValidateParseTransformer.ts @@ -1,9 +1,13 @@ import { JsonValidateParseProgrammer } from "../../../programmers/json/JsonValidateParseProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonValidateParseTransformer { - export const transform = GenericTransformer.scalar("json.validatParse")( - (project) => (modulo) => JsonValidateParseProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.validatParse", + write: JsonValidateParseProgrammer.write, + }); } diff --git a/src/transformers/features/json/JsonValidateStringifyTransformer.ts b/src/transformers/features/json/JsonValidateStringifyTransformer.ts index 9ca8f80569..a8a764f9fe 100644 --- a/src/transformers/features/json/JsonValidateStringifyTransformer.ts +++ b/src/transformers/features/json/JsonValidateStringifyTransformer.ts @@ -1,10 +1,13 @@ import { JsonValidateStringifyProgrammer } from "../../../programmers/json/JsonValidateStringifyProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace JsonValidateStringifyTransformer { - export const transform = GenericTransformer.scalar("json.validatStringify")( - (project) => (modulo) => - JsonValidateStringifyProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "json.validatStringify", + write: JsonValidateStringifyProgrammer.write, + }); } diff --git a/src/transformers/features/llm/LlmApplicationTransformer.ts b/src/transformers/features/llm/LlmApplicationTransformer.ts index 8d23805b80..0fa953b044 100644 --- a/src/transformers/features/llm/LlmApplicationTransformer.ts +++ b/src/transformers/features/llm/LlmApplicationTransformer.ts @@ -1,83 +1,113 @@ -import { ILlmApplication } from "@samchon/openapi"; +import { ILlmApplication, ILlmSchema } from "@samchon/openapi"; import ts from "typescript"; import { ExpressionFactory } from "../../../factories/ExpressionFactory"; -import { IdentifierFactory } from "../../../factories/IdentifierFactory"; import { LiteralFactory } from "../../../factories/LiteralFactory"; import { MetadataCollection } from "../../../factories/MetadataCollection"; import { MetadataFactory } from "../../../factories/MetadataFactory"; import { StatementFactory } from "../../../factories/StatementFactory"; -import { TypeFactory } from "../../../factories/TypeFactory"; import { Metadata } from "../../../schemas/metadata/Metadata"; import { LlmApplicationProgrammer } from "../../../programmers/llm/LlmApplicationProgrammer"; +import { LlmModelPredicator } from "../../../programmers/llm/LlmModelPredicator"; import { ValidationPipe } from "../../../typings/ValidationPipe"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; import { TransformerError } from "../../TransformerError"; export namespace LlmApplicationTransformer { - export const transform = - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression): ts.Expression => { - // GET GENERIC ARGUMENT - if (!expression.typeArguments?.length) - throw new TransformerError({ - code: "typia.llm.schema", - message: "no generic argument.", - }); + export const transform = (props: ITransformProps): ts.Expression => { + // GET GENERIC ARGUMENT + if (!props.expression.typeArguments?.length) + throw new TransformerError({ + code: "typia.llm.schema", + message: "no generic argument.", + }); - const top: ts.Node = expression.typeArguments[0]!; - if (ts.isTypeNode(top) === false) return expression; + const top: ts.Node = props.expression.typeArguments[0]!; + if (ts.isTypeNode(top) === false) return props.expression; - // GET TYPE - const type: ts.Type = project.checker.getTypeFromTypeNode(top); - const collection: MetadataCollection = new MetadataCollection({ - replace: MetadataCollection.replace, - }); - const result: ValidationPipe = - MetadataFactory.analyze( - project.checker, - project.context, - )({ + // GET TYPE + const model: ILlmSchema.Model = LlmModelPredicator.getModel({ + checker: props.context.checker, + method: "application", + node: props.expression.typeArguments[1], + }); + const type: ts.Type = props.context.checker.getTypeFromTypeNode(top); + const collection: MetadataCollection = new MetadataCollection({ + replace: MetadataCollection.replace, + }); + const result: ValidationPipe = + MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: true, constant: true, absorb: false, functional: true, - validate: LlmApplicationProgrammer.validate, - })(collection)(type); - if (result.success === false) - throw TransformerError.from("typia.llm.application")(result.errors); + validate: LlmApplicationProgrammer.validate(model), + }, + collection, + type, + }); + if (result.success === false) + throw TransformerError.from({ + code: "typia.llm.application", + errors: result.errors, + }); - // GENERATE LLM APPLICATION - const schema: ILlmApplication = LlmApplicationProgrammer.write( - result.data, - ); - const literal: ts.Expression = LiteralFactory.generate(schema); - if (!expression.arguments?.[0]) return literal; - return ExpressionFactory.selfCall( - ts.factory.createBlock( - [ - StatementFactory.constant("app", LiteralFactory.generate(schema)), - ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - ts.factory.createAsExpression( - IdentifierFactory.access(modulo)("finalize"), - TypeFactory.keyword("any"), - ), - undefined, - [ts.factory.createIdentifier("app"), expression.arguments[0]], - ), - ), - ts.factory.createReturnStatement( - ts.factory.createIdentifier("app"), + // GENERATE LLM APPLICATION + const schema: ILlmApplication = + LlmApplicationProgrammer.write({ + model, + metadata: result.data, + config: LlmModelPredicator.getConfig({ + context: props.context, + method: "application", + model, + node: props.expression.typeArguments[2], + }), + }); + const literal: ts.Expression = ts.factory.createAsExpression( + LiteralFactory.write(schema), + props.context.importer.type({ + file: "@samchon/openapi", + name: "ILlmApplication", + arguments: [ + ts.factory.createLiteralTypeNode( + ts.factory.createStringLiteral(model), + ), + ], + }), + ); + if (!props.expression.arguments?.[0]) return literal; + + return ExpressionFactory.selfCall( + ts.factory.createBlock( + [ + StatementFactory.constant({ + name: "app", + value: literal, + }), + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + props.context.importer.internal("llmApplicationFinalize"), + undefined, + [ + ts.factory.createIdentifier("app"), + ...(props.expression.arguments?.[0] + ? [props.expression.arguments[0]] + : []), + ], ), - ], - true, - ), - ); - }; + ), + ts.factory.createReturnStatement(ts.factory.createIdentifier("app")), + ], + true, + ), + ); + }; } diff --git a/src/transformers/features/llm/LlmParametersTransformer.ts b/src/transformers/features/llm/LlmParametersTransformer.ts new file mode 100644 index 0000000000..566e8ac902 --- /dev/null +++ b/src/transformers/features/llm/LlmParametersTransformer.ts @@ -0,0 +1,89 @@ +import { ILlmSchema } from "@samchon/openapi"; +import { ILlmFunction } from "@samchon/openapi/lib/structures/ILlmFunction"; +import ts from "typescript"; + +import { LiteralFactory } from "../../../factories/LiteralFactory"; +import { MetadataCollection } from "../../../factories/MetadataCollection"; +import { MetadataFactory } from "../../../factories/MetadataFactory"; + +import { Metadata } from "../../../schemas/metadata/Metadata"; + +import { LlmModelPredicator } from "../../../programmers/llm/LlmModelPredicator"; +import { LlmParametersProgrammer } from "../../../programmers/llm/LlmParametersProgrammer"; + +import { ValidationPipe } from "../../../typings/ValidationPipe"; + +import { ITransformProps } from "../../ITransformProps"; +import { TransformerError } from "../../TransformerError"; + +export namespace LlmParametersTransformer { + export const transform = ( + props: Omit, + ): ts.Expression => { + // GET GENERIC ARGUMENT + if (!props.expression.typeArguments?.length) + throw new TransformerError({ + code: "typia.llm.parameters", + message: "no generic argument.", + }); + + const top: ts.Node = props.expression.typeArguments[0]!; + if (ts.isTypeNode(top) === false) return props.expression; + + // GET TYPE + const model: ILlmSchema.Model = LlmModelPredicator.getModel({ + checker: props.context.checker, + method: "parameters", + node: props.expression.typeArguments[1], + }); + const type: ts.Type = props.context.checker.getTypeFromTypeNode(top); + const collection: MetadataCollection = new MetadataCollection({ + replace: MetadataCollection.replace, + }); + const result: ValidationPipe = + MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { + escape: true, + constant: true, + absorb: false, + validate: LlmParametersProgrammer.validate(model), + }, + collection, + type, + }); + if (result.success === false) + throw TransformerError.from({ + code: "typia.llm.parameters", + errors: result.errors, + }); + + // GENERATE LLM SCHEMA + const out: ILlmFunction["parameters"] = LlmParametersProgrammer.write({ + model, + metadata: result.data, + config: LlmModelPredicator.getConfig({ + context: props.context, + method: "parameters", + model, + node: props.expression.typeArguments[2], + }), + }); + return ts.factory.createAsExpression( + LiteralFactory.write(out), + props.context.importer.type({ + file: "@samchon/openapi", + name: ts.factory.createQualifiedName( + ts.factory.createIdentifier("ILlmSchema"), + ts.factory.createIdentifier("IParameters"), + ), + arguments: [ + ts.factory.createLiteralTypeNode( + ts.factory.createStringLiteral(model), + ), + ], + }), + ); + }; +} diff --git a/src/transformers/features/llm/LlmSchemaTransformer.ts b/src/transformers/features/llm/LlmSchemaTransformer.ts index b1dfd08f3a..a1d0fd3416 100644 --- a/src/transformers/features/llm/LlmSchemaTransformer.ts +++ b/src/transformers/features/llm/LlmSchemaTransformer.ts @@ -1,53 +1,130 @@ import { ILlmSchema } from "@samchon/openapi"; import ts from "typescript"; +import { IdentifierFactory } from "../../../factories/IdentifierFactory"; import { LiteralFactory } from "../../../factories/LiteralFactory"; import { MetadataCollection } from "../../../factories/MetadataCollection"; import { MetadataFactory } from "../../../factories/MetadataFactory"; import { Metadata } from "../../../schemas/metadata/Metadata"; +import { LlmModelPredicator } from "../../../programmers/llm/LlmModelPredicator"; import { LlmSchemaProgrammer } from "../../../programmers/llm/LlmSchemaProgrammer"; import { ValidationPipe } from "../../../typings/ValidationPipe"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; import { TransformerError } from "../../TransformerError"; export namespace LlmSchemaTransformer { - export const transform = - (project: IProject) => - (expression: ts.CallExpression): ts.Expression => { - // GET GENERIC ARGUMENT - if (!expression.typeArguments?.length) - throw new TransformerError({ - code: "typia.llm.schema", - message: "no generic argument.", - }); - - const top: ts.Node = expression.typeArguments[0]!; - if (ts.isTypeNode(top) === false) return expression; - - // GET TYPE - const type: ts.Type = project.checker.getTypeFromTypeNode(top); - const collection: MetadataCollection = new MetadataCollection({ - replace: MetadataCollection.replace, + export const transform = ( + props: Omit, + ): ts.Expression => { + // GET GENERIC ARGUMENT + if (!props.expression.typeArguments?.length) + throw new TransformerError({ + code: "typia.llm.schema", + message: "no generic argument.", }); - const result: ValidationPipe = - MetadataFactory.analyze( - project.checker, - project.context, - )({ + + const top: ts.Node = props.expression.typeArguments[0]!; + if (ts.isTypeNode(top) === false) return props.expression; + + // GET TYPE + const model: ILlmSchema.Model = LlmModelPredicator.getModel({ + checker: props.context.checker, + method: "schema", + node: props.expression.typeArguments[1], + }); + const type: ts.Type = props.context.checker.getTypeFromTypeNode(top); + const collection: MetadataCollection = new MetadataCollection({ + replace: MetadataCollection.replace, + }); + const result: ValidationPipe = + MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: true, constant: true, absorb: false, - validate: LlmSchemaProgrammer.validate, - })(collection)(type); - if (result.success === false) - throw TransformerError.from("typia.llm.schema")(result.errors); - - // GENERATE LLM SCHEMA - const schema: ILlmSchema = LlmSchemaProgrammer.write(result.data); - return LiteralFactory.generate(schema); - }; + validate: LlmSchemaProgrammer.validate(model), + }, + collection, + type, + }); + if (result.success === false) + throw TransformerError.from({ + code: "typia.llm.schema", + errors: result.errors, + }); + + // GENERATE LLM SCHEMA + const out: LlmSchemaProgrammer.IOutput = LlmSchemaProgrammer.write({ + model, + metadata: result.data, + config: LlmModelPredicator.getConfig({ + context: props.context, + method: "schema", + model, + node: props.expression.typeArguments[2], + }), + }); + const schemaTypeNode = props.context.importer.type({ + file: "@samchon/openapi", + name: "ILlmSchema", + arguments: [ + ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(model)), + ], + }); + const literal = ts.factory.createAsExpression( + LiteralFactory.write(out.schema), + schemaTypeNode, + ); + if (Object.keys(out.$defs).length === 0) return literal; + return ts.factory.createCallExpression( + ts.factory.createArrowFunction( + undefined, + undefined, + [ + IdentifierFactory.parameter( + "$defs", + ts.factory.createTypeReferenceNode("Record", [ + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + schemaTypeNode, + ]), + undefined, + ), + ], + undefined, + undefined, + ts.factory.createBlock( + [ + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier("Object.assign"), + undefined, + [ + ts.factory.createIdentifier("$defs"), + ts.factory.createAsExpression( + LiteralFactory.write(out.$defs), + ts.factory.createTypeReferenceNode("Record", [ + ts.factory.createKeywordTypeNode( + ts.SyntaxKind.StringKeyword, + ), + schemaTypeNode, + ]), + ), + ], + ), + ), + ts.factory.createReturnStatement(literal), + ], + true, + ), + ), + undefined, + [props.expression.arguments[0]!], + ); + }; } diff --git a/src/transformers/features/misc/MiscAssertCloneTransformer.ts b/src/transformers/features/misc/MiscAssertCloneTransformer.ts index c1a0e17ab7..849186987f 100644 --- a/src/transformers/features/misc/MiscAssertCloneTransformer.ts +++ b/src/transformers/features/misc/MiscAssertCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscAssertCloneProgrammer } from "../../../programmers/misc/MiscAssertCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscAssertCloneTransformer { - export const transform = GenericTransformer.scalar("misc.assertClone")( - (project) => (modulo) => MiscAssertCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.assertClone", + write: MiscAssertCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscAssertPruneTransformer.ts b/src/transformers/features/misc/MiscAssertPruneTransformer.ts index 9aa16f405b..75c44d5ab9 100644 --- a/src/transformers/features/misc/MiscAssertPruneTransformer.ts +++ b/src/transformers/features/misc/MiscAssertPruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscAssertPruneProgrammer } from "../../../programmers/misc/MiscAssertPruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscAssertPruneTransformer { - export const transform = GenericTransformer.scalar("misc.assertPrune")( - (project) => (modulo) => MiscAssertPruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.assertPrune", + write: MiscAssertPruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCloneTransformer.ts b/src/transformers/features/misc/MiscCloneTransformer.ts index 592914562c..eef09c8e68 100644 --- a/src/transformers/features/misc/MiscCloneTransformer.ts +++ b/src/transformers/features/misc/MiscCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscCloneProgrammer } from "../../../programmers/misc/MiscCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCloneTransformer { - export const transform = GenericTransformer.scalar("misc.clone")( - (project) => (modulo) => MiscCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.clone", + write: MiscCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts b/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts index dc9af826b3..7fa0065b59 100644 --- a/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscAssertCloneProgrammer } from "../../../programmers/misc/MiscAssertCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateAssertCloneTransformer { - export const transform = GenericTransformer.factory("misc.createAssertClone")( - (project) => (modulo) => MiscAssertCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createAssertClone", + write: MiscAssertCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts b/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts index 79e6a2b214..be8c352719 100644 --- a/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscAssertPruneProgrammer } from "../../../programmers/misc/MiscAssertPruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateAssertPruneTransformer { - export const transform = GenericTransformer.factory("misc.createAssertPrune")( - (project) => (modulo) => MiscAssertPruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createAssertPrune", + write: MiscAssertPruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateCloneTransformer.ts b/src/transformers/features/misc/MiscCreateCloneTransformer.ts index 9e620e94db..5aa2f655ec 100644 --- a/src/transformers/features/misc/MiscCreateCloneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscCloneProgrammer } from "../../../programmers/misc/MiscCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateCloneTransformer { - export const transform = GenericTransformer.factory("misc.createClone")( - (project) => (modulo) => MiscCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createClone", + write: MiscCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts b/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts index f9b9a6489f..4c30b49e5e 100644 --- a/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscIsCloneProgrammer } from "../../../programmers/misc/MiscIsCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateIsCloneTransformer { - export const transform = GenericTransformer.factory("misc.createIsClone")( - (project) => (modulo) => MiscIsCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createIsClone", + write: MiscIsCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts b/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts index 420d92bbc1..4737ab6f94 100644 --- a/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscIsPruneProgrammer } from "../../../programmers/misc/MiscIsPruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateIsPruneTransformer { - export const transform = GenericTransformer.factory("misc.createIsPrune")( - (project) => (modulo) => MiscIsPruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createIsPrune", + write: MiscIsPruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreatePruneTransformer.ts b/src/transformers/features/misc/MiscCreatePruneTransformer.ts index 20674f3440..ef0396dcb5 100644 --- a/src/transformers/features/misc/MiscCreatePruneTransformer.ts +++ b/src/transformers/features/misc/MiscCreatePruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscPruneProgrammer } from "../../../programmers/misc/MiscPruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreatePruneTransformer { - export const transform = GenericTransformer.factory("misc.createPrune")( - (project) => (modulo) => MiscPruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createPrune", + write: MiscPruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts b/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts index 48ba98e124..544eb357e8 100644 --- a/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts @@ -1,11 +1,13 @@ import { MiscValidateCloneProgrammer } from "../../../programmers/misc/MiscValidateCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateValidateCloneTransformer { - export const transform = GenericTransformer.factory( - "misc.createValidateClone", - )( - (project) => (modulo) => MiscValidateCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createValidateClone", + write: MiscValidateCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts b/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts index 31185b3ef0..21c2ed563c 100644 --- a/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +++ b/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts @@ -1,11 +1,13 @@ import { MiscValidatePruneProgrammer } from "../../../programmers/misc/MiscValidatePruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscCreateValidatePruneTransformer { - export const transform = GenericTransformer.factory( - "misc.createValidatePrune", - )( - (project) => (modulo) => MiscValidatePruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "misc.createValidatePrune", + write: MiscValidatePruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscIsCloneTransformer.ts b/src/transformers/features/misc/MiscIsCloneTransformer.ts index 5ff6f09462..2211c85965 100644 --- a/src/transformers/features/misc/MiscIsCloneTransformer.ts +++ b/src/transformers/features/misc/MiscIsCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscIsCloneProgrammer } from "../../../programmers/misc/MiscIsCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscIsCloneTransformer { - export const transform = GenericTransformer.scalar("misc.isClone")( - (project) => (modulo) => MiscIsCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.isClone", + write: MiscIsCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscIsPruneTransformer.ts b/src/transformers/features/misc/MiscIsPruneTransformer.ts index 7361938a54..1443162f27 100644 --- a/src/transformers/features/misc/MiscIsPruneTransformer.ts +++ b/src/transformers/features/misc/MiscIsPruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscIsPruneProgrammer } from "../../../programmers/misc/MiscIsPruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscIsPruneTransformer { - export const transform = GenericTransformer.scalar("misc.isPrune")( - (project) => (modulo) => MiscIsPruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.isPrune", + write: MiscIsPruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscLiteralsTransformer.ts b/src/transformers/features/misc/MiscLiteralsTransformer.ts index 468374e92a..4250680a1a 100644 --- a/src/transformers/features/misc/MiscLiteralsTransformer.ts +++ b/src/transformers/features/misc/MiscLiteralsTransformer.ts @@ -2,31 +2,34 @@ import ts from "typescript"; import { MiscLiteralsProgrammer } from "../../../programmers/misc/MiscLiteralsProgrammer"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; import { TransformerError } from "../../TransformerError"; export namespace MiscLiteralsTransformer { - export const transform = - (project: IProject) => - (expression: ts.CallExpression): ts.Expression => { - // CHECK GENERIC ARGUMENT EXISTENCE - if (!expression.typeArguments?.[0]) - throw new TransformerError({ - code: "typia.misc.literals", - message: "generic argument is not specified.", - }); + export const transform = ( + props: Omit, + ): ts.Expression => { + // CHECK GENERIC ARGUMENT EXISTENCE + if (!props.expression.typeArguments?.[0]) + throw new TransformerError({ + code: "typia.misc.literals", + message: "generic argument is not specified.", + }); - // GET TYPE INFO - const node: ts.TypeNode = expression.typeArguments[0]; - const type: ts.Type = project.checker.getTypeFromTypeNode(node); + // GET TYPE INFO + const node: ts.TypeNode = props.expression.typeArguments[0]; + const type: ts.Type = props.context.checker.getTypeFromTypeNode(node); - if (type.isTypeParameter()) - throw new TransformerError({ - code: "typia.misc.literals", - message: "non-specified generic argument.", - }); + if (type.isTypeParameter()) + throw new TransformerError({ + code: "typia.misc.literals", + message: "non-specified generic argument.", + }); - // DO TRANSFORM - return MiscLiteralsProgrammer.write(project)(type); - }; + // DO TRANSFORM + return MiscLiteralsProgrammer.write({ + context: props.context, + type, + }); + }; } diff --git a/src/transformers/features/misc/MiscPruneTransformer.ts b/src/transformers/features/misc/MiscPruneTransformer.ts index 1a08d89e2c..45041a51b1 100644 --- a/src/transformers/features/misc/MiscPruneTransformer.ts +++ b/src/transformers/features/misc/MiscPruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscPruneProgrammer } from "../../../programmers/misc/MiscPruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscPruneTransformer { - export const transform = GenericTransformer.scalar("misc.prune")( - (project) => (modulo) => MiscPruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.prune", + write: MiscPruneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscValidateCloneTransformer.ts b/src/transformers/features/misc/MiscValidateCloneTransformer.ts index f999680ac8..ceb366c2db 100644 --- a/src/transformers/features/misc/MiscValidateCloneTransformer.ts +++ b/src/transformers/features/misc/MiscValidateCloneTransformer.ts @@ -1,9 +1,13 @@ import { MiscValidateCloneProgrammer } from "../../../programmers/misc/MiscValidateCloneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscValidateCloneTransformer { - export const transform = GenericTransformer.scalar("misc.validatClone")( - (project) => (modulo) => MiscValidateCloneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.validatClone", + write: MiscValidateCloneProgrammer.write, + }); } diff --git a/src/transformers/features/misc/MiscValidatePruneTransformer.ts b/src/transformers/features/misc/MiscValidatePruneTransformer.ts index fc7b4d3649..738e155735 100644 --- a/src/transformers/features/misc/MiscValidatePruneTransformer.ts +++ b/src/transformers/features/misc/MiscValidatePruneTransformer.ts @@ -1,9 +1,13 @@ import { MiscValidatePruneProgrammer } from "../../../programmers/misc/MiscValidatePruneProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace MiscValidatePruneTransformer { - export const transform = GenericTransformer.scalar("misc.validatPrune")( - (project) => (modulo) => MiscValidatePruneProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "misc.validatPrune", + write: MiscValidatePruneProgrammer.write, + }); } diff --git a/src/transformers/features/notations/NotationAssertGeneralTransformer.ts b/src/transformers/features/notations/NotationAssertGeneralTransformer.ts index b40fdc35b7..a1eeb8641f 100644 --- a/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationAssertGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationAssertGeneralProgrammer } from "../../../programmers/notations/ import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationAssertGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.scalar( - `notations.assert${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationAssertGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: `notations.assert${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationAssertGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts b/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts index bf86ff7c63..3724bc9fb0 100644 --- a/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationAssertGeneralProgrammer } from "../../../programmers/notations/ import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationCreateAssertGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.factory( - `notations.createAssert${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationAssertGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: `notations.createAssert${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationAssertGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationCreateGeneralTransformer.ts b/src/transformers/features/notations/NotationCreateGeneralTransformer.ts index 73bbc83f41..780bd1dc5a 100644 --- a/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationCreateGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationGeneralProgrammer } from "../../../programmers/notations/Notati import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationCreateGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.factory( - `notations.create${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: `notations.create${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts b/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts index f9df4f57e0..3ebc789682 100644 --- a/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationIsGeneralProgrammer } from "../../../programmers/notations/Nota import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationCreateIsGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.factory( - `notations.createIs${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationIsGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: `notations.createIs${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationIsGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts b/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts index 72817a8901..90394f6718 100644 --- a/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationValidateGeneralProgrammer } from "../../../programmers/notation import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationCreateValidateGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.factory( - `notations.createValidate${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationValidateGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: `notations.createValidate${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationValidateGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationGeneralTransformer.ts b/src/transformers/features/notations/NotationGeneralTransformer.ts index 867e6f0352..9be91b6ccf 100644 --- a/src/transformers/features/notations/NotationGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationGeneralTransformer.ts @@ -1,11 +1,18 @@ import { NotationGeneralProgrammer } from "../../../programmers/notations/NotationGeneralProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.scalar(`notations.${rename.name}`)( - (project) => (modulo) => - NotationGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: `notations.${rename.name}`, + write: (x) => + NotationGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationIsGeneralTransformer.ts b/src/transformers/features/notations/NotationIsGeneralTransformer.ts index 2f5fbc5363..aea605fa52 100644 --- a/src/transformers/features/notations/NotationIsGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationIsGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationIsGeneralProgrammer } from "../../../programmers/notations/Nota import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationIsGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.scalar( - `notations.is${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationIsGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: `notations.is${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationIsGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/notations/NotationValidateGeneralTransformer.ts b/src/transformers/features/notations/NotationValidateGeneralTransformer.ts index 710ef405ac..932866ce83 100644 --- a/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +++ b/src/transformers/features/notations/NotationValidateGeneralTransformer.ts @@ -2,14 +2,19 @@ import { NotationValidateGeneralProgrammer } from "../../../programmers/notation import { StringUtil } from "../../../utils/StringUtil"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace NotationValidateGeneralTransformer { - export const transform = (rename: (str: string) => string) => - GenericTransformer.scalar( - `notations.validate${StringUtil.capitalize(rename.name)}`, - )( - (project) => (modulo) => - NotationValidateGeneralProgrammer.write(rename)(project)(modulo), - ); + export const transform = + (rename: (str: string) => string) => (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: `notations.validate${StringUtil.capitalize(rename.name)}`, + write: (x) => + NotationValidateGeneralProgrammer.write({ + ...x, + rename, + }), + }); } diff --git a/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts index 5974232c8a..2273084be1 100644 --- a/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts @@ -1,10 +1,13 @@ import { ProtobufAssertDecodeProgrammer } from "../../../programmers/protobuf/ProtobufAssertDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufAssertDecodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.assertDecode")( - (project) => (modulo) => - ProtobufAssertDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.assertDecode", + write: ProtobufAssertDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts index febfca7cc0..fd70802898 100644 --- a/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts @@ -1,10 +1,13 @@ import { ProtobufAssertEncodeProgrammer } from "../../../programmers/protobuf/ProtobufAssertEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufAssertEncodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.assertEncode")( - (project) => (modulo) => - ProtobufAssertEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.assertEncode", + write: ProtobufAssertEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts index 3124fa44dc..13f3a8e1ad 100644 --- a/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts @@ -1,12 +1,13 @@ import { ProtobufAssertDecodeProgrammer } from "../../../programmers/protobuf/ProtobufAssertDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateAssertDecodeTransformer { - export const transform = GenericTransformer.factory( - "protobuf.createAssertDecode", - )( - (project) => (modulo) => - ProtobufAssertDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createAssertDecode", + write: ProtobufAssertDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts index d930526e12..e81d9e23f7 100644 --- a/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts @@ -1,12 +1,13 @@ import { ProtobufAssertEncodeProgrammer } from "../../../programmers/protobuf/ProtobufAssertEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateAssertEncodeTransformer { - export const transform = GenericTransformer.factory( - "protobuf.createAssertEncode", - )( - (project) => (modulo) => - ProtobufAssertEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createAssertEncode", + write: ProtobufAssertEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts index 5d1d522854..d69e1404cb 100644 --- a/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufDecodeProgrammer } from "../../../programmers/protobuf/ProtobufDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateDecodeTransformer { - export const transform = GenericTransformer.factory("protobuf.createDecode")( - (project) => (modulo) => ProtobufDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createDecode", + write: ProtobufDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts index 8350682da1..8d7a20799e 100644 --- a/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufEncodeProgrammer } from "../../../programmers/protobuf/ProtobufEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateEncodeTransformer { - export const transform = GenericTransformer.factory("protobuf.createEncode")( - (project) => (modulo) => ProtobufEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createEncode", + write: ProtobufEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts index dd0a678a3c..a3c936169b 100644 --- a/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufIsDecodeProgrammer } from "../../../programmers/protobuf/ProtobufIsDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateIsDecodeTransformer { - export const transform = GenericTransformer.factory( - "protobuf.createIsDecode", - )((project) => (modulo) => ProtobufIsDecodeProgrammer.write(project)(modulo)); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createIsDecode", + write: ProtobufIsDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts index f090d0a37b..b1eb339eeb 100644 --- a/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufIsEncodeProgrammer } from "../../../programmers/protobuf/ProtobufIsEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateIsEncodeTransformer { - export const transform = GenericTransformer.factory( - "protobuf.createIsEncode", - )((project) => (modulo) => ProtobufIsEncodeProgrammer.write(project)(modulo)); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createIsEncode", + write: ProtobufIsEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts index 06f80923a9..6b8f7f4929 100644 --- a/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts @@ -1,12 +1,13 @@ import { ProtobufValidateDecodeProgrammer } from "../../../programmers/protobuf/ProtobufValidateDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateValidateDecodeTransformer { - export const transform = GenericTransformer.factory( - "protobuf.createValidateDecode", - )( - (project) => (modulo) => - ProtobufValidateDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createValidateDecode", + write: ProtobufValidateDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts index 324dd29536..0e7cebb156 100644 --- a/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts @@ -1,12 +1,13 @@ import { ProtobufValidateEncodeProgrammer } from "../../../programmers/protobuf/ProtobufValidateEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufCreateValidateEncodeTransformer { - export const transform = GenericTransformer.factory( - "protobuf.createValidateEncode", - )( - (project) => (modulo) => - ProtobufValidateEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.factory({ + ...props, + method: "protobuf.createValidateEncode", + write: ProtobufValidateEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts index ecf847aeeb..212d9b752c 100644 --- a/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufDecodeProgrammer } from "../../../programmers/protobuf/ProtobufDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufDecodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.decode")( - (project) => (modulo) => ProtobufDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.decode", + write: ProtobufDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts index c41bb47509..40bdab0b45 100644 --- a/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufEncodeProgrammer } from "../../../programmers/protobuf/ProtobufEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufEncodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.encode")( - (project) => (modulo) => ProtobufEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.encode", + write: ProtobufEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts index 59c42c3fc8..69d034c691 100644 --- a/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufIsDecodeProgrammer } from "../../../programmers/protobuf/ProtobufIsDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufIsDecodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.isDecode")( - (project) => (modulo) => ProtobufIsDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.isDecode", + write: ProtobufIsDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts index e576a2ab8d..c9d9690bbb 100644 --- a/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts @@ -1,9 +1,13 @@ import { ProtobufIsEncodeProgrammer } from "../../../programmers/protobuf/ProtobufIsEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufIsEncodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.isEncode")( - (project) => (modulo) => ProtobufIsEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.isEncode", + write: ProtobufIsEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufMessageTransformer.ts b/src/transformers/features/protobuf/ProtobufMessageTransformer.ts index 12480dbc47..937797b6a9 100644 --- a/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufMessageTransformer.ts @@ -2,32 +2,34 @@ import ts from "typescript"; import { ProtobufMessageProgrammer } from "../../../programmers/protobuf/ProtobufMessageProgrammer"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; import { TransformerError } from "../../TransformerError"; export namespace ProtobufMessageTransformer { - export const transform = - (project: IProject) => - (_modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression): ts.Expression => { - // CHECK GENERIC ARGUMENT EXISTENCE - if (!expression.typeArguments || !expression.typeArguments[0]) - throw new TransformerError({ - code: "typia.protobuf.message", - message: "generic argument is not specified.", - }); + export const transform = ( + props: Pick, + ): ts.Expression => { + // CHECK GENERIC ARGUMENT EXISTENCE + if (!props.expression.typeArguments || !props.expression.typeArguments[0]) + throw new TransformerError({ + code: "typia.protobuf.message", + message: "generic argument is not specified.", + }); - // GET TYPE INFO - const type: ts.Type = project.checker.getTypeFromTypeNode( - expression.typeArguments[0], - ); - if (type.isTypeParameter()) - throw new TransformerError({ - code: "tyipa.protobuf.message", - message: "non-specified generic argument.", - }); + // GET TYPE INFO + const type: ts.Type = props.context.checker.getTypeFromTypeNode( + props.expression.typeArguments[0], + ); + if (type.isTypeParameter()) + throw new TransformerError({ + code: "tyipa.protobuf.message", + message: "non-specified generic argument.", + }); - // DO TRANSFORM - return ProtobufMessageProgrammer.write(project)(type); - }; + // DO TRANSFORM + return ProtobufMessageProgrammer.write({ + context: props.context, + type, + }); + }; } diff --git a/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts b/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts index be8d10726b..d861809df3 100644 --- a/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts @@ -1,10 +1,13 @@ import { ProtobufValidateDecodeProgrammer } from "../../../programmers/protobuf/ProtobufValidateDecodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufValidateDecodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.validateDecode")( - (project) => (modulo) => - ProtobufValidateDecodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.validateDecode", + write: ProtobufValidateDecodeProgrammer.write, + }); } diff --git a/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts b/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts index b7e02eef38..0b213e2741 100644 --- a/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +++ b/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts @@ -1,10 +1,13 @@ import { ProtobufValidateEncodeProgrammer } from "../../../programmers/protobuf/ProtobufValidateEncodeProgrammer"; +import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; export namespace ProtobufValidateEncodeTransformer { - export const transform = GenericTransformer.scalar("protobuf.validateEncode")( - (project) => (modulo) => - ProtobufValidateEncodeProgrammer.write(project)(modulo), - ); + export const transform = (props: ITransformProps) => + GenericTransformer.scalar({ + ...props, + method: "protobuf.validateEncode", + write: ProtobufValidateEncodeProgrammer.write, + }); } diff --git a/src/transformers/features/reflect/ReflectMetadataTransformer.ts b/src/transformers/features/reflect/ReflectMetadataTransformer.ts index db7c9427af..c48f8a65a4 100644 --- a/src/transformers/features/reflect/ReflectMetadataTransformer.ts +++ b/src/transformers/features/reflect/ReflectMetadataTransformer.ts @@ -7,57 +7,63 @@ import { MetadataFactory } from "../../../factories/MetadataFactory"; import { IMetadataApplication } from "../../../schemas/metadata/IMetadataApplication"; import { Metadata } from "../../../schemas/metadata/Metadata"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; import { TransformerError } from "../../TransformerError"; export namespace ReflectMetadataTransformer { - export const transform = - (project: IProject) => - (expression: ts.CallExpression): ts.Expression => { - if (!expression.typeArguments?.length) - throw new TransformerError({ - code: "typia.reflect.metadata", - message: "no generic argument.", - }); + export const transform = ( + props: Pick, + ): ts.Expression => { + if (!props.expression.typeArguments?.length) + throw new TransformerError({ + code: "typia.reflect.metadata", + message: "no generic argument.", + }); - // VALIDATE TUPLE ARGUMENTS - const top: ts.Node = expression.typeArguments[0]!; - if (!ts.isTupleTypeNode(top)) return expression; - else if (top.elements.some((child) => !ts.isTypeNode(child))) - return expression; - - // GET TYPES - const types: ts.Type[] = top.elements.map((child) => - project.checker.getTypeFromTypeNode(child as ts.TypeNode), - ); - if (types.some((t) => t.isTypeParameter())) - throw new TransformerError({ - code: "typia.reflect.metadata", - message: "non-specified generic argument(s).", - }); + // VALIDATE TUPLE ARGUMENTS + const top: ts.Node = props.expression.typeArguments[0]!; + if (!ts.isTupleTypeNode(top)) return props.expression; + else if (top.elements.some((child) => !ts.isTypeNode(child))) + return props.expression; - // METADATA - const collection: MetadataCollection = new MetadataCollection(); - const metadatas: Array = types.map((type) => { - const result = MetadataFactory.analyze( - project.checker, - project.context, - )({ + // GET TYPES + const types: ts.Type[] = top.elements.map((child) => + props.context.checker.getTypeFromTypeNode(child as ts.TypeNode), + ); + if (types.some((t) => t.isTypeParameter())) + throw new TransformerError({ + code: "typia.reflect.metadata", + message: "non-specified generic argument(s).", + }); + + // METADATA + const collection: MetadataCollection = new MetadataCollection(); + const metadatas: Array = types.map((type) => { + const result = MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: true, constant: true, absorb: true, functional: true, - })(collection)(type); - if (result.success === false) - throw TransformerError.from("typia.reflect.metadata")(result.errors); - return result.data; + }, + collection, + type, }); + if (result.success === false) + throw TransformerError.from({ + code: "typia.reflect.metadata", + errors: result.errors, + }); + return result.data; + }); - // CONVERT TO PRIMITIVE TYPE - const app: IMetadataApplication = { - metadatas: metadatas.map((metadata) => metadata.toJSON()), - components: collection.toJSON(), - }; - return LiteralFactory.generate(app); + // CONVERT TO PRIMITIVE TYPE + const app: IMetadataApplication = { + metadatas: metadatas.map((metadata) => metadata.toJSON()), + components: collection.toJSON(), }; + return LiteralFactory.write(app); + }; } diff --git a/src/transformers/features/reflect/ReflectNameTransformer.ts b/src/transformers/features/reflect/ReflectNameTransformer.ts index 7d8557943d..e10c227776 100644 --- a/src/transformers/features/reflect/ReflectNameTransformer.ts +++ b/src/transformers/features/reflect/ReflectNameTransformer.ts @@ -7,60 +7,76 @@ import { Metadata } from "../../../schemas/metadata/Metadata"; import { ValidationPipe } from "../../../typings/ValidationPipe"; -import { IProject } from "../../IProject"; +import { ITransformProps } from "../../ITransformProps"; +import { ITypiaContext } from "../../ITypiaContext"; import { TransformerError } from "../../TransformerError"; export namespace ReflectNameTransformer { - export const transform = - (project: IProject) => - (expression: ts.CallExpression): ts.Expression => { - if (!expression.typeArguments?.length) - throw new TransformerError({ - code: "typia.reflect.metadata", - message: "no generic argument.", - }); - const top: ts.Node = expression.typeArguments[0]!; - const regular: boolean = (() => { - // CHECK SECOND ARGUMENT EXISTENCE - const second: ts.Node | undefined = expression.typeArguments[1]!; - if (second === undefined) return false; + export const transform = ( + props: Pick, + ): ts.Expression => { + if (!props.expression.typeArguments?.length) + throw new TransformerError({ + code: "typia.reflect.metadata", + message: "no generic argument.", + }); + const top: ts.Node = props.expression.typeArguments[0]!; + const regular: boolean = (() => { + // CHECK SECOND ARGUMENT EXISTENCE + const second: ts.Node | undefined = props.expression.typeArguments[1]!; + if (second === undefined) return false; - // GET BOOELAN VALUE - const value: Metadata = getMetadata(project)(second); - return value.size() === 1 && - value.constants.length === 1 && - value.constants[0]!.type === "boolean" && - value.constants[0]!.values.length === 1 - ? (value.constants[0]!.values[0]!.value as boolean) - : false; - })(); + // GET BOOELAN VALUE + const value: Metadata = getMetadata({ + context: props.context, + node: second, + }); + return value.size() === 1 && + value.constants.length === 1 && + value.constants[0]!.type === "boolean" && + value.constants[0]!.values.length === 1 + ? (value.constants[0]!.values[0]!.value as boolean) + : false; + })(); - // RETURNS NAME - return ts.factory.createStringLiteral( - regular ? getMetadata(project)(top).getName() : top.getFullText(), - ); - }; + // RETURNS NAME + return ts.factory.createStringLiteral( + regular + ? getMetadata({ + context: props.context, + node: top, + }).getName() + : top.getFullText(), + ); + }; } -const getMetadata = - (project: IProject) => - (node: ts.Node): Metadata => { - const type: ts.Type = project.checker.getTypeFromTypeNode( - node as ts.TypeNode, - ); - const collection: MetadataCollection = new MetadataCollection({ - replace: MetadataCollection.replace, - }); - const result: ValidationPipe = - MetadataFactory.analyze( - project.checker, - project.context, - )({ +const getMetadata = (props: { + context: ITypiaContext; + node: ts.Node; +}): Metadata => { + const type: ts.Type = props.context.checker.getTypeFromTypeNode( + props.node as ts.TypeNode, + ); + const collection: MetadataCollection = new MetadataCollection({ + replace: MetadataCollection.replace, + }); + const result: ValidationPipe = + MetadataFactory.analyze({ + checker: props.context.checker, + transformer: props.context.transformer, + options: { escape: false, constant: true, absorb: false, - })(collection)(type); - if (result.success === false) - throw TransformerError.from("typia.reflect.name")(result.errors); - return result.data; - }; + }, + collection, + type, + }); + if (result.success === false) + throw TransformerError.from({ + code: "typia.reflect.name", + errors: result.errors, + }); + return result.data; +}; diff --git a/src/transformers/internal/GenericTransformer.ts b/src/transformers/internal/GenericTransformer.ts index a5c8294085..0fb2958165 100644 --- a/src/transformers/internal/GenericTransformer.ts +++ b/src/transformers/internal/GenericTransformer.ts @@ -1,104 +1,101 @@ import ts from "typescript"; -import { IProject } from "../IProject"; +import { IProgrammerProps } from "../IProgrammerProps"; +import { ITransformProps } from "../ITransformProps"; import { TransformerError } from "../TransformerError"; export namespace GenericTransformer { - export const scalar = - (method: string) => - ( - programmer: ( - project: IProject, - ) => ( - modulo: ts.LeftHandSideExpression, - ) => (type: ts.Type, name: string) => ts.Expression | ts.ArrowFunction, - ) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression) => { - // CHECK PARAMETER - if (expression.arguments.length === 0) - throw new TransformerError({ - code: `typia.${method}`, - message: `no input value.`, - }); + export interface IProps extends ITransformProps { + method: string; + write: (props: IProgrammerProps) => ts.Expression | ts.ArrowFunction; + } - // GET TYPE INFO - const [type, node, generic]: [ts.Type, ts.Node, boolean] = - expression.typeArguments && expression.typeArguments[0] - ? [ - project.checker.getTypeFromTypeNode(expression.typeArguments[0]), - expression.typeArguments[0], - true, - ] - : [ - project.checker.getTypeAtLocation(expression.arguments[0]!), - expression.arguments[0]!, - false, - ]; - if (type.isTypeParameter()) - throw new TransformerError({ - code: `typia.${method}`, - message: `non-specified generic argument.`, - }); + export const scalar = (props: IProps) => { + // CHECK PARAMETER + if (props.expression.arguments.length === 0) + throw new TransformerError({ + code: `typia.${props.method}`, + message: `no input value.`, + }); - // DO TRANSFORM - return ts.factory.createCallExpression( - programmer(project)(modulo)( - type, - generic - ? node.getFullText().trim() - : name(project.checker)(type)(node), - ), - undefined, - expression.arguments, - ); - }; + // GET TYPE INFO + const [type, node, generic]: [ts.Type, ts.Node, boolean] = + props.expression.typeArguments && props.expression.typeArguments[0] + ? [ + props.context.checker.getTypeFromTypeNode( + props.expression.typeArguments[0], + ), + props.expression.typeArguments[0], + true, + ] + : [ + props.context.checker.getTypeAtLocation( + props.expression.arguments[0]!, + ), + props.expression.arguments[0]!, + false, + ]; + if (type.isTypeParameter()) + throw new TransformerError({ + code: `typia.${props.method}`, + message: `non-specified generic argument.`, + }); - export const factory = - (method: string) => - ( - programmer: ( - project: IProject, - ) => ( - modulo: ts.LeftHandSideExpression, - ) => ( - type: ts.Type, - name: string, - init?: ts.Expression, - ) => ts.Expression | ts.ArrowFunction, - ) => - (project: IProject) => - (modulo: ts.LeftHandSideExpression) => - (expression: ts.CallExpression) => { - // CHECK GENERIC ARGUMENT EXISTENCE - if (!expression.typeArguments?.[0]) - throw new TransformerError({ - code: `typia.${method}`, - message: `generic argument is not specified.`, - }); + // DO TRANSFORM + return ts.factory.createCallExpression( + props.write({ + context: props.context, + modulo: props.modulo, + type, + name: generic + ? node.getFullText().trim() + : getTypeName({ + checker: props.context.checker, + type, + node, + }), + }), + undefined, + props.expression.arguments, + ); + }; - // GET TYPE INFO - const node: ts.TypeNode = expression.typeArguments[0]; - const type: ts.Type = project.checker.getTypeFromTypeNode(node); + export const factory = (props: IProps) => { + // CHECK GENERIC ARGUMENT EXISTENCE + if (!props.expression.typeArguments?.[0]) + throw new TransformerError({ + code: `typia.${props.method}`, + message: `generic argument is not specified.`, + }); - if (type.isTypeParameter()) - throw new TransformerError({ - code: `typia.${method}`, - message: `non-specified generic argument.`, - }); + // GET TYPE INFO + const node: ts.TypeNode = props.expression.typeArguments[0]; + const type: ts.Type = props.context.checker.getTypeFromTypeNode(node); - // DO TRANSFORM - return programmer(project)(modulo)( - type, - node.getFullText().trim(), - expression.arguments[0], - ); - }; + if (type.isTypeParameter()) + throw new TransformerError({ + code: `typia.${props.method}`, + message: `non-specified generic argument.`, + }); + + // DO TRANSFORM + return props.write({ + context: props.context, + modulo: props.modulo, + type, + name: node.getFullText().trim(), + init: props.expression.arguments[0], + }); + }; - const name = - (checker: ts.TypeChecker) => - (type: ts.Type) => - (node: ts.Node): string => - checker.typeToString(type, node, ts.TypeFormatFlags.NodeBuilderFlagsMask); + const getTypeName = (props: { + checker: ts.TypeChecker; + type: ts.Type; + node: ts.Node; + }): string => + props.checker.typeToString( + props.type, + props.node, + ts.TypeFormatFlags.NodeBuilderFlagsMask, + ); } diff --git a/src/utils/MapUtil.ts b/src/utils/MapUtil.ts index 2a938af27c..2683ffa2a5 100644 --- a/src/utils/MapUtil.ts +++ b/src/utils/MapUtil.ts @@ -1,12 +1,14 @@ export namespace MapUtil { - export const take = - (dict: Map) => - (key: Key, generator: () => T): T => { - const oldbie: T | undefined = dict.get(key); - if (oldbie) return oldbie; + export const take = ( + dict: Map, + key: Key, + generator: () => T, + ): T => { + const oldbie: T | undefined = dict.get(key); + if (oldbie) return oldbie; - const value: T = generator(); - dict.set(key, value); - return value; - }; + const value: T = generator(); + dict.set(key, value); + return value; + }; } diff --git a/src/utils/NameEncoder.ts b/src/utils/NameEncoder.ts deleted file mode 100644 index 785875cb35..0000000000 --- a/src/utils/NameEncoder.ts +++ /dev/null @@ -1,32 +0,0 @@ -export namespace NameEncoder { - export function encode(str: string): string { - for (const [before, after] of REPLACERS) - str = str.split(before).join(after); - return str; - } - - export function decode(str: string): string { - for (const [before, after] of REPLACERS) - if (after !== "") str = str.split(after).join(before); - return str; - } -} - -const REPLACERS: [string, string][] = [ - ["$", "_dollar_"], - ["&", "_and_"], - ["|", "_or_"], - ["{", "_blt_"], - ["}", "_bgt_"], - ["<", "_lt_"], - [">", "_gt_"], - ["(", "_lp_"], - [")", "_rp_"], - ["[", "_alt_"], - ["]", "_agt_"], - [",", "_comma_"], - ["`", "_backquote_"], - ["'", "_singlequote_"], - ['"', "_doublequote_"], - [" ", "_space_"], -]; diff --git a/src/utils/NamingConvention.ts b/src/utils/NamingConvention.ts new file mode 100644 index 0000000000..04be742339 --- /dev/null +++ b/src/utils/NamingConvention.ts @@ -0,0 +1,94 @@ +import { StringUtil } from "./StringUtil"; + +export namespace NamingConvention { + const unsnake = + (props: { + plain: (str: string) => string; + snake: (str: string, index: number) => string; + }) => + (str: string): string => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + let prefix: string = ""; + for (let i: number = 0; i < str.length; i++) { + if (str[i] === "_") prefix += "_"; + else break; + } + if (prefix.length !== 0) str = str.substring(prefix.length); + + const out = (s: string) => `${prefix}${s}`; + if (str.length === 0) return out(""); + + const items: string[] = str.split("_").filter((s) => s.length !== 0); + return items.length === 0 + ? out("") + : items.length === 1 + ? out(props.plain(items[0]!)) + : out(items.map(props.snake).join("")); + }; + + export function snake(str: string): string { + if (str.length === 0) return str; + + // PREFIX + // eslint-disable-next-line @typescript-eslint/no-unused-vars + let prefix: string = ""; + for (let i: number = 0; i < str.length; i++) { + if (str[i] === "_") prefix += "_"; + else break; + } + if (prefix.length !== 0) str = str.substring(prefix.length); + + const out = (s: string) => `${prefix}${s}`; + + // SNAKE CASE + const items: string[] = str.split("_"); + if (items.length > 1) + return out(items.map((s) => s.toLowerCase()).join("_")); + + // CAMEL OR PASCAL CASE + const indexes: number[] = []; + for (let i: number = 0; i < str.length; i++) { + const code: number = str.charCodeAt(i); + if (65 <= code && code <= 90) indexes.push(i); + } + for (let i: number = indexes.length - 1; i > 0; --i) { + const now: number = indexes[i]!; + const prev: number = indexes[i - 1]!; + if (now - prev === 1) indexes.splice(i, 1); + } + if (indexes.length !== 0 && indexes[0] === 0) indexes.splice(0, 1); + if (indexes.length === 0) return str.toLowerCase(); + + let ret: string = ""; + for (let i: number = 0; i < indexes.length; i++) { + const first: number = i === 0 ? 0 : indexes[i - 1]!; + const last: number = indexes[i]!; + + ret += str.substring(first, last).toLowerCase(); + ret += "_"; + } + ret += str.substring(indexes[indexes.length - 1]!).toLowerCase(); + return out(ret); + } + + export function camel(str: string) { + return unsnake({ + plain: (str) => + str.length + ? str === str.toUpperCase() + ? str.toLocaleLowerCase() + : `${str[0]!.toLowerCase()}${str.substring(1)}` + : str, + snake: (str, i) => + i === 0 ? str.toLowerCase() : StringUtil.capitalize(str.toLowerCase()), + })(str); + } + + export function pascal(str: string) { + return unsnake({ + plain: (str) => + str.length ? `${str[0]!.toUpperCase()}${str.substring(1)}` : str, + snake: StringUtil.capitalize, + })(str); + } +} diff --git a/src/utils/NamingConvention/NamingConvention.ts b/src/utils/NamingConvention/NamingConvention.ts deleted file mode 100644 index 3832db749b..0000000000 --- a/src/utils/NamingConvention/NamingConvention.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { StringUtil } from "../StringUtil"; - -export function snake(str: string): string { - if (str.length === 0) return str; - - // PREFIX - // eslint-disable-next-line @typescript-eslint/no-unused-vars - let prefix: string = ""; - for (let i: number = 0; i < str.length; i++) { - if (str[i] === "_") prefix += "_"; - else break; - } - if (prefix.length !== 0) str = str.substring(prefix.length); - - const out = (s: string) => `${prefix}${s}`; - - // SNAKE CASE - const items: string[] = str.split("_"); - if (items.length > 1) return out(items.map((s) => s.toLowerCase()).join("_")); - - // CAMEL OR PASCAL CASE - const indexes: number[] = []; - for (let i: number = 0; i < str.length; i++) { - const code: number = str.charCodeAt(i); - if (65 <= code && code <= 90) indexes.push(i); - } - for (let i: number = indexes.length - 1; i > 0; --i) { - const now: number = indexes[i]!; - const prev: number = indexes[i - 1]!; - if (now - prev === 1) indexes.splice(i, 1); - } - if (indexes.length !== 0 && indexes[0] === 0) indexes.splice(0, 1); - if (indexes.length === 0) return str.toLowerCase(); - - let ret: string = ""; - for (let i: number = 0; i < indexes.length; i++) { - const first: number = i === 0 ? 0 : indexes[i - 1]!; - const last: number = indexes[i]!; - - ret += str.substring(first, last).toLowerCase(); - ret += "_"; - } - ret += str.substring(indexes[indexes.length - 1]!).toLowerCase(); - return out(ret); -} - -export const camel = (str: string): string => - unsnake({ - plain: (str) => - str.length - ? str === str.toUpperCase() - ? str.toLocaleLowerCase() - : `${str[0]!.toLowerCase()}${str.substring(1)}` - : str, - snake: (str, i) => - i === 0 ? str.toLowerCase() : StringUtil.capitalize(str.toLowerCase()), - })(str); - -export const pascal = (str: string): string => - unsnake({ - plain: (str) => - str.length ? `${str[0]!.toUpperCase()}${str.substring(1)}` : str, - snake: StringUtil.capitalize, - })(str); - -const unsnake = - (props: { - plain: (str: string) => string; - snake: (str: string, index: number) => string; - }) => - (str: string): string => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - let prefix: string = ""; - for (let i: number = 0; i < str.length; i++) { - if (str[i] === "_") prefix += "_"; - else break; - } - if (prefix.length !== 0) str = str.substring(prefix.length); - - const out = (s: string) => `${prefix}${s}`; - if (str.length === 0) return out(""); - - const items: string[] = str.split("_").filter((s) => s.length !== 0); - return items.length === 0 - ? out("") - : items.length === 1 - ? out(props.plain(items[0]!)) - : out(items.map(props.snake).join("")); - }; diff --git a/src/utils/NamingConvention/index.ts b/src/utils/NamingConvention/index.ts deleted file mode 100644 index 864a3e2f2d..0000000000 --- a/src/utils/NamingConvention/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as NamingConvention from "./NamingConvention"; diff --git a/src/utils/ProtobufNameEncoder.ts b/src/utils/ProtobufNameEncoder.ts new file mode 100644 index 0000000000..bf35bf6bc1 --- /dev/null +++ b/src/utils/ProtobufNameEncoder.ts @@ -0,0 +1,32 @@ +export namespace ProtobufNameEncoder { + export const encode = (str: string): string => { + for (const [before, after] of REPLACERS) + str = str.split(before).join(after); + return str; + }; + + export const decode = (str: string): string => { + for (const [before, after] of REPLACERS) + if (after !== "") str = str.split(after).join(before); + return str; + }; +} + +const REPLACERS: [string, string][] = [ + ["$", "_dollar_"], + ["&", "_and_"], + ["|", "_or_"], + ["{", "_blt_"], + ["}", "_bgt_"], + ["<", "_lt_"], + [">", "_gt_"], + ["(", "_lp_"], + [")", "_rp_"], + ["[", "_alt_"], + ["]", "_agt_"], + [",", "_comma_"], + ["`", "_backquote_"], + ["'", "_singlequote_"], + ['"', "_doublequote_"], + [" ", "_space_"], +]; diff --git a/src/utils/RandomGenerator/RandomGenerator.ts b/src/utils/RandomGenerator/RandomGenerator.ts deleted file mode 100644 index d6bcf8fb20..0000000000 --- a/src/utils/RandomGenerator/RandomGenerator.ts +++ /dev/null @@ -1,119 +0,0 @@ -import RandExp from "randexp"; - -const ALPHABETS = "abcdefghijklmnopqrstuvwxyz"; - -/* ----------------------------------------------------------- - REGULAR ------------------------------------------------------------ */ -export const boolean = () => Math.random() < 0.5; -export const integer = (min?: number, max?: number) => { - min ??= 0; - max ??= 100; - return Math.floor(Math.random() * (max - min + 1)) + min; -}; -export const bigint = (min?: bigint, max?: bigint) => - BigInt(integer(Number(min ?? BigInt(0)), Number(max ?? BigInt(100)))); -export const number = (min?: number, max?: number) => { - min ??= 0; - max ??= 100; - return Math.random() * (max - min) + min; -}; -export const string = (length?: number): string => - new Array(length ?? integer(5, 10)) - .fill(0) - .map(() => ALPHABETS[integer(0, ALPHABETS.length - 1)]) - .join(""); - -export const array = ( - closure: (index: number) => T, - count?: number, - unique?: boolean, -): T[] => { - count ??= length(); - unique ??= false; - if (unique === false) - return new Array(count ?? length()) - .fill(0) - .map((_e, index) => closure(index)); - else { - const set = new Set(); - while (set.size < count) set.add(closure(set.size)); - return Array.from(set); - } -}; -export const pick = (array: T[]): T => array[integer(0, array.length - 1)]!; -export const length = () => integer(0, 3); -export const pattern = (regex: RegExp): string => { - const r: RandExp = new RandExp(regex); - for (let i: number = 0; i < 10; ++i) { - const str: string = r.gen(); - if (regex.test(str)) return str; - } - return r.gen(); -}; - -/* ----------------------------------------------------------- - SECIAL FORMATS ------------------------------------------------------------ */ -// SPECIAL CHARACTERS -export const byte = () => "vt7ekz4lIoNTTS9sDQYdWKharxIFAR54+z/umIxSgUM="; -export const password = () => string(integer(4, 16)); -export const regex = () => - "/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/"; -export const uuid = () => - "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { - const r = (Math.random() * 16) | 0; - const v = c === "x" ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); - -// ADDRESSES -export const email = () => `${string(10)}@${string(10)}.${string(3)}`; -export const hostname = () => `${string(10)}.${string(3)}`; -export const idnEmail = () => email(); -export const idnHostname = () => hostname(); -export const iri = () => url(); -export const iriReference = () => url(); -export const ipv4 = () => array(() => integer(0, 255), 4).join("."); -export const ipv6 = (): string => - array(() => integer(0, 65535).toString(16), 8).join(":"); -export const uri = () => url(); -export const uriReference = () => url(); -export const uriTemplate = () => url(); -export const url = () => `https://${string(10)}.${string(3)}`; - -// TIMESTAMPS -export const datetime = (min?: number, max?: number) => - new Date( - number(min ?? Date.now() - 30 * DAY, max ?? Date.now() + 7 * DAY), - ).toISOString(); -export const date = (min?: number, max?: number) => - new Date(number(min ?? 0, max ?? Date.now() * 2)) - .toISOString() - .substring(0, 10); -export const time = () => new Date(number(0, DAY)).toISOString().substring(11); -export const duration = () => { - const period: string = durate([ - ["Y", integer(0, 100)], - ["M", integer(0, 12)], - ["D", integer(0, 31)], - ]); - const time: string = durate([ - ["H", integer(0, 24)], - ["M", integer(0, 60)], - ["S", integer(0, 60)], - ]); - if (period.length + time.length === 0) return "PT0S"; - return `P${period}${time.length ? "T" : ""}${time}`; -}; - -// POINTERS -export const jsonPointer = () => `/components/schemas/${string(10)}`; -export const relativeJsonPointer = () => `${integer(0, 10)}#`; - -const DAY = 86400000; -const durate = (elements: [string, number][]) => - elements - .filter(([_unit, value]) => value !== 0) - .map(([unit, value]) => `${value}${unit}`) - .join(""); diff --git a/src/utils/RandomGenerator/index.ts b/src/utils/RandomGenerator/index.ts deleted file mode 100644 index b6222f81c5..0000000000 --- a/src/utils/RandomGenerator/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as RandomGenerator from "./RandomGenerator"; diff --git a/src/utils/StringUtil.ts b/src/utils/StringUtil.ts new file mode 100644 index 0000000000..7214f47a25 --- /dev/null +++ b/src/utils/StringUtil.ts @@ -0,0 +1,16 @@ +export namespace StringUtil { + export const capitalize = (str: string) => + str.length ? str[0]!.toUpperCase() + str.slice(1).toLowerCase() : str; + + export const escapeDuplicate = (props: { + keep: string[]; + input: string; + escape?: (str: string) => string; + }): string => + props.keep.includes(props.input) + ? escapeDuplicate({ + keep: props.keep, + input: (props.escape ?? ((str) => `_${str}`))(props.input), + }) + : props.input; +} diff --git a/src/utils/StringUtil/StringUtil.ts b/src/utils/StringUtil/StringUtil.ts deleted file mode 100644 index 3dea3582ab..0000000000 --- a/src/utils/StringUtil/StringUtil.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const capitalize = (str: string) => - str.length ? str[0]!.toUpperCase() + str.slice(1).toLowerCase() : str; - -export const escapeDuplicate = - (keep: string[]) => - (change: string): string => - keep.includes(change) ? escapeDuplicate(keep)(`_${change}`) : change; diff --git a/src/utils/StringUtil/index.ts b/src/utils/StringUtil/index.ts deleted file mode 100644 index 7cab081704..0000000000 --- a/src/utils/StringUtil/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as StringUtil from "./StringUtil"; diff --git a/errors/.gitignore b/test-error/.gitignore similarity index 100% rename from errors/.gitignore rename to test-error/.gitignore diff --git a/errors/index.js b/test-error/index.js similarity index 100% rename from errors/index.js rename to test-error/index.js diff --git a/test-error/package.json b/test-error/package.json new file mode 100644 index 0000000000..224cabb7bf --- /dev/null +++ b/test-error/package.json @@ -0,0 +1,37 @@ +{ + "private": true, + "name": "@typia/errors", + "version": "0.1.0", + "description": "Test program of typia generated errors", + "main": "index.js", + "scripts": { + "build": "rimraf bin && tsc", + "prepare": "ts-patch install", + "prettier": "prettier ./src/**/*.ts --write", + "setup": "node build/setup.js", + "start": "node index" + }, + "repository": { + "type": "git", + "url": "https://github.com/samchon/typia" + }, + "keywords": [ + "typia", + "test", + "error" + ], + "author": "Jeongho Nam", + "license": "MIT", + "bugs": { + "url": "https://github.com/samchon/typia/issues" + }, + "homepage": "https://github.com/samchon/typia#readme", + "devDependencies": { + "rimraf": "^5.0.5", + "ts-patch": "^3.2.0", + "typescript": "~5.6.3" + }, + "dependencies": { + "typia": "../" + } +} \ No newline at end of file diff --git a/test-error/src/examples/llm.schema.additionalProperties.ts b/test-error/src/examples/llm.schema.additionalProperties.ts new file mode 100644 index 0000000000..67dfceca5a --- /dev/null +++ b/test-error/src/examples/llm.schema.additionalProperties.ts @@ -0,0 +1,4 @@ +import typia from "typia"; + +typia.llm.schema, "chatgpt">({}); +typia.llm.schema, "gemini">(); diff --git a/test-error/src/examples/llm.schema.bigint-and-tuple.ts b/test-error/src/examples/llm.schema.bigint-and-tuple.ts new file mode 100644 index 0000000000..df90542b39 --- /dev/null +++ b/test-error/src/examples/llm.schema.bigint-and-tuple.ts @@ -0,0 +1,4 @@ +import typia from "typia"; + +typia.llm.schema({}); +typia.llm.schema<[number, string], "claude">({}); diff --git a/errors/src/http/error_http_headers.ts b/test-error/src/http/error_http_headers.ts similarity index 100% rename from errors/src/http/error_http_headers.ts rename to test-error/src/http/error_http_headers.ts diff --git a/errors/src/http/error_http_parameter.ts b/test-error/src/http/error_http_parameter.ts similarity index 100% rename from errors/src/http/error_http_parameter.ts rename to test-error/src/http/error_http_parameter.ts diff --git a/errors/src/http/error_http_query.ts b/test-error/src/http/error_http_query.ts similarity index 100% rename from errors/src/http/error_http_query.ts rename to test-error/src/http/error_http_query.ts diff --git a/errors/src/json/error_json_bigint.ts b/test-error/src/json/error_json_bigint.ts similarity index 100% rename from errors/src/json/error_json_bigint.ts rename to test-error/src/json/error_json_bigint.ts diff --git a/errors/src/json/error_json_map.ts b/test-error/src/json/error_json_map.ts similarity index 100% rename from errors/src/json/error_json_map.ts rename to test-error/src/json/error_json_map.ts diff --git a/errors/src/json/error_json_native.ts b/test-error/src/json/error_json_native.ts similarity index 100% rename from errors/src/json/error_json_native.ts rename to test-error/src/json/error_json_native.ts diff --git a/errors/src/json/error_json_set.ts b/test-error/src/json/error_json_set.ts similarity index 100% rename from errors/src/json/error_json_set.ts rename to test-error/src/json/error_json_set.ts diff --git a/test-error/src/llm/llm.chatgpt.additionalProperties.ts b/test-error/src/llm/llm.chatgpt.additionalProperties.ts new file mode 100644 index 0000000000..86f8a4aabb --- /dev/null +++ b/test-error/src/llm/llm.chatgpt.additionalProperties.ts @@ -0,0 +1,26 @@ +import typia from "typia"; + +typia.llm.schema< + { + dictionary: Record; + }, + "chatgpt" +>({}); +typia.llm.parameters< + { + input: { + dictionary: Record; + }; + }, + "chatgpt" +>(); +typia.llm.application< + { + inser(props: { + input: { + dictionary: Record; + }; + }): void; + }, + "chatgpt" +>(); diff --git a/test-error/src/llm/llm.gemini.additionalProperties.ts b/test-error/src/llm/llm.gemini.additionalProperties.ts new file mode 100644 index 0000000000..eafe89e9eb --- /dev/null +++ b/test-error/src/llm/llm.gemini.additionalProperties.ts @@ -0,0 +1,26 @@ +import typia from "typia"; + +typia.llm.schema< + { + dictionary: Record; + }, + "gemini" +>(); +typia.llm.parameters< + { + input: { + dictionary: Record; + }; + }, + "gemini" +>(); +typia.llm.application< + { + inser(props: { + input: { + dictionary: Record; + }; + }): void; + }, + "gemini" +>(); diff --git a/test-error/src/llm/llm.gemini.oneOf.ts b/test-error/src/llm/llm.gemini.oneOf.ts new file mode 100644 index 0000000000..adfd3ba915 --- /dev/null +++ b/test-error/src/llm/llm.gemini.oneOf.ts @@ -0,0 +1,26 @@ +import typia from "typia"; + +typia.llm.schema< + { + dictionary: string | number; + }, + "gemini" +>(); +typia.llm.parameters< + { + input: { + dictionary: string | number; + }; + }, + "gemini" +>(); +typia.llm.application< + { + inser(props: { + input: { + dictionary: string | number; + }; + }): void; + }, + "gemini" +>(); diff --git a/test-error/src/llm/llm.schema.bigint.ts b/test-error/src/llm/llm.schema.bigint.ts new file mode 100644 index 0000000000..7888261382 --- /dev/null +++ b/test-error/src/llm/llm.schema.bigint.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +typia.llm.schema({}); +typia.llm.parameters< + { + x: bigint; + }, + "gemini" +>(); +typia.llm.application< + { + insert(props: { x: bigint }): void; + }, + "gemini" +>(); diff --git a/test-error/src/llm/llm.schema.tuple.ts b/test-error/src/llm/llm.schema.tuple.ts new file mode 100644 index 0000000000..229e0f4f2d --- /dev/null +++ b/test-error/src/llm/llm.schema.tuple.ts @@ -0,0 +1,29 @@ +import typia from "typia"; + +typia.llm.schema({}); +typia.llm.schema({}); +typia.llm.schema(); +typia.llm.schema({}); +typia.llm.schema(); +typia.llm.schema({}); + +typia.llm.parameters(); +typia.llm.parameters(); +typia.llm.parameters(); +typia.llm.parameters(); +typia.llm.parameters(); +typia.llm.parameters(); + +typia.llm.application(); +typia.llm.application(); +typia.llm.application(); +typia.llm.application(); +typia.llm.application(); +typia.llm.application(); + +interface IProps { + input: string | number; +} +export interface IApplication { + insert(props: IProps): void; +} diff --git a/errors/src/misc/error_misc_clone_weakmap.ts b/test-error/src/misc/error_misc_clone_weakmap.ts similarity index 100% rename from errors/src/misc/error_misc_clone_weakmap.ts rename to test-error/src/misc/error_misc_clone_weakmap.ts diff --git a/errors/src/misc/error_misc_clone_weakset.ts b/test-error/src/misc/error_misc_clone_weakset.ts similarity index 100% rename from errors/src/misc/error_misc_clone_weakset.ts rename to test-error/src/misc/error_misc_clone_weakset.ts diff --git a/errors/src/misc/error_misc_literals_atomic.ts b/test-error/src/misc/error_misc_literals_atomic.ts similarity index 100% rename from errors/src/misc/error_misc_literals_atomic.ts rename to test-error/src/misc/error_misc_literals_atomic.ts diff --git a/errors/src/nonsensible/error_nonsensible_intersection.ts b/test-error/src/nonsensible/error_nonsensible_intersection.ts similarity index 100% rename from errors/src/nonsensible/error_nonsensible_intersection.ts rename to test-error/src/nonsensible/error_nonsensible_intersection.ts diff --git a/errors/src/protobuf/error_protobuf_any.ts b/test-error/src/protobuf/error_protobuf_any.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_any.ts rename to test-error/src/protobuf/error_protobuf_any.ts diff --git a/errors/src/protobuf/error_protobuf_array_in_array.ts b/test-error/src/protobuf/error_protobuf_array_in_array.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_array_in_array.ts rename to test-error/src/protobuf/error_protobuf_array_in_array.ts diff --git a/errors/src/protobuf/error_protobuf_array_union.ts b/test-error/src/protobuf/error_protobuf_array_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_array_union.ts rename to test-error/src/protobuf/error_protobuf_array_union.ts diff --git a/errors/src/protobuf/error_protobuf_array_union_neighbor.ts b/test-error/src/protobuf/error_protobuf_array_union_neighbor.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_array_union_neighbor.ts rename to test-error/src/protobuf/error_protobuf_array_union_neighbor.ts diff --git a/errors/src/protobuf/error_protobuf_array_value_union.ts b/test-error/src/protobuf/error_protobuf_array_value_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_array_value_union.ts rename to test-error/src/protobuf/error_protobuf_array_value_union.ts diff --git a/errors/src/protobuf/error_protobuf_incompatible_number_and_bigint.ts b/test-error/src/protobuf/error_protobuf_incompatible_number_and_bigint.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_incompatible_number_and_bigint.ts rename to test-error/src/protobuf/error_protobuf_incompatible_number_and_bigint.ts diff --git a/errors/src/protobuf/error_protobuf_map_array.ts b/test-error/src/protobuf/error_protobuf_map_array.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_map_array.ts rename to test-error/src/protobuf/error_protobuf_map_array.ts diff --git a/errors/src/protobuf/error_protobuf_map_key_union.ts b/test-error/src/protobuf/error_protobuf_map_key_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_map_key_union.ts rename to test-error/src/protobuf/error_protobuf_map_key_union.ts diff --git a/errors/src/protobuf/error_protobuf_map_union.ts b/test-error/src/protobuf/error_protobuf_map_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_map_union.ts rename to test-error/src/protobuf/error_protobuf_map_union.ts diff --git a/errors/src/protobuf/error_protobuf_map_union_neighbor.ts b/test-error/src/protobuf/error_protobuf_map_union_neighbor.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_map_union_neighbor.ts rename to test-error/src/protobuf/error_protobuf_map_union_neighbor.ts diff --git a/errors/src/protobuf/error_protobuf_map_value_array.ts b/test-error/src/protobuf/error_protobuf_map_value_array.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_map_value_array.ts rename to test-error/src/protobuf/error_protobuf_map_value_array.ts diff --git a/errors/src/protobuf/error_protobuf_map_value_union.ts b/test-error/src/protobuf/error_protobuf_map_value_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_map_value_union.ts rename to test-error/src/protobuf/error_protobuf_map_value_union.ts diff --git a/errors/src/protobuf/error_protobuf_native.ts b/test-error/src/protobuf/error_protobuf_native.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_native.ts rename to test-error/src/protobuf/error_protobuf_native.ts diff --git a/errors/src/protobuf/error_protobuf_object_both.ts b/test-error/src/protobuf/error_protobuf_object_both.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_both.ts rename to test-error/src/protobuf/error_protobuf_object_both.ts diff --git a/errors/src/protobuf/error_protobuf_object_dynamic_array.ts b/test-error/src/protobuf/error_protobuf_object_dynamic_array.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_dynamic_array.ts rename to test-error/src/protobuf/error_protobuf_object_dynamic_array.ts diff --git a/errors/src/protobuf/error_protobuf_object_dynamic_union.ts b/test-error/src/protobuf/error_protobuf_object_dynamic_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_dynamic_union.ts rename to test-error/src/protobuf/error_protobuf_object_dynamic_union.ts diff --git a/errors/src/protobuf/error_protobuf_object_dynamic_value_array.ts b/test-error/src/protobuf/error_protobuf_object_dynamic_value_array.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_dynamic_value_array.ts rename to test-error/src/protobuf/error_protobuf_object_dynamic_value_array.ts diff --git a/errors/src/protobuf/error_protobuf_object_dynamic_value_union.ts b/test-error/src/protobuf/error_protobuf_object_dynamic_value_union.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_dynamic_value_union.ts rename to test-error/src/protobuf/error_protobuf_object_dynamic_value_union.ts diff --git a/errors/src/protobuf/error_protobuf_object_non_variable_key_name.ts b/test-error/src/protobuf/error_protobuf_object_non_variable_key_name.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_non_variable_key_name.ts rename to test-error/src/protobuf/error_protobuf_object_non_variable_key_name.ts diff --git a/errors/src/protobuf/error_protobuf_object_union_both.ts b/test-error/src/protobuf/error_protobuf_object_union_both.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_object_union_both.ts rename to test-error/src/protobuf/error_protobuf_object_union_both.ts diff --git a/errors/src/protobuf/error_protobuf_root_not_sole_object.ts b/test-error/src/protobuf/error_protobuf_root_not_sole_object.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_root_not_sole_object.ts rename to test-error/src/protobuf/error_protobuf_root_not_sole_object.ts diff --git a/test-error/src/protobuf/error_protobuf_sequence_property_duplicated.ts b/test-error/src/protobuf/error_protobuf_sequence_property_duplicated.ts new file mode 100644 index 0000000000..f2638068c2 --- /dev/null +++ b/test-error/src/protobuf/error_protobuf_sequence_property_duplicated.ts @@ -0,0 +1,27 @@ +import typia, { tags } from "typia"; + +interface IPointer { + value: T; +} +interface Something { + id: string & tags.Sequence<1>; + age: number & tags.Sequence<1>; +} + +// MESSAGE +typia.protobuf.message(); +typia.protobuf.message>(); +typia.protobuf.message>(); +typia.protobuf.message>>(); + +// DECODE +typia.protobuf.createDecode(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>>(); + +// ENCODE +typia.protobuf.createEncode(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>>(); diff --git a/test-error/src/protobuf/error_protobuf_sequence_union_duplicated.ts b/test-error/src/protobuf/error_protobuf_sequence_union_duplicated.ts new file mode 100644 index 0000000000..8ee4fb5b23 --- /dev/null +++ b/test-error/src/protobuf/error_protobuf_sequence_union_duplicated.ts @@ -0,0 +1,32 @@ +import typia, { tags } from "typia"; + +interface IPointer { + value: T; +} +interface Something { + id: + | (number & tags.Type<"uint32"> & tags.Sequence<1>) + | (number & tags.Type<"double"> & tags.Sequence<2>) + | (string & tags.Sequence<3>); + sex: + | (number & tags.Type<"uint32"> & tags.Sequence<4>) + | (string & tags.Sequence<3>); +} + +// MESSAGE +typia.protobuf.message(); +typia.protobuf.message>(); +typia.protobuf.message>(); +typia.protobuf.message>>(); + +// DECODE +typia.protobuf.createDecode(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>>(); + +// ENCODE +typia.protobuf.createEncode(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>>(); diff --git a/test-error/src/protobuf/error_protobuf_sequence_union_omitted.ts b/test-error/src/protobuf/error_protobuf_sequence_union_omitted.ts new file mode 100644 index 0000000000..3bfac708ff --- /dev/null +++ b/test-error/src/protobuf/error_protobuf_sequence_union_omitted.ts @@ -0,0 +1,29 @@ +import typia, { tags } from "typia"; + +interface IPointer { + value: T; +} +interface Something { + id: + | (number & tags.Type<"uint32"> & tags.Sequence<1>) + | (number & tags.Type<"double"> & tags.Sequence<2>) + | string; +} + +// MESSAGE +typia.protobuf.message(); +typia.protobuf.message>(); +typia.protobuf.message>(); +typia.protobuf.message>>(); + +// DECODE +typia.protobuf.createDecode(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>>(); + +// ENCODE +typia.protobuf.createEncode(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>>(); diff --git a/errors/src/protobuf/error_protobuf_set.ts b/test-error/src/protobuf/error_protobuf_set.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_set.ts rename to test-error/src/protobuf/error_protobuf_set.ts diff --git a/errors/src/protobuf/error_protobuf_tuple.ts b/test-error/src/protobuf/error_protobuf_tuple.ts similarity index 100% rename from errors/src/protobuf/error_protobuf_tuple.ts rename to test-error/src/protobuf/error_protobuf_tuple.ts diff --git a/errors/src/random/error_random_weakmap.ts b/test-error/src/random/error_random_weakmap.ts similarity index 100% rename from errors/src/random/error_random_weakmap.ts rename to test-error/src/random/error_random_weakmap.ts diff --git a/errors/src/random/error_random_weakset.ts b/test-error/src/random/error_random_weakset.ts similarity index 100% rename from errors/src/random/error_random_weakset.ts rename to test-error/src/random/error_random_weakset.ts diff --git a/errors/tsconfig.json b/test-error/tsconfig.json similarity index 100% rename from errors/tsconfig.json rename to test-error/tsconfig.json diff --git a/test-esm/package.json b/test-esm/package.json index 8e65553183..6ea3e1454c 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -33,9 +33,9 @@ "@types/cli": "^0.11.25", "@types/node": "^20.9.4", "ts-patch": "^3.2.0", - "typescript": "^5.4.5" + "typescript": "~5.6.3" }, "dependencies": { - "typia": "../typia-6.12.1.tgz" + "typia": "../" } } \ No newline at end of file diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 968ec82d48..0000000000 --- a/test/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bin-generated -generated \ No newline at end of file diff --git a/test/build/internal/TestJsonApplicationGenerator.ts b/test/build/internal/TestJsonApplicationGenerator.ts new file mode 100644 index 0000000000..1129870263 --- /dev/null +++ b/test/build/internal/TestJsonApplicationGenerator.ts @@ -0,0 +1,104 @@ +// import cp from "child_process"; +// import fs from "fs"; + +// import { TestStructure } from "./TestStructure"; + +// export namespace TestJsonApplicationGenerator { +// export async function generate( +// structures: TestStructure[], +// ): Promise { +// const location: string = `${__dirname}/../../src/features/json.application`; +// if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); +// await fs.promises.mkdir(location); + +// for (const version of ["3.0", "3.1"] as const) +// await functor(structures, version); +// } + +// async function functor( +// structures: TestStructure[], +// version: "3.0" | "3.1", +// ): Promise { +// const title: string = `v${version.replace(".", "_")}`; +// const path: string = `${__dirname}/../../src/features/json.application/${title}`; +// await fs.promises.mkdir(path); + +// for (const s of structures) { +// if (s.JSONABLE === false) continue; + +// const content: string[] = [ +// `import typia from "typia";`, +// `import { ${s.name} } from "../../../structures/${s.name}";`, +// `import { _test_json_application } from "../../../internal/_test_json_application";`, +// "", +// `export const test_json_application_${title}_${s.name} = `, +// ` _test_json_application({`, +// ` version: "${version}",`, +// ` name: "${s.name}", `, +// ` })(`, +// ` typia.json.application<${s.name}Application, "${version}">()`, +// ` );`, +// ``, +// `interface ${s.name}Application {`, +// ` insert(first: ${s.name}): Promise;`, +// ` reduce(first: ${s.name}, second: ${s.name} | null): Promise<${s.name}>;`, +// ` coalesce(`, +// ` first: ${s.name} | null,`, +// ` second: ${s.name} | null,`, +// ` third?: ${s.name} | null,`, +// ` ): Promise<${s.name} | null>;`, +// `}`, +// ]; +// await fs.promises.writeFile( +// `${__dirname}/../../src/features/json.application/${title}/test_json_application_${title}_${s.name}.ts`, +// content.join("\n"), +// "utf8", +// ); +// } +// } + +// export async function schemas(): Promise { +// const location: string = `${__dirname}/../../schemas/json.application`; +// await mkdir(location); + +// for (const version of ["3.0", "3.1"] as const) await iterate(version); +// } + +// function getSchema(content: string): object { +// const first: number = content.lastIndexOf("})({") + 4; +// const last: number = content.lastIndexOf("}"); +// return new Function("return {" + content.substring(first, last) + "}")(); +// } + +// async function iterate(version: "3.0" | "3.1") { +// const title: string = `v${version.replace(".", "_")}`; +// const path: string = `${__dirname}/../../src/features/json.application/${title}`; +// const schemaPath: string = `${__dirname}/../../schemas/json.application/${title}`; +// await mkdir(schemaPath); + +// for (const file of await fs.promises.readdir(path)) { +// if (file.substring(file.length - 3) !== ".ts") continue; + +// const name: string = file.substring( +// `test_json_application_${title}_`.length, +// file.length - 3, +// ); +// const location: string = +// __dirname + +// `/../../bin/features/json.application/${title}/${file.slice(0, -3)}.js`; +// const schema: object = getSchema( +// await fs.promises.readFile(location, "utf8"), +// ); +// await fs.promises.writeFile( +// `${schemaPath}/${name}.json`, +// JSON.stringify(schema, null, 2), +// "utf8", +// ); +// } +// } + +// async function mkdir(path: string): Promise { +// if (fs.existsSync(path)) cp.execSync(`npx rimraf ${path}`); +// await fs.promises.mkdir(path); +// } +// } diff --git a/test/build/internal/TestJsonSchemaGenerator.ts b/test/build/internal/TestJsonSchemaGenerator.ts deleted file mode 100644 index 0c0e6a3b0b..0000000000 --- a/test/build/internal/TestJsonSchemaGenerator.ts +++ /dev/null @@ -1,92 +0,0 @@ -import cp from "child_process"; -import fs from "fs"; - -import { TestStructure } from "./TestStructure"; - -export namespace TestJsonSchemaGenerator { - export async function generate( - structures: TestStructure[], - ): Promise { - const location: string = `${__dirname}/../../src/features/json.application`; - if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); - await fs.promises.mkdir(location); - - for (const version of ["3.0", "3.1"] as const) - await application(structures, version); - } - - async function application( - structures: TestStructure[], - version: "3.0" | "3.1", - ): Promise { - const title: string = `v${version.replace(".", "_")}`; - const path: string = `${__dirname}/../../src/features/json.application/${title}`; - await fs.promises.mkdir(path); - - for (const s of structures) { - if (s.JSONABLE === false) continue; - - const content: string[] = [ - `import typia from "typia";`, - `import { ${s.name} } from "../../../structures/${s.name}";`, - `import { _test_json_application } from "../../../internal/_test_json_application";`, - "", - `export const test_json_application_${title}_${s.name} = `, - ` _test_json_application({`, - ` version: "${version}",`, - ` name: "${s.name}", `, - ` })(typia.json.application<[${s.name}], "${version}">());`, - ]; - await fs.promises.writeFile( - `${__dirname}/../../src/features/json.application/${title}/test_json_application_${title}_${s.name}.ts`, - content.join("\n"), - "utf8", - ); - } - } - - export async function schemas(): Promise { - const location: string = `${__dirname}/../../schemas/json`; - await mkdir(location); - - for (const version of ["3.0", "3.1"] as const) await iterate(version); - } - - function getSchema(content: string): object { - const first: number = content.lastIndexOf("})({") + 4; - const last: number = content.lastIndexOf("}"); - return new Function("return {" + content.substring(first, last) + "}")(); - } - - async function iterate(version: "3.0" | "3.1") { - const title: string = `v${version.replace(".", "_")}`; - const path: string = `${__dirname}/../../src/features/json.application/${title}`; - const schemaPath: string = `${__dirname}/../../schemas/json/${title}`; - await mkdir(schemaPath); - - for (const file of await fs.promises.readdir(path)) { - if (file.substring(file.length - 3) !== ".ts") continue; - - const name: string = file.substring( - `test_json_application_${title}_`.length, - file.length - 3, - ); - const location: string = - __dirname + - `/../../bin/features/json.application/${title}/${file.slice(0, -3)}.js`; - const schema: object = getSchema( - await fs.promises.readFile(location, "utf8"), - ); - await fs.promises.writeFile( - `${schemaPath}/${name}.json`, - JSON.stringify(schema, null, 2), - "utf8", - ); - } - } - - async function mkdir(path: string): Promise { - if (fs.existsSync(path)) cp.execSync(`npx rimraf ${path}`); - await fs.promises.mkdir(path); - } -} diff --git a/test/build/internal/TestJsonSchemasGenerator.ts b/test/build/internal/TestJsonSchemasGenerator.ts new file mode 100644 index 0000000000..c9ce407616 --- /dev/null +++ b/test/build/internal/TestJsonSchemasGenerator.ts @@ -0,0 +1,92 @@ +import cp from "child_process"; +import fs from "fs"; + +import { TestStructure } from "./TestStructure"; + +export namespace TestJsonSchemasGenerator { + export async function generate( + structures: TestStructure[], + ): Promise { + const location: string = `${__dirname}/../../src/features/json.schemas`; + if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); + await fs.promises.mkdir(location); + + for (const version of ["3.0", "3.1"] as const) + await functor(structures, version); + } + + async function functor( + structures: TestStructure[], + version: "3.0" | "3.1", + ): Promise { + const title: string = `v${version.replace(".", "_")}`; + const path: string = `${__dirname}/../../src/features/json.schemas/${title}`; + await fs.promises.mkdir(path); + + for (const s of structures) { + if (s.JSONABLE === false) continue; + + const content: string[] = [ + `import typia from "typia";`, + `import { ${s.name} } from "../../../structures/${s.name}";`, + `import { _test_json_schemas } from "../../../internal/_test_json_schemas";`, + "", + `export const test_json_schemas_${title}_${s.name} = `, + ` _test_json_schemas({`, + ` version: "${version}",`, + ` name: "${s.name}", `, + ` })(typia.json.schemas<[${s.name}], "${version}">());`, + ]; + await fs.promises.writeFile( + `${__dirname}/../../src/features/json.schemas/${title}/test_json_schemas_${title}_${s.name}.ts`, + content.join("\n"), + "utf8", + ); + } + } + + export async function schemas(): Promise { + const location: string = `${__dirname}/../../schemas/json.schemas`; + await mkdir(location); + + for (const version of ["3.0", "3.1"] as const) await iterate(version); + } + + function getSchema(content: string): object { + const first: number = content.lastIndexOf("})({") + 4; + const last: number = content.lastIndexOf("}"); + return new Function("return {" + content.substring(first, last) + "}")(); + } + + async function iterate(version: "3.0" | "3.1") { + const title: string = `v${version.replace(".", "_")}`; + const path: string = `${__dirname}/../../src/features/json.schemas/${title}`; + const schemaPath: string = `${__dirname}/../../schemas/json.schemas/${title}`; + await mkdir(schemaPath); + + for (const file of await fs.promises.readdir(path)) { + if (file.substring(file.length - 3) !== ".ts") continue; + + const name: string = file.substring( + `test_json_schemas_${title}_`.length, + file.length - 3, + ); + const location: string = + __dirname + + `/../../bin/features/json.schemas/${title}/${file.slice(0, -3)}.js`; + const schema: object = getSchema( + await fs.promises.readFile(location, "utf8"), + ); + await fs.promises.writeFile( + `${schemaPath}/${name}.json`, + JSON.stringify(schema, null, 2), + "utf8", + ); + } + } + + async function mkdir(path: string): Promise { + if (fs.existsSync(path)) cp.execSync(`npx rimraf ${path}`); + await fs.promises.mkdir(path); + } +} diff --git a/test/build/internal/TestLlmApplicationGenerator.ts b/test/build/internal/TestLlmApplicationGenerator.ts new file mode 100644 index 0000000000..18124f3ede --- /dev/null +++ b/test/build/internal/TestLlmApplicationGenerator.ts @@ -0,0 +1,129 @@ +import cp from "child_process"; +import fs from "fs"; + +import { TestStructure } from "./TestStructure"; + +export namespace TestLlmApplicationGenerator { + export async function generate( + structures: TestStructure[], + ): Promise { + const location: string = `${__dirname}/../../src/features/llm.application`; + if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); + await fs.promises.mkdir(location); + for (const model of MODELS) { + await fs.promises.mkdir(`${location}/${model}`); + await application(model, structures); + } + } + + async function application( + model: string, + structures: TestStructure[], + ): Promise { + for (const s of structures) { + if (s.name === "UltimateUnion") + continue; // TOO MUCH LARGE + else if ( + fs.existsSync( + `${__dirname}/../../schemas/json.schemas/v3_1/${s.name}.json`, + ) === false + ) + continue; + + const v31: string = await fs.promises.readFile( + `${__dirname}/../../schemas/json.schemas/v3_1/${s.name}.json`, + "utf8", + ); + if ( + (model === "chatgpt" || model === "gemini") && + (v31.includes(`"additionalProperties": {`) === true || + v31.includes(`"additionalProperties": true`) === true) + ) + continue; + else if (v31.includes(`"prefixItems":`) === true) continue; + else if (model === "gemini") { + // GEMINI DOES NOT SUPPORT UNION TYPE + const json: string = await fs.promises.readFile( + `${__dirname}/../../schemas/json.schemas/v3_0/${s.name}.json`, + "utf8", + ); + if (json.includes(`"oneOf":`) === true) continue; + } + const content: string[] = [ + `import typia from "typia";`, + `import { ${s.name} } from "../../../structures/${s.name}";`, + `import { _test_llm_application } from "../../../internal/_test_llm_application";`, + "", + `export const test_llm_application_${model.replace(".", "_")}_${s.name} = `, + ` _test_llm_application({`, + ` model: ${JSON.stringify(model)},`, + ` name: ${JSON.stringify(s.name)},`, + ` })(`, + ` typia.llm.application<${s.name}Application, ${JSON.stringify(model)}>(),`, + ` );`, + ``, + `interface ${s.name}Application {`, + ` insert(p: { first: ${s.name} }): Promise;`, + ` reduce(p: { first: ${s.name}, second: ${s.name} | null }): Promise<${s.name}>;`, + ` coalesce(p: {`, + ` first: ${s.name} | null,`, + ` second: ${s.name} | null,`, + ` third?: ${s.name} | null,`, + ` }): Promise<${s.name} | null>;`, + `}`, + ]; + await fs.promises.writeFile( + `${__dirname}/../../src/features/llm.application/${model}/test_llm_application_${model.replace(".", "_")}_${s.name}.ts`, + content.join("\n"), + "utf8", + ); + } + } + + export async function schemas(): Promise { + const location: string = `${__dirname}/../../schemas/llm.application`; + if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); + await mkdir(location); + for (const model of MODELS) { + await mkdir(`${location}/${model}`); + await iterate(model); + } + } + + function getSchema(content: string): object { + const first: number = content.lastIndexOf(`})({`) + 4; + const last: number = content.lastIndexOf("}"); + return new Function("return {" + content.substring(first, last) + "}")(); + } + + async function iterate(model: string): Promise { + const path: string = `${__dirname}/../../src/features/llm.application/${model}`; + const schemaPath: string = `${__dirname}/../../schemas/llm.application/${model}`; + for (const file of await fs.promises.readdir(path)) { + if (file.substring(file.length - 3) !== ".ts") continue; + + const name: string = file.substring( + `test_llm_application_${model.replace(".", "_")}_`.length, + file.length - 3, + ); + const location: string = + __dirname + + `/../../bin/features/llm.application/${model}/${file.slice(0, -3)}.js`; + const schema: object = getSchema( + await fs.promises.readFile(location, "utf8"), + ); + await fs.promises.writeFile( + `${schemaPath}/${name}.json`, + JSON.stringify(schema, null, 2), + "utf8", + ); + } + } + + async function mkdir(path: string): Promise { + if (fs.existsSync(path)) cp.execSync(`npx rimraf ${path}`); + await fs.promises.mkdir(path, { recursive: true }); + } +} + +const MODELS = ["3.0", "3.1", "chatgpt", "claude", "gemini", "llama"]; diff --git a/test/build/internal/TestLlmParametersGenerator.ts b/test/build/internal/TestLlmParametersGenerator.ts new file mode 100644 index 0000000000..eb1d714088 --- /dev/null +++ b/test/build/internal/TestLlmParametersGenerator.ts @@ -0,0 +1,127 @@ +import cp from "child_process"; +import fs from "fs"; + +import { TestStructure } from "./TestStructure"; + +export namespace TestLlmParametersGenerator { + export async function generate( + structures: TestStructure[], + ): Promise { + const location: string = `${__dirname}/../../src/features/llm.parameters`; + if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); + await fs.promises.mkdir(location); + for (const model of MODELS) { + await fs.promises.mkdir(`${location}/${model}`); + await parameters(model, structures); + } + } + + async function parameters( + model: string, + structures: TestStructure[], + ): Promise { + for (const s of structures) { + if (s.name === "UltimateUnion") + continue; // TOO MUCH LARGE + else if ( + fs.existsSync( + `${__dirname}/../../schemas/json.schemas/v3_1/${s.name}.json`, + ) === false + ) + continue; + + const v31: string = await fs.promises.readFile( + `${__dirname}/../../schemas/json.schemas/v3_1/${s.name}.json`, + "utf8", + ); + if ( + (model === "chatgpt" || model === "gemini") && + (v31.includes(`"additionalProperties": {`) === true || + v31.includes(`"additionalProperties": true`) === true) + ) + continue; + else if (v31.includes(`"prefixItems":`) === true) continue; + else if (model === "gemini") { + // GEMINI DOES NOT SUPPORT UNION TYPE + const json: string = await fs.promises.readFile( + `${__dirname}/../../schemas/json.schemas/v3_0/${s.name}.json`, + "utf8", + ); + if (json.includes(`"oneOf":`) === true) continue; + } + const content: string[] = [ + `import typia from "typia";`, + `import { ${s.name} } from "../../../structures/${s.name}";`, + `import { _test_llm_parameters } from "../../../internal/_test_llm_parameters";`, + "", + `export const test_llm_parameters_${model.replace(".", "_")}_${s.name} = `, + ` _test_llm_parameters({`, + ` model: ${JSON.stringify(model)},`, + ` name: ${JSON.stringify(s.name)},`, + ` })(`, + ` typia.llm.parameters<${s.name}Parameters, ${JSON.stringify(model)}>(),`, + ` );`, + ``, + `interface ${s.name}Parameters {`, + ` regular: ${s.name};`, + ` nullable: ${s.name} | null;`, + ` optional: ${s.name} | undefined;`, + ` faint: ${s.name} | null | undefined;`, + ` array: Array<${s.name}>;`, + `}`, + ]; + await fs.promises.writeFile( + `${__dirname}/../../src/features/llm.parameters/${model}/test_llm_parameters_${model.replace(".", "_")}_${s.name}.ts`, + content.join("\n"), + "utf8", + ); + } + } + + export async function schemas(): Promise { + const location: string = `${__dirname}/../../schemas/llm.parameters`; + if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); + await mkdir(location); + for (const model of MODELS) { + await mkdir(`${location}/${model}`); + await iterate(model); + } + } + + function getSchema(content: string): object { + const first: number = content.lastIndexOf(`})({`) + 4; + const last: number = content.lastIndexOf("}"); + return new Function("return {" + content.substring(first, last) + "}")(); + } + + async function iterate(model: string): Promise { + const path: string = `${__dirname}/../../src/features/llm.parameters/${model}`; + const schemaPath: string = `${__dirname}/../../schemas/llm.parameters/${model}`; + for (const file of await fs.promises.readdir(path)) { + if (file.substring(file.length - 3) !== ".ts") continue; + + const name: string = file.substring( + `test_llm_parameters_${model.replace(".", "_")}_`.length, + file.length - 3, + ); + const location: string = + __dirname + + `/../../bin/features/llm.parameters/${model}/${file.slice(0, -3)}.js`; + const schema: object = getSchema( + await fs.promises.readFile(location, "utf8"), + ); + await fs.promises.writeFile( + `${schemaPath}/${name}.json`, + JSON.stringify(schema, null, 2), + "utf8", + ); + } + } + + async function mkdir(path: string): Promise { + if (fs.existsSync(path)) cp.execSync(`npx rimraf ${path}`); + await fs.promises.mkdir(path, { recursive: true }); + } +} + +const MODELS = ["3.0", "3.1", "chatgpt", "claude", "gemini", "llama"]; diff --git a/test/build/internal/TestLlmSchemaGenerator.ts b/test/build/internal/TestLlmSchemaGenerator.ts index 5343165516..960298440c 100644 --- a/test/build/internal/TestLlmSchemaGenerator.ts +++ b/test/build/internal/TestLlmSchemaGenerator.ts @@ -10,26 +10,58 @@ export namespace TestLlmSchemaGenerator { const location: string = `${__dirname}/../../src/features/llm.schema`; if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); await fs.promises.mkdir(location); - await application(structures); + for (const model of MODELS) { + await fs.promises.mkdir(`${location}/${model}`); + await application(model, structures); + } } - async function application(structures: TestStructure[]): Promise { + async function application( + model: string, + structures: TestStructure[], + ): Promise { for (const s of structures) { - if (s.JSONABLE === false) continue; - else if (s.name === "UltimateUnion") continue; + if (s.name === "UltimateUnion") + continue; // TOO MUCH LARGE + else if ( + fs.existsSync( + `${__dirname}/../../schemas/json.schemas/v3_1/${s.name}.json`, + ) === false + ) + continue; + const v31: string = await fs.promises.readFile( + `${__dirname}/../../schemas/json.schemas/v3_1/${s.name}.json`, + "utf8", + ); + if ( + (model === "chatgpt" || model === "gemini") && + (v31.includes(`"additionalProperties": {`) === true || + v31.includes(`"additionalProperties": true`) === true) + ) + continue; + else if (v31.includes(`"prefixItems":`) === true) continue; + else if (model === "gemini") { + // GEMINI DOES NOT SUPPORT UNION TYPE + const json: string = await fs.promises.readFile( + `${__dirname}/../../schemas/json.schemas/v3_0/${s.name}.json`, + "utf8", + ); + if (json.includes(`"oneOf":`) === true) continue; + } const content: string[] = [ `import typia from "typia";`, - `import { ${s.name} } from "../../structures/${s.name}";`, - `import { _test_llm_schema } from "../../internal/_test_llm_schema";`, + `import { ${s.name} } from "../../../structures/${s.name}";`, + `import { _test_llm_schema } from "../../../internal/_test_llm_schema";`, "", - `export const test_llm_schema_${s.name} = `, - ` _test_llm_schema(`, - ` ${JSON.stringify(s.name)},`, - ` )(typia.llm.schema<${s.name}>());`, + `export const test_llm_schema_${model.replace(".", "_")}_${s.name} = `, + ` _test_llm_schema({`, + ` model: ${JSON.stringify(model)},`, + ` name: ${JSON.stringify(s.name)},`, + ` })(typia.llm.schema<${s.name}, ${JSON.stringify(model)}>(${REFERENCABLE.includes(model) ? "{}" : ""}));`, ]; await fs.promises.writeFile( - `${__dirname}/../../src/features/llm.schema/test_llm_schema_${s.name}.ts`, + `${__dirname}/../../src/features/llm.schema/${model}/test_llm_schema_${model.replace(".", "_")}_${s.name}.ts`, content.join("\n"), "utf8", ); @@ -37,31 +69,34 @@ export namespace TestLlmSchemaGenerator { } export async function schemas(): Promise { - const location: string = `${__dirname}/../../schemas/llm/type`; + const location: string = `${__dirname}/../../schemas/llm.schema`; if (fs.existsSync(location)) cp.execSync("npx rimraf " + location); await mkdir(location); - await iterate(); + for (const model of MODELS) { + await mkdir(`${location}/${model}`); + await iterate(model); + } } function getSchema(content: string): object { - const first: number = content.lastIndexOf(`")({`) + 4; + const first: number = content.lastIndexOf(`})({`) + 4; const last: number = content.lastIndexOf("}"); return new Function("return {" + content.substring(first, last) + "}")(); } - async function iterate() { - const path: string = `${__dirname}/../../src/features/llm.schema`; - const schemaPath: string = `${__dirname}/../../schemas/llm/type`; + async function iterate(model: string): Promise { + const path: string = `${__dirname}/../../src/features/llm.schema/${model}`; + const schemaPath: string = `${__dirname}/../../schemas/llm.schema/${model}`; for (const file of await fs.promises.readdir(path)) { if (file.substring(file.length - 3) !== ".ts") continue; const name: string = file.substring( - `test_llm_schema_`.length, + `test_llm_schema_${model.replace(".", "_")}_`.length, file.length - 3, ); - console.log(name); const location: string = - __dirname + `/../../bin/features/llm.schema/${file.slice(0, -3)}.js`; + __dirname + + `/../../bin/features/llm.schema/${model}/${file.slice(0, -3)}.js`; const schema: object = getSchema( await fs.promises.readFile(location, "utf8"), ); @@ -78,3 +113,6 @@ export namespace TestLlmSchemaGenerator { await fs.promises.mkdir(path, { recursive: true }); } } + +const MODELS = ["3.0", "3.1", "chatgpt", "claude", "llama", "gemini"]; +const REFERENCABLE = ["3.1", "chatgpt", "claude", "llama"]; diff --git a/test/build/internal/TestProtobufMessageGenerator.ts b/test/build/internal/TestProtobufMessageGenerator.ts index af558b40c6..ddf9b26c1a 100644 --- a/test/build/internal/TestProtobufMessageGenerator.ts +++ b/test/build/internal/TestProtobufMessageGenerator.ts @@ -61,9 +61,10 @@ export namespace TestProtobufMessageGenerator { )}.js`, "utf8", ); - const first: number = content.indexOf(`"syntax = `); - const last: number = content.lastIndexOf(`}"`); - return JSON.parse(content.substring(first, last + 2)); + const first: number = content.indexOf(`[`); + const last: number = content.lastIndexOf(`].join`) + 1; + const script: string = `return ${content.substring(first, last)}.join("\\n")`; + return new Function(script)(); } async function mkdir(path: string): Promise { diff --git a/test/build/template.ts b/test/build/template.ts index 182a04e177..1f9ea2e5ad 100644 --- a/test/build/template.ts +++ b/test/build/template.ts @@ -2,7 +2,10 @@ import cp from "child_process"; import fs from "fs"; import { TestFeature } from "./internal/TestFeature"; -import { TestJsonSchemaGenerator } from "./internal/TestJsonSchemaGenerator"; +// import { TestJsonApplicationGenerator } from "./internal/TestJsonApplicationGenerator"; +import { TestJsonSchemasGenerator } from "./internal/TestJsonSchemasGenerator"; +import { TestLlmApplicationGenerator } from "./internal/TestLlmApplicationGenerator"; +import { TestLlmParametersGenerator } from "./internal/TestLlmParametersGenerator"; import { TestLlmSchemaGenerator } from "./internal/TestLlmSchemaGenerator"; import { TestProtobufMessageGenerator } from "./internal/TestProtobufMessageGenerator"; import { TestReflectMetadataGenerator } from "./internal/TestReflectMetadataGenerator"; @@ -138,11 +141,9 @@ function script( async function main(): Promise { process.chdir(__dirname + "/.."); - cp.execSync("npx rimraf src/generated"); - - const structures: TestStructure[] = await load(); // NORMAL FEATURES + const structures: TestStructure[] = await load(); const featureList: TestFeature[] = [ ...TestFeature.DATA, ...TestFeature.DATA.filter((f) => @@ -162,18 +163,27 @@ async function main(): Promise { if (fs.existsSync(schemas)) cp.execSync(`npx rimraf ${schemas}`); await fs.promises.mkdir(schemas, { recursive: true }); - await TestJsonSchemaGenerator.generate(structures); + // await TestJsonApplicationGenerator.generate(structures); + await TestJsonSchemasGenerator.generate(structures); await TestProtobufMessageGenerator.generate(structures); await TestReflectMetadataGenerator.generate(structures); - await TestLlmSchemaGenerator.generate(structures); // FILL SCHEMA CONTENTS - await new Promise((resolve) => setTimeout(resolve, 1000)); cp.execSync("npm run build", { stdio: "inherit" }); - await TestJsonSchemaGenerator.schemas(); + // await TestJsonApplicationGenerator.schemas(); + await TestJsonSchemasGenerator.schemas(); await TestProtobufMessageGenerator.schemas(); await TestReflectMetadataGenerator.schemas(); + + // LLM SCHEMAS AGAIN + await TestLlmApplicationGenerator.generate(structures); + await TestLlmParametersGenerator.generate(structures); + await TestLlmSchemaGenerator.generate(structures); + + cp.execSync("npm run build", { stdio: "inherit" }); + await TestLlmApplicationGenerator.schemas(); + await TestLlmParametersGenerator.schemas(); await TestLlmSchemaGenerator.schemas(); cp.execSync("npm run prettier", { stdio: "inherit" }); diff --git a/test/debug.js b/test/debug.js new file mode 100644 index 0000000000..d2144e6584 --- /dev/null +++ b/test/debug.js @@ -0,0 +1,6 @@ +const cp = require("child_process"); + +cp.execSync(`npx ts-node src/debug/${process.argv[2]}.ts`, { + cwd: __dirname, + stdio: "inherit", +}); diff --git a/test/generate/input/generate_http.ts b/test/generate/input/generate_http.ts new file mode 100644 index 0000000000..dee5bbbe02 --- /dev/null +++ b/test/generate/input/generate_http.ts @@ -0,0 +1,12 @@ +import typia, { tags } from "typia"; + +interface ISomething { + id: string & tags.Format<"uuid">; + beta: number[]; + gamma: bigint; +} + +export const query = typia.http.createQuery(); +export const isQuery = typia.http.createIsQuery(); +export const assertQuery = typia.http.createAssertQuery(); +export const validateQuery = typia.http.createValidateQuery(); diff --git a/test/generate/input/generate_json.ts b/test/generate/input/generate_json.ts new file mode 100644 index 0000000000..990fc72599 --- /dev/null +++ b/test/generate/input/generate_json.ts @@ -0,0 +1,26 @@ +import typia, { tags } from "typia"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} + +export const collection = typia.json.schemas<[ICitizen]>(); + +export const createStringify = typia.json.createStringify(); +export const createIsStringify = typia.json.createIsStringify(); +export const createAssertStringify = + typia.json.createAssertStringify(); +export const createValidateStringify = + typia.json.createValidateStringify(); + +export const createIsParse = typia.json.createIsParse(); +export const createAssertParse = typia.json.createAssertParse(); +export const createValidateParse = typia.json.createValidateParse(); diff --git a/test/generate/input/generate_llm.ts b/test/generate/input/generate_llm.ts new file mode 100644 index 0000000000..6490851f8f --- /dev/null +++ b/test/generate/input/generate_llm.ts @@ -0,0 +1,58 @@ +import { LlmTypeCheckerV3_1 } from "@samchon/openapi"; +import typia, { tags } from "typia"; + +export const schema = typia.llm.schema({}); + +export const parameters = typia.llm.parameters< + { + company: ICompany; + department: IDepartment; + employee: IEmployee; + }, + "claude" +>(); + +export const application = typia.llm.application< + { + establishCompany(props: { company: ICompany }): ICompany; + createDepartment(props: { + company: ICompany; + department: IDepartment; + }): IDepartment; + hire(props: { + company: ICompany; + department: IDepartment; + employee: IEmployee; + }): Promise; + erase(props: { + entity: ICompany | IDepartment | IEmployee; + }): Promise>; + }, + "llama" +>({ + separate: (schema) => + LlmTypeCheckerV3_1.isString(schema) && schema.format === "date-time", +}); + +export interface ICompany { + id: string & tags.Format<"uuid">; + serial: number; + name: string; + established_at: string & tags.Format<"date-time">; + departments: IDepartment[]; +} +export interface IDepartment { + id: string & tags.Format<"uuid">; + code: string; + sales: number; + created_at: string & tags.Format<"date-time">; + children: IDepartment[]; + employees: IEmployee[]; +} +export interface IEmployee { + id: string & tags.Format<"uuid">; + name: string; + age: number; + grade: number; + employeed_at: string & tags.Format<"date-time">; +} diff --git a/test/generate/input/generate_misc.ts b/test/generate/input/generate_misc.ts new file mode 100644 index 0000000000..cbe5b590d2 --- /dev/null +++ b/test/generate/input/generate_misc.ts @@ -0,0 +1,25 @@ +import typia, { tags } from "typia"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} + +export const createClone = typia.misc.createClone(); +export const createAssertClone = typia.misc.createAssertClone(); +export const createIsClone = typia.misc.createIsClone(); +export const createValidateClone = typia.misc.createValidateClone(); + +export const createPrune = typia.misc.createPrune(); +export const createAssertPrune = typia.misc.createAssertPrune(); +export const createIsPrune = typia.misc.createIsPrune(); +export const createValidatePrune = typia.misc.createValidatePrune(); + +export const literals = typia.misc.literals(); diff --git a/test/generate/input/generate_notations.ts b/test/generate/input/generate_notations.ts new file mode 100644 index 0000000000..d59a39eaf0 --- /dev/null +++ b/test/generate/input/generate_notations.ts @@ -0,0 +1,32 @@ +import typia, { tags } from "typia"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} + +export const createCamel = typia.notations.createCamel(); +export const createAssertCamel = typia.notations.createAssertCamel(); +export const createIsCamel = typia.notations.createIsCamel(); +export const createValidateCamel = + typia.notations.createValidateCamel(); + +export const createPascal = typia.notations.createPascal(); +export const createAssertPascal = + typia.notations.createAssertPascal(); +export const createIsPascal = typia.notations.createIsPascal(); +export const createValidatePascal = + typia.notations.createValidatePascal(); + +export const createSnake = typia.notations.createSnake(); +export const createAssertSnake = typia.notations.createAssertSnake(); +export const createIsSnake = typia.notations.createIsSnake(); +export const createValidateSnake = + typia.notations.createValidateSnake(); diff --git a/test/generate/input/generate_plain.ts b/test/generate/input/generate_plain.ts new file mode 100644 index 0000000000..2abd30c8b9 --- /dev/null +++ b/test/generate/input/generate_plain.ts @@ -0,0 +1,27 @@ +import typia, { tags } from "typia"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} + +export const createIs = typia.createIs(); +export const createEquals = typia.createEquals(); + +export const createAssert = typia.createAssert(); +export const createAssertEquals = typia.createAssertEquals(); +export const createAssertGuard = typia.createAssertGuard(); +export const createAssertGuardEquals = + typia.createAssertGuardEquals(); + +export const createValidate = typia.createValidate(); +export const createValidateEquals = typia.createValidateEquals(); + +export const createRandom = typia.createRandom(); diff --git a/test/generate/input/generate_protobuf.ts b/test/generate/input/generate_protobuf.ts new file mode 100644 index 0000000000..b34281abb5 --- /dev/null +++ b/test/generate/input/generate_protobuf.ts @@ -0,0 +1,20 @@ +import typia, { tags } from "typia"; + +interface IFile { + name: string & tags.MaxLength<8>; + extension: null | (string & tags.MinLength<1> & tags.MaxLength<3>); + size: number & tags.Type<"uint32">; + data: Uint8Array; +} + +export const createEncode = typia.protobuf.createEncode(); +export const createAssertEncode = typia.protobuf.createAssertEncode(); +export const createIsEncode = typia.protobuf.createIsEncode(); +export const createValidateEncode = + typia.protobuf.createValidateEncode(); + +export const createDecode = typia.protobuf.createDecode(); +export const createAssertDecode = typia.protobuf.createAssertDecode(); +export const createIsDecode = typia.protobuf.createIsDecode(); +export const createValidateDecode = + typia.protobuf.createValidateDecode(); diff --git a/test/generate/output/generate_http.ts b/test/generate/output/generate_http.ts new file mode 100644 index 0000000000..021fb4d84b --- /dev/null +++ b/test/generate/output/generate_http.ts @@ -0,0 +1,343 @@ +import typia, { tags } from "typia"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__httpQueryParseURLSearchParams from "typia/lib/internal/_httpQueryParseURLSearchParams.js"; +import * as __typia_transform__httpQueryReadBigint from "typia/lib/internal/_httpQueryReadBigint.js"; +import * as __typia_transform__httpQueryReadNumber from "typia/lib/internal/_httpQueryReadNumber.js"; +import * as __typia_transform__httpQueryReadString from "typia/lib/internal/_httpQueryReadString.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; + +interface ISomething { + id: string & tags.Format<"uuid">; + beta: number[]; + gamma: bigint; +} +export const query = (() => { + return ( + input: string | import("typia").IReadableURLSearchParams, + ): import("typia").Resolved => { + input = + __typia_transform__httpQueryParseURLSearchParams._httpQueryParseURLSearchParams( + input, + ) as import("typia").IReadableURLSearchParams; + const output = { + id: __typia_transform__httpQueryReadString._httpQueryReadString( + input.get("id"), + ), + beta: input + .getAll("beta") + .map((elem: any) => + __typia_transform__httpQueryReadNumber._httpQueryReadNumber(elem), + ), + gamma: __typia_transform__httpQueryReadBigint._httpQueryReadBigint( + input.get("gamma"), + ), + }; + return output as any; + }; +})(); +export const isQuery = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + Array.isArray(input.beta) && + input.beta.every( + (elem: any) => "number" === typeof elem && Number.isFinite(elem), + ) && + "bigint" === typeof input.gamma; + const __is = (input: any): input is ISomething => + "object" === typeof input && null !== input && _io0(input); + const __decode = ( + input: string | import("typia").IReadableURLSearchParams, + ): import("typia").Resolved => { + input = + __typia_transform__httpQueryParseURLSearchParams._httpQueryParseURLSearchParams( + input, + ) as import("typia").IReadableURLSearchParams; + const output = { + id: __typia_transform__httpQueryReadString._httpQueryReadString( + input.get("id"), + ), + beta: input + .getAll("beta") + .map((elem: any) => + __typia_transform__httpQueryReadNumber._httpQueryReadNumber(elem), + ), + gamma: __typia_transform__httpQueryReadBigint._httpQueryReadBigint( + input.get("gamma"), + ), + }; + return output as any; + }; + return ( + input: string | import("typia").IReadableURLSearchParams, + ): import("typia").Resolved | null => { + const value = __decode(input); + if (!__is(value)) return null; + return value; + }; +})(); +export const assertQuery = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + Array.isArray(input.beta) && + input.beta.every( + (elem: any) => "number" === typeof elem && Number.isFinite(elem), + ) && + "bigint" === typeof input.gamma; + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.http.createAssertQuery", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.http.createAssertQuery", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (((Array.isArray(input.beta) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.http.createAssertQuery", + path: _path + ".beta", + expected: "Array", + value: input.beta, + }, + _errorFactory, + )) && + input.beta.every( + (elem: any, _index2: number) => + ("number" === typeof elem && Number.isFinite(elem)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.http.createAssertQuery", + path: _path + ".beta[" + _index2 + "]", + expected: "number", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.http.createAssertQuery", + path: _path + ".beta", + expected: "Array", + value: input.beta, + }, + _errorFactory, + )) && + ("bigint" === typeof input.gamma || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.http.createAssertQuery", + path: _path + ".gamma", + expected: "bigint", + value: input.gamma, + }, + _errorFactory, + )); + const __is = (input: any): input is ISomething => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ISomething => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.http.createAssertQuery", + path: _path + "", + expected: "ISomething", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.http.createAssertQuery", + path: _path + "", + expected: "ISomething", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __decode = ( + input: string | import("typia").IReadableURLSearchParams, + ): import("typia").Resolved => { + input = + __typia_transform__httpQueryParseURLSearchParams._httpQueryParseURLSearchParams( + input, + ) as import("typia").IReadableURLSearchParams; + const output = { + id: __typia_transform__httpQueryReadString._httpQueryReadString( + input.get("id"), + ), + beta: input + .getAll("beta") + .map((elem: any) => + __typia_transform__httpQueryReadNumber._httpQueryReadNumber(elem), + ), + gamma: __typia_transform__httpQueryReadBigint._httpQueryReadBigint( + input.get("gamma"), + ), + }; + return output as any; + }; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").Resolved => + __assert(__decode(input), errorFactory); +})(); +export const validateQuery = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + Array.isArray(input.beta) && + input.beta.every( + (elem: any) => "number" === typeof elem && Number.isFinite(elem), + ) && + "bigint" === typeof input.gamma; + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ((Array.isArray(input.beta) || + $report(_exceptionable, { + path: _path + ".beta", + expected: "Array", + value: input.beta, + })) && + input.beta + .map( + (elem: any, _index2: number) => + ("number" === typeof elem && Number.isFinite(elem)) || + $report(_exceptionable, { + path: _path + ".beta[" + _index2 + "]", + expected: "number", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".beta", + expected: "Array", + value: input.beta, + }), + "bigint" === typeof input.gamma || + $report(_exceptionable, { + path: _path + ".gamma", + expected: "bigint", + value: input.gamma, + }), + ].every((flag: boolean) => flag); + const __is = (input: any): input is ISomething => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ISomething", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ISomething", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __decode = ( + input: string | import("typia").IReadableURLSearchParams, + ): import("typia").Resolved => { + input = + __typia_transform__httpQueryParseURLSearchParams._httpQueryParseURLSearchParams( + input, + ) as import("typia").IReadableURLSearchParams; + const output = { + id: __typia_transform__httpQueryReadString._httpQueryReadString( + input.get("id"), + ), + beta: input + .getAll("beta") + .map((elem: any) => + __typia_transform__httpQueryReadNumber._httpQueryReadNumber(elem), + ), + gamma: __typia_transform__httpQueryReadBigint._httpQueryReadBigint( + input.get("gamma"), + ), + }; + return output as any; + }; + return ( + input: string | import("typia").IReadableURLSearchParams, + ): import("typia").IValidation> => + __validate(__decode(input)); +})(); diff --git a/test/generate/output/generate_json.ts b/test/generate/output/generate_json.ts new file mode 100644 index 0000000000..75b09ea64d --- /dev/null +++ b/test/generate/output/generate_json.ts @@ -0,0 +1,1117 @@ +import typia, { tags } from "typia"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__jsonStringifyNumber from "typia/lib/internal/_jsonStringifyNumber.js"; +import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} +export const collection = { + version: "3.1", + components: { + schemas: { + ICitizen: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + pattern: "^[A-Z][a-z]+$", + }, + email: { + type: "string", + format: "email", + }, + age: { + type: "integer", + exclusiveMaximum: true, + maximum: 100, + }, + motto: { + type: "string", + }, + birthdate: { + type: "string", + format: "date-time", + }, + died_at: { + oneOf: [ + { + type: "null", + }, + { + type: "string", + format: "date-time", + }, + ], + }, + parent: { + oneOf: [ + { + type: "null", + }, + { + $ref: "#/components/schemas/ICitizen", + }, + ], + }, + children: { + type: "array", + items: { + $ref: "#/components/schemas/ICitizen", + }, + }, + }, + required: [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ], + }, + }, + }, + schemas: [ + { + $ref: "#/components/schemas/ICitizen", + }, + ], +} as import("typia").IJsonSchemaCollection<"3.1">; +export const createStringify = (() => { + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + return (input: ICitizen): string => _so0(input); +})(); +export const createIsStringify = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + const __stringify = (input: ICitizen): string => _so0(input); + return (input: any): string | null => + __is(input) ? __stringify(input) : null; +})(); +export const createAssertStringify = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertStringify", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.json.createAssertStringify", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.json.createAssertStringify", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __stringify = (input: ICitizen): string => _so0(input); + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): string => { + __assert(input, errorFactory); + return __stringify(input); + }; +})(); +export const createValidateStringify = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __stringify = (input: ICitizen): string => _so0(input); + return (input: any): import("typia").IValidation => { + const result = __validate(input) as any; + if (result.success) result.data = __stringify(input); + return result; + }; +})(); +export const createIsParse = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + return (input: string): import("typia").Primitive | null => { + input = JSON.parse(input); + return __is(input) ? (input as any) : null; + }; +})(); +export const createAssertParse = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.json.createAssertParse", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.json.createAssertParse", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.json.createAssertParse", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + return ( + input: string, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").Primitive => + __assert(JSON.parse(input), errorFactory) as any; +})(); +export const createValidateParse = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + return ( + input: string, + ): import("typia").IValidation> => + __validate(JSON.parse(input)) as any; +})(); diff --git a/test/generate/output/generate_llm.ts b/test/generate/output/generate_llm.ts new file mode 100644 index 0000000000..e402c01a03 --- /dev/null +++ b/test/generate/output/generate_llm.ts @@ -0,0 +1,773 @@ +import { LlmTypeCheckerV3_1 } from "@samchon/openapi"; +import typia, { tags } from "typia"; +import * as __typia_transform__llmApplicationFinalize from "typia/lib/internal/_llmApplicationFinalize.js"; + +export const schema = (( + $defs: Record>, +) => { + Object.assign($defs, { + IDepartment: { + type: "object", + properties: { + id: { + description: "@format uuid", + type: "string", + }, + code: { + type: "string", + }, + sales: { + type: "number", + }, + created_at: { + description: "@format date-time", + type: "string", + }, + children: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + employees: { + type: "array", + items: { + type: "object", + properties: { + id: { + description: "@format uuid", + type: "string", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + description: "@format date-time", + type: "string", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + additionalProperties: false, + }, + }, + }, + required: ["id", "code", "sales", "created_at", "children", "employees"], + additionalProperties: false, + }, + } as Record>); + return { + type: "object", + properties: { + id: { + description: "@format uuid", + type: "string", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + description: "@format date-time", + type: "string", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: ["id", "serial", "name", "established_at", "departments"], + additionalProperties: false, + } as import("@samchon/openapi").ILlmSchema<"chatgpt">; +})({}); +export const parameters = { + type: "object", + properties: { + company: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + type: "string", + format: "date-time", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: ["id", "serial", "name", "established_at", "departments"], + }, + department: { + $ref: "#/$defs/IDepartment", + }, + employee: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + required: ["company", "department", "employee"], + additionalProperties: false, + $defs: { + IDepartment: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + code: { + type: "string", + }, + sales: { + type: "number", + }, + created_at: { + type: "string", + format: "date-time", + }, + children: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + employees: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + }, + required: ["id", "code", "sales", "created_at", "children", "employees"], + }, + }, +} as import("@samchon/openapi").ILlmSchema.IParameters<"claude">; +export const application = (() => { + const app = { + model: "llama", + options: { + reference: false, + separate: null, + }, + functions: [ + { + name: "establishCompany", + parameters: { + type: "object", + properties: { + company: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + type: "string", + format: "date-time", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: [ + "id", + "serial", + "name", + "established_at", + "departments", + ], + }, + }, + required: ["company"], + additionalProperties: false, + $defs: { + IDepartment: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + code: { + type: "string", + }, + sales: { + type: "number", + }, + created_at: { + type: "string", + format: "date-time", + }, + children: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + employees: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + }, + required: [ + "id", + "code", + "sales", + "created_at", + "children", + "employees", + ], + }, + }, + }, + output: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + type: "string", + format: "date-time", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: ["id", "serial", "name", "established_at", "departments"], + }, + strict: true, + }, + { + name: "createDepartment", + parameters: { + type: "object", + properties: { + company: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + type: "string", + format: "date-time", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: [ + "id", + "serial", + "name", + "established_at", + "departments", + ], + }, + department: { + $ref: "#/$defs/IDepartment", + }, + }, + required: ["company", "department"], + additionalProperties: false, + $defs: { + IDepartment: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + code: { + type: "string", + }, + sales: { + type: "number", + }, + created_at: { + type: "string", + format: "date-time", + }, + children: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + employees: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + }, + required: [ + "id", + "code", + "sales", + "created_at", + "children", + "employees", + ], + }, + }, + }, + output: { + $ref: "#/$defs/IDepartment", + }, + strict: true, + }, + { + name: "hire", + parameters: { + type: "object", + properties: { + company: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + type: "string", + format: "date-time", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: [ + "id", + "serial", + "name", + "established_at", + "departments", + ], + }, + department: { + $ref: "#/$defs/IDepartment", + }, + employee: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + required: ["company", "department", "employee"], + additionalProperties: false, + $defs: { + IDepartment: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + code: { + type: "string", + }, + sales: { + type: "number", + }, + created_at: { + type: "string", + format: "date-time", + }, + children: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + employees: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + }, + required: [ + "id", + "code", + "sales", + "created_at", + "children", + "employees", + ], + }, + }, + }, + output: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + strict: true, + }, + { + name: "erase", + parameters: { + type: "object", + properties: { + entity: { + oneOf: [ + { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + serial: { + type: "number", + }, + name: { + type: "string", + }, + established_at: { + type: "string", + format: "date-time", + }, + departments: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + }, + required: [ + "id", + "serial", + "name", + "established_at", + "departments", + ], + }, + { + $ref: "#/$defs/IDepartment", + }, + { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + ], + }, + }, + required: ["entity"], + additionalProperties: false, + $defs: { + IDepartment: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + code: { + type: "string", + }, + sales: { + type: "number", + }, + created_at: { + type: "string", + format: "date-time", + }, + children: { + type: "array", + items: { + $ref: "#/$defs/IDepartment", + }, + }, + employees: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + format: "uuid", + }, + name: { + type: "string", + }, + age: { + type: "number", + }, + grade: { + type: "number", + }, + employeed_at: { + type: "string", + format: "date-time", + }, + }, + required: ["id", "name", "age", "grade", "employeed_at"], + }, + }, + }, + required: [ + "id", + "code", + "sales", + "created_at", + "children", + "employees", + ], + }, + }, + }, + output: { + type: "string", + format: "uuid", + }, + strict: true, + }, + ], + } as import("@samchon/openapi").ILlmApplication<"llama">; + __typia_transform__llmApplicationFinalize._llmApplicationFinalize(app, { + separate: (schema) => + LlmTypeCheckerV3_1.isString(schema) && schema.format === "date-time", + }); + return app; +})(); +export interface ICompany { + id: string & tags.Format<"uuid">; + serial: number; + name: string; + established_at: string & tags.Format<"date-time">; + departments: IDepartment[]; +} +export interface IDepartment { + id: string & tags.Format<"uuid">; + code: string; + sales: number; + created_at: string & tags.Format<"date-time">; + children: IDepartment[]; + employees: IEmployee[]; +} +export interface IEmployee { + id: string & tags.Format<"uuid">; + name: string; + age: number; + grade: number; + employeed_at: string & tags.Format<"date-time">; +} diff --git a/test/generate/output/generate_misc.ts b/test/generate/output/generate_misc.ts new file mode 100644 index 0000000000..532e91f5c3 --- /dev/null +++ b/test/generate/output/generate_misc.ts @@ -0,0 +1,1219 @@ +import typia, { tags } from "typia"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} +export const createClone = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + return (input: ICitizen): import("typia").Resolved => + _co0(input) as any; +})(); +export const createAssertClone = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertClone", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.misc.createAssertClone", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.misc.createAssertClone", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __clone = (input: ICitizen): import("typia").Resolved => + _co0(input) as any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").Resolved => + __clone(__assert(input, errorFactory)); +})(); +export const createIsClone = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + const __clone = (input: ICitizen): import("typia").Resolved => + _co0(input) as any; + return (input: any): import("typia").Resolved | null => { + if (!__is(input)) return null; + return __clone(input); + }; +})(); +export const createValidateClone = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __clone = (input: ICitizen): import("typia").Resolved => + _co0(input) as any; + return ( + input: any, + ): import("typia").IValidation> => { + const result = __validate(input) as any; + if (result.success) result.data = __clone(input); + return result; + }; +})(); +export const createPrune = (() => { + const _pp0 = (input: any) => + input.forEach((elem: any) => { + if ("object" === typeof elem && null !== elem) _po0(elem); + }); + const _po0 = (input: any): any => { + if ("object" === typeof input.parent && null !== input.parent) + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); + for (const key of Object.keys(input)) { + if ( + "id" === key || + "name" === key || + "email" === key || + "age" === key || + "motto" === key || + "birthdate" === key || + "died_at" === key || + "parent" === key || + "children" === key + ) + continue; + delete input[key]; + } + }; + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + return (input: ICitizen): void => { + if ("object" === typeof input && null !== input) _po0(input); + }; +})(); +export const createAssertPrune = (() => { + const _pp0 = (input: any) => + input.forEach((elem: any) => { + if ("object" === typeof elem && null !== elem) _po0(elem); + }); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.misc.createAssertPrune", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const _po0 = (input: any): any => { + if ("object" === typeof input.parent && null !== input.parent) + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); + for (const key of Object.keys(input)) { + if ( + "id" === key || + "name" === key || + "email" === key || + "age" === key || + "motto" === key || + "birthdate" === key || + "died_at" === key || + "parent" === key || + "children" === key + ) + continue; + delete input[key]; + } + }; + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.misc.createAssertPrune", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.misc.createAssertPrune", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __prune = (input: ICitizen): void => { + if ("object" === typeof input && null !== input) _po0(input); + }; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + input = __assert(input, errorFactory); + __prune(input); + return input; + }; +})(); +export const createIsPrune = (() => { + const _pp0 = (input: any) => + input.forEach((elem: any) => { + if ("object" === typeof elem && null !== elem) _po0(elem); + }); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _po0 = (input: any): any => { + if ("object" === typeof input.parent && null !== input.parent) + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); + for (const key of Object.keys(input)) { + if ( + "id" === key || + "name" === key || + "email" === key || + "age" === key || + "motto" === key || + "birthdate" === key || + "died_at" === key || + "parent" === key || + "children" === key + ) + continue; + delete input[key]; + } + }; + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + const __prune = (input: ICitizen): void => { + if ("object" === typeof input && null !== input) _po0(input); + }; + return (input: any): input is ICitizen => { + if (false == __is(input)) return false; + __prune(input); + return true; + }; +})(); +export const createValidatePrune = (() => { + const _pp0 = (input: any) => + input.forEach((elem: any) => { + if ("object" === typeof elem && null !== elem) _po0(elem); + }); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const _po0 = (input: any): any => { + if ("object" === typeof input.parent && null !== input.parent) + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); + for (const key of Object.keys(input)) { + if ( + "id" === key || + "name" === key || + "email" === key || + "age" === key || + "motto" === key || + "birthdate" === key || + "died_at" === key || + "parent" === key || + "children" === key + ) + continue; + delete input[key]; + } + }; + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __prune = (input: ICitizen): void => { + if ("object" === typeof input && null !== input) _po0(input); + }; + return (input: any): import("typia").IValidation => { + const result = __validate(input); + if (result.success) __prune(input); + return result; + }; +})(); +export const literals = [false, 1, "two"] as const; diff --git a/test/generate/output/generate_notations.ts b/test/generate/output/generate_notations.ts new file mode 100644 index 0000000000..8bfc7fe36e --- /dev/null +++ b/test/generate/output/generate_notations.ts @@ -0,0 +1,1674 @@ +import typia, { tags } from "typia"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} +export const createCamel = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + return (input: ICitizen): import("typia").CamelCase => + _co0(input) as any; +})(); +export const createAssertCamel = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertCamel", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.notations.createAssertCamel", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.notations.createAssertCamel", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __notation = (input: ICitizen): import("typia").CamelCase => + _co0(input) as any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").CamelCase => + __notation(__assert(input, errorFactory)); +})(); +export const createIsCamel = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + const __notation = (input: ICitizen): import("typia").CamelCase => + _co0(input) as any; + return (input: any): import("typia").CamelCase | null => { + if (!__is(input)) return null; + return __notation(input); + }; +})(); +export const createValidateCamel = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __notation = (input: ICitizen): import("typia").CamelCase => + _co0(input) as any; + return ( + input: any, + ): import("typia").IValidation> => { + const result = __validate(input) as any; + if (result.success) result.data = __notation(input); + return result as any; + }; +})(); +export const createPascal = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ + Id: input.id, + Name: input.name, + Email: input.email, + Age: input.age, + Motto: input.motto, + Birthdate: new Date(input.birthdate) as any, + DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, + }); + return (input: ICitizen): import("typia").PascalCase => + _co0(input) as any; +})(); +export const createAssertPascal = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertPascal", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const _co0 = (input: any): any => ({ + Id: input.id, + Name: input.name, + Email: input.email, + Age: input.age, + Motto: input.motto, + Birthdate: new Date(input.birthdate) as any, + DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.notations.createAssertPascal", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.notations.createAssertPascal", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __notation = (input: ICitizen): import("typia").PascalCase => + _co0(input) as any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").PascalCase => + __notation(__assert(input, errorFactory)); +})(); +export const createIsPascal = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _co0 = (input: any): any => ({ + Id: input.id, + Name: input.name, + Email: input.email, + Age: input.age, + Motto: input.motto, + Birthdate: new Date(input.birthdate) as any, + DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + const __notation = (input: ICitizen): import("typia").PascalCase => + _co0(input) as any; + return (input: any): import("typia").PascalCase | null => { + if (!__is(input)) return null; + return __notation(input); + }; +})(); +export const createValidatePascal = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const _co0 = (input: any): any => ({ + Id: input.id, + Name: input.name, + Email: input.email, + Age: input.age, + Motto: input.motto, + Birthdate: new Date(input.birthdate) as any, + DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __notation = (input: ICitizen): import("typia").PascalCase => + _co0(input) as any; + return ( + input: any, + ): import("typia").IValidation> => { + const result = __validate(input) as any; + if (result.success) result.data = __notation(input); + return result as any; + }; +})(); +export const createSnake = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + return (input: ICitizen): import("typia").SnakeCase => + _co0(input) as any; +})(); +export const createAssertSnake = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.notations.createAssertSnake", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.notations.createAssertSnake", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.notations.createAssertSnake", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __notation = (input: ICitizen): import("typia").SnakeCase => + _co0(input) as any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").SnakeCase => + __notation(__assert(input, errorFactory)); +})(); +export const createIsSnake = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + const __notation = (input: ICitizen): import("typia").SnakeCase => + _co0(input) as any; + return (input: any): import("typia").SnakeCase | null => { + if (!__is(input)) return null; + return __notation(input); + }; +})(); +export const createValidateSnake = (() => { + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const _co0 = (input: any): any => ({ + id: input.id, + name: input.name, + email: input.email, + age: input.age, + motto: input.motto, + birthdate: new Date(input.birthdate) as any, + died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, + }); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __notation = (input: ICitizen): import("typia").SnakeCase => + _co0(input) as any; + return ( + input: any, + ): import("typia").IValidation> => { + const result = __validate(input) as any; + if (result.success) result.data = __notation(input); + return result as any; + }; +})(); diff --git a/test/generate/output/generate_plain.ts b/test/generate/output/generate_plain.ts new file mode 100644 index 0000000000..49f3a03a23 --- /dev/null +++ b/test/generate/output/generate_plain.ts @@ -0,0 +1,1779 @@ +import typia, { tags } from "typia"; +import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomFormatDatetime from "typia/lib/internal/_randomFormatDatetime.js"; +import * as __typia_transform__randomFormatEmail from "typia/lib/internal/_randomFormatEmail.js"; +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomPattern from "typia/lib/internal/_randomPattern.js"; +import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; + +interface ICitizen { + id: string & tags.Format<"uuid">; + name: string & tags.Pattern<"^[A-Z][a-z]+$">; + email: string & tags.Format<"email">; + age: number & tags.Type<"uint32"> & tags.ExclusiveMaximum<100>; + motto: string; + birthdate: Date; + died_at: null | Date; + parent: ICitizen | null; + children: ICitizen[]; +} +export const createIs = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + return (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); +})(); +export const createEquals = (() => { + const _io0 = (input: any, _exceptionable: boolean = true): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent, true && _exceptionable))) && + Array.isArray(input.children) && + input.children.every( + (elem: any, _index1: number) => + "object" === typeof elem && + null !== elem && + _io0(elem, true && _exceptionable), + ) && + (9 === Object.keys(input).length || + Object.keys(input).every((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return false; + })); + return (input: any, _exceptionable: boolean = true): input is ICitizen => + "object" === typeof input && null !== input && _io0(input, true); +})(); +export const createAssert = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssert", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssert", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssert", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; +})(); +export const createAssertEquals = (() => { + const _io0 = (input: any, _exceptionable: boolean = true): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent, true && _exceptionable))) && + Array.isArray(input.children) && + input.children.every( + (elem: any, _index1: number) => + "object" === typeof elem && + null !== elem && + _io0(elem, true && _exceptionable), + ) && + (9 === Object.keys(input).length || + Object.keys(input).every((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return false; + })); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + (9 === Object.keys(input).length || + false === _exceptionable || + Object.keys(input).every((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertEquals", + path: + _path + + __typia_transform__accessExpressionAsString._accessExpressionAsString( + key, + ), + expected: "undefined", + value: value, + }, + _errorFactory, + ); + })); + const __is = ( + input: any, + _exceptionable: boolean = true, + ): input is ICitizen => + "object" === typeof input && null !== input && _io0(input, true); + let _errorFactory: any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssertEquals", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssertEquals", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; +})(); +export const createAssertGuard = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuard", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): asserts input is ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssertGuard", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssertGuard", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + }; +})(); +export const createAssertGuardEquals = (() => { + const _io0 = (input: any, _exceptionable: boolean = true): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent, true && _exceptionable))) && + Array.isArray(input.children) && + input.children.every( + (elem: any, _index1: number) => + "object" === typeof elem && + null !== elem && + _io0(elem, true && _exceptionable), + ) && + (9 === Object.keys(input).length || + Object.keys(input).every((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return false; + })); + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }, + _errorFactory, + )) && + (("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }, + _errorFactory, + )) && + (("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }, + _errorFactory, + )) && + (("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + }, + _errorFactory, + )) && + (input.age < 100 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }, + _errorFactory, + )) && + ("string" === typeof input.motto || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".motto", + expected: "string", + value: input.motto, + }, + _errorFactory, + )) && + (input.birthdate instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }, + _errorFactory, + )) && + (null === input.died_at || + input.died_at instanceof Date || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }, + _errorFactory, + )) && + (null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }, + _errorFactory, + )) && + (((Array.isArray(input.children) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + input.children.every( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + )) && + _ao0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }, + _errorFactory, + ), + )) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: _path + ".children", + expected: "Array", + value: input.children, + }, + _errorFactory, + )) && + (9 === Object.keys(input).length || + false === _exceptionable || + Object.keys(input).every((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.createAssertGuardEquals", + path: + _path + + __typia_transform__accessExpressionAsString._accessExpressionAsString( + key, + ), + expected: "undefined", + value: value, + }, + _errorFactory, + ); + })); + const __is = ( + input: any, + _exceptionable: boolean = true, + ): input is ICitizen => + "object" === typeof input && null !== input && _io0(input, true); + let _errorFactory: any; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): asserts input is ICitizen => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssertGuardEquals", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.createAssertGuardEquals", + path: _path + "", + expected: "ICitizen", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + }; +})(); +export const createValidate = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent))) && + Array.isArray(input.children) && + input.children.every( + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), + ); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + ].every((flag: boolean) => flag); + const __is = (input: any): input is ICitizen => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + return (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; +})(); +export const createValidateEquals = (() => { + const _io0 = (input: any, _exceptionable: boolean = true): boolean => + "string" === typeof input.id && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && + "string" === typeof input.name && + RegExp("^[A-Z][a-z]+$").test(input.name) && + "string" === typeof input.email && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && + "number" === typeof input.age && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && + input.age < 100 && + "string" === typeof input.motto && + input.birthdate instanceof Date && + (null === input.died_at || input.died_at instanceof Date) && + (null === input.parent || + ("object" === typeof input.parent && + null !== input.parent && + _io0(input.parent, true && _exceptionable))) && + Array.isArray(input.children) && + input.children.every( + (elem: any, _index1: number) => + "object" === typeof elem && + null !== elem && + _io0(elem, true && _exceptionable), + ) && + (9 === Object.keys(input).length || + Object.keys(input).every((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return false; + })); + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.id && + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + $report(_exceptionable, { + path: _path + ".id", + expected: 'string & Format<"uuid">', + value: input.id, + }))) || + $report(_exceptionable, { + path: _path + ".id", + expected: '(string & Format<"uuid">)', + value: input.id, + }), + ("string" === typeof input.name && + (RegExp("^[A-Z][a-z]+$").test(input.name) || + $report(_exceptionable, { + path: _path + ".name", + expected: 'string & Pattern<"^[A-Z][a-z]+$">', + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: '(string & Pattern<"^[A-Z][a-z]+$">)', + value: input.name, + }), + ("string" === typeof input.email && + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + $report(_exceptionable, { + path: _path + ".email", + expected: 'string & Format<"email">', + value: input.email, + }))) || + $report(_exceptionable, { + path: _path + ".email", + expected: '(string & Format<"email">)', + value: input.email, + }), + ("number" === typeof input.age && + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + $report(_exceptionable, { + path: _path + ".age", + expected: 'number & Type<"uint32">', + value: input.age, + })) && + (input.age < 100 || + $report(_exceptionable, { + path: _path + ".age", + expected: "number & ExclusiveMaximum<100>", + value: input.age, + }))) || + $report(_exceptionable, { + path: _path + ".age", + expected: '(number & Type<"uint32"> & ExclusiveMaximum<100>)', + value: input.age, + }), + "string" === typeof input.motto || + $report(_exceptionable, { + path: _path + ".motto", + expected: "string", + value: input.motto, + }), + input.birthdate instanceof Date || + $report(_exceptionable, { + path: _path + ".birthdate", + expected: "Date", + value: input.birthdate, + }), + null === input.died_at || + input.died_at instanceof Date || + $report(_exceptionable, { + path: _path + ".died_at", + expected: "(Date | null)", + value: input.died_at, + }), + null === input.parent || + ((("object" === typeof input.parent && null !== input.parent) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + })) && + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || + $report(_exceptionable, { + path: _path + ".parent", + expected: "(ICitizen | null)", + value: input.parent, + }), + ((Array.isArray(input.children) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + })) && + input.children + .map( + (elem: any, _index2: number) => + ((("object" === typeof elem && null !== elem) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + })) && + _vo0( + elem, + _path + ".children[" + _index2 + "]", + true && _exceptionable, + )) || + $report(_exceptionable, { + path: _path + ".children[" + _index2 + "]", + expected: "ICitizen", + value: elem, + }), + ) + .every((flag: boolean) => flag)) || + $report(_exceptionable, { + path: _path + ".children", + expected: "Array", + value: input.children, + }), + 9 === Object.keys(input).length || + false === _exceptionable || + Object.keys(input) + .map((key: any) => { + if ( + [ + "id", + "name", + "email", + "age", + "motto", + "birthdate", + "died_at", + "parent", + "children", + ].some((prop: any) => key === prop) + ) + return true; + const value = input[key]; + if (undefined === value) return true; + return $report(_exceptionable, { + path: + _path + + __typia_transform__accessExpressionAsString._accessExpressionAsString( + key, + ), + expected: "undefined", + value: value, + }); + }) + .every((flag: boolean) => flag), + ].every((flag: boolean) => flag); + const __is = ( + input: any, + _exceptionable: boolean = true, + ): input is ICitizen => + "object" === typeof input && null !== input && _io0(input, true); + let errors: any; + let $report: any; + return (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "ICitizen", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; +})(); +export const createRandom = (() => { + const _ro0 = (_recursive: boolean = true, _depth: number = 0): any => ({ + id: ( + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid + )(), + name: ( + _generator?.pattern ?? __typia_transform__randomPattern._randomPattern + )(new RegExp("^[A-Z][a-z]+$")), + email: ( + _generator?.email ?? + __typia_transform__randomFormatEmail._randomFormatEmail + )(), + age: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + exclusiveMaximum: true, + maximum: 100, + }), + motto: ( + _generator?.string ?? __typia_transform__randomString._randomString + )({ + type: "string", + }), + birthdate: new Date( + ( + _generator?.datetime ?? + __typia_transform__randomFormatDatetime._randomFormatDatetime + )(), + ), + died_at: __typia_transform__randomPick._randomPick([ + () => null, + () => + new Date( + ( + _generator?.datetime ?? + __typia_transform__randomFormatDatetime._randomFormatDatetime + )(), + ), + ])(), + parent: __typia_transform__randomPick._randomPick([ + () => null, + () => _ro0(true, _recursive ? 1 + _depth : _depth), + ])(), + children: + 5 >= _depth + ? (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => _ro0(true, _recursive ? 1 + _depth : _depth), + }) + : [], + }); + let _generator: Partial | undefined; + return ( + generator?: Partial, + ): import("typia").Resolved => { + _generator = generator; + return _ro0(); + }; +})(); diff --git a/test/generate/output/generate_protobuf.ts b/test/generate/output/generate_protobuf.ts new file mode 100644 index 0000000000..76e3d568fc --- /dev/null +++ b/test/generate/output/generate_protobuf.ts @@ -0,0 +1,890 @@ +import typia, { tags } from "typia"; +import * as __typia_transform__ProtobufReader from "typia/lib/internal/_ProtobufReader.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; + +interface IFile { + name: string & tags.MaxLength<8>; + extension: null | (string & tags.MinLength<1> & tags.MaxLength<3>); + size: number & tags.Type<"uint32">; + data: Uint8Array; +} +export const createEncode = (() => { + const encoder = < + Writer extends + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, + >( + writer: Writer, + input: any, + ): Writer => { + const _peo0 = (input: any): any => { + // property "name": (string & MaxLength<8>); + writer.uint32(10); + writer.string(input.name); + // property "extension": ((string & MinLength<1> & MaxLength<3>) | null); + if (null !== input.extension) { + writer.uint32(18); + writer.string(input.extension); + } + // property "size": (number & Type<"uint32">); + writer.uint32(24); + writer.uint32(input.size); + // property "data": Uint8Array; + writer.uint32(34); + writer.bytes(input.data); + }; + _peo0(input); + return writer; + }; + return (input: IFile): Uint8Array => { + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); + return writer.buffer(); + }; +})(); +export const createAssertEncode = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.name && + (input.name.length <= 8 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".name", + expected: "string & MaxLength<8>", + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".name", + expected: "(string & MaxLength<8>)", + value: input.name, + }, + _errorFactory, + )) && + (null === input.extension || + ("string" === typeof input.extension && + (1 <= input.extension.length || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".extension", + expected: "string & MinLength<1>", + value: input.extension, + }, + _errorFactory, + )) && + (input.extension.length <= 3 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".extension", + expected: "string & MaxLength<3>", + value: input.extension, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".extension", + expected: "((string & MinLength<1> & MaxLength<3>) | null)", + value: input.extension, + }, + _errorFactory, + )) && + (("number" === typeof input.size && + (__typia_transform__isTypeUint32._isTypeUint32(input.size) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".size", + expected: 'number & Type<"uint32">', + value: input.size, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".size", + expected: '(number & Type<"uint32">)', + value: input.size, + }, + _errorFactory, + )) && + (input.data instanceof Uint8Array || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertEncode", + path: _path + ".data", + expected: "Uint8Array", + value: input.data, + }, + _errorFactory, + )); + const encoder = < + Writer extends + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, + >( + writer: Writer, + input: any, + ): Writer => { + const _peo0 = (input: any): any => { + // property "name": (string & MaxLength<8>); + writer.uint32(10); + writer.string(input.name); + // property "extension": ((string & MinLength<1> & MaxLength<3>) | null); + if (null !== input.extension) { + writer.uint32(18); + writer.string(input.extension); + } + // property "size": (number & Type<"uint32">); + writer.uint32(24); + writer.uint32(input.size); + // property "data": Uint8Array; + writer.uint32(34); + writer.bytes(input.data); + }; + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + _peo0(input); + return writer; + }; + const __is = (input: any): input is IFile => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): IFile => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.protobuf.createAssertEncode", + path: _path + "", + expected: "IFile", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.protobuf.createAssertEncode", + path: _path + "", + expected: "IFile", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __encode = (input: IFile): Uint8Array => { + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); + return writer.buffer(); + }; + return ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): Uint8Array => __encode(__assert(input, errorFactory)); +})(); +export const createIsEncode = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + const encoder = < + Writer extends + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, + >( + writer: Writer, + input: any, + ): Writer => { + const _peo0 = (input: any): any => { + // property "name": (string & MaxLength<8>); + writer.uint32(10); + writer.string(input.name); + // property "extension": ((string & MinLength<1> & MaxLength<3>) | null); + if (null !== input.extension) { + writer.uint32(18); + writer.string(input.extension); + } + // property "size": (number & Type<"uint32">); + writer.uint32(24); + writer.uint32(input.size); + // property "data": Uint8Array; + writer.uint32(34); + writer.bytes(input.data); + }; + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + _peo0(input); + return writer; + }; + const __is = (input: any): input is IFile => + "object" === typeof input && null !== input && _io0(input); + const __encode = (input: IFile): Uint8Array => { + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); + return writer.buffer(); + }; + return (input: any): Uint8Array | null => + __is(input) ? __encode(input) : null; +})(); +export const createValidateEncode = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.name && + (input.name.length <= 8 || + $report(_exceptionable, { + path: _path + ".name", + expected: "string & MaxLength<8>", + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: "(string & MaxLength<8>)", + value: input.name, + }), + null === input.extension || + ("string" === typeof input.extension && + (1 <= input.extension.length || + $report(_exceptionable, { + path: _path + ".extension", + expected: "string & MinLength<1>", + value: input.extension, + })) && + (input.extension.length <= 3 || + $report(_exceptionable, { + path: _path + ".extension", + expected: "string & MaxLength<3>", + value: input.extension, + }))) || + $report(_exceptionable, { + path: _path + ".extension", + expected: "((string & MinLength<1> & MaxLength<3>) | null)", + value: input.extension, + }), + ("number" === typeof input.size && + (__typia_transform__isTypeUint32._isTypeUint32(input.size) || + $report(_exceptionable, { + path: _path + ".size", + expected: 'number & Type<"uint32">', + value: input.size, + }))) || + $report(_exceptionable, { + path: _path + ".size", + expected: '(number & Type<"uint32">)', + value: input.size, + }), + input.data instanceof Uint8Array || + $report(_exceptionable, { + path: _path + ".data", + expected: "Uint8Array", + value: input.data, + }), + ].every((flag: boolean) => flag); + const encoder = < + Writer extends + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, + >( + writer: Writer, + input: any, + ): Writer => { + const _peo0 = (input: any): any => { + // property "name": (string & MaxLength<8>); + writer.uint32(10); + writer.string(input.name); + // property "extension": ((string & MinLength<1> & MaxLength<3>) | null); + if (null !== input.extension) { + writer.uint32(18); + writer.string(input.extension); + } + // property "size": (number & Type<"uint32">); + writer.uint32(24); + writer.uint32(input.size); + // property "data": Uint8Array; + writer.uint32(34); + writer.bytes(input.data); + }; + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + _peo0(input); + return writer; + }; + const __is = (input: any): input is IFile => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "IFile", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "IFile", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __encode = (input: IFile): Uint8Array => { + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); + return writer.buffer(); + }; + return (input: any): import("typia").IValidation => { + const result = __validate(input) as any; + if (result.success) result.data = __encode(input); + return result; + }; +})(); +export const createDecode = (() => { + const _pdo0 = (reader: any, length: number = -1): any => { + length = length < 0 ? reader.size() : reader.index() + length; + const output = { + name: "" as any, + extension: null as any, + size: undefined as any, + data: new Uint8Array([]) as any, + } as any; + while (reader.index() < length) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + // string; + output.name = reader.string(); + break; + case 2: + // string; + output.extension = reader.string(); + break; + case 3: + // uint32; + output.size = reader.uint32(); + break; + case 4: + // bytes; + output.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return output; + }; + return (input: Uint8Array): import("typia").Resolved => { + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); + }; +})(); +export const createAssertDecode = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + const _ao0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + (("string" === typeof input.name && + (input.name.length <= 8 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".name", + expected: "string & MaxLength<8>", + value: input.name, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".name", + expected: "(string & MaxLength<8>)", + value: input.name, + }, + _errorFactory, + )) && + (null === input.extension || + ("string" === typeof input.extension && + (1 <= input.extension.length || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".extension", + expected: "string & MinLength<1>", + value: input.extension, + }, + _errorFactory, + )) && + (input.extension.length <= 3 || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".extension", + expected: "string & MaxLength<3>", + value: input.extension, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".extension", + expected: "((string & MinLength<1> & MaxLength<3>) | null)", + value: input.extension, + }, + _errorFactory, + )) && + (("number" === typeof input.size && + (__typia_transform__isTypeUint32._isTypeUint32(input.size) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".size", + expected: 'number & Type<"uint32">', + value: input.size, + }, + _errorFactory, + ))) || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".size", + expected: '(number & Type<"uint32">)', + value: input.size, + }, + _errorFactory, + )) && + (input.data instanceof Uint8Array || + __typia_transform__assertGuard._assertGuard( + _exceptionable, + { + method: "typia.protobuf.createAssertDecode", + path: _path + ".data", + expected: "Uint8Array", + value: input.data, + }, + _errorFactory, + )); + const _pdo0 = (reader: any, length: number = -1): any => { + length = length < 0 ? reader.size() : reader.index() + length; + const output = { + name: "" as any, + extension: null as any, + size: undefined as any, + data: new Uint8Array([]) as any, + } as any; + while (reader.index() < length) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + // string; + output.name = reader.string(); + break; + case 2: + // string; + output.extension = reader.string(); + break; + case 3: + // uint32; + output.size = reader.uint32(); + break; + case 4: + // bytes; + output.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return output; + }; + const __is = (input: any): input is IFile => + "object" === typeof input && null !== input && _io0(input); + let _errorFactory: any; + const __assert = ( + input: any, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): IFile => { + if (false === __is(input)) { + _errorFactory = errorFactory; + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.protobuf.createAssertDecode", + path: _path + "", + expected: "IFile", + value: input, + }, + _errorFactory, + )) && + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( + true, + { + method: "typia.protobuf.createAssertDecode", + path: _path + "", + expected: "IFile", + value: input, + }, + _errorFactory, + ))(input, "$input", true); + } + return input; + }; + const __decode = (input: Uint8Array): import("typia").Resolved => { + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); + }; + return ( + input: Uint8Array, + errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, + ): import("typia").Resolved => __assert(__decode(input), errorFactory); +})(); +export const createIsDecode = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + const _pdo0 = (reader: any, length: number = -1): any => { + length = length < 0 ? reader.size() : reader.index() + length; + const output = { + name: "" as any, + extension: null as any, + size: undefined as any, + data: new Uint8Array([]) as any, + } as any; + while (reader.index() < length) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + // string; + output.name = reader.string(); + break; + case 2: + // string; + output.extension = reader.string(); + break; + case 3: + // uint32; + output.size = reader.uint32(); + break; + case 4: + // bytes; + output.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return output; + }; + const __is = (input: any): input is IFile => + "object" === typeof input && null !== input && _io0(input); + const __decode = (input: Uint8Array): import("typia").Resolved => { + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); + }; + return (input: Uint8Array): import("typia").Resolved | null => { + const value = __decode(input); + if (!__is(value)) return null; + return value; + }; +})(); +export const createValidateDecode = (() => { + const _io0 = (input: any): boolean => + "string" === typeof input.name && + input.name.length <= 8 && + (null === input.extension || + ("string" === typeof input.extension && + 1 <= input.extension.length && + input.extension.length <= 3)) && + "number" === typeof input.size && + __typia_transform__isTypeUint32._isTypeUint32(input.size) && + input.data instanceof Uint8Array; + const _vo0 = ( + input: any, + _path: string, + _exceptionable: boolean = true, + ): boolean => + [ + ("string" === typeof input.name && + (input.name.length <= 8 || + $report(_exceptionable, { + path: _path + ".name", + expected: "string & MaxLength<8>", + value: input.name, + }))) || + $report(_exceptionable, { + path: _path + ".name", + expected: "(string & MaxLength<8>)", + value: input.name, + }), + null === input.extension || + ("string" === typeof input.extension && + (1 <= input.extension.length || + $report(_exceptionable, { + path: _path + ".extension", + expected: "string & MinLength<1>", + value: input.extension, + })) && + (input.extension.length <= 3 || + $report(_exceptionable, { + path: _path + ".extension", + expected: "string & MaxLength<3>", + value: input.extension, + }))) || + $report(_exceptionable, { + path: _path + ".extension", + expected: "((string & MinLength<1> & MaxLength<3>) | null)", + value: input.extension, + }), + ("number" === typeof input.size && + (__typia_transform__isTypeUint32._isTypeUint32(input.size) || + $report(_exceptionable, { + path: _path + ".size", + expected: 'number & Type<"uint32">', + value: input.size, + }))) || + $report(_exceptionable, { + path: _path + ".size", + expected: '(number & Type<"uint32">)', + value: input.size, + }), + input.data instanceof Uint8Array || + $report(_exceptionable, { + path: _path + ".data", + expected: "Uint8Array", + value: input.data, + }), + ].every((flag: boolean) => flag); + const _pdo0 = (reader: any, length: number = -1): any => { + length = length < 0 ? reader.size() : reader.index() + length; + const output = { + name: "" as any, + extension: null as any, + size: undefined as any, + data: new Uint8Array([]) as any, + } as any; + while (reader.index() < length) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + // string; + output.name = reader.string(); + break; + case 2: + // string; + output.extension = reader.string(); + break; + case 3: + // uint32; + output.size = reader.uint32(); + break; + case 4: + // bytes; + output.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return output; + }; + const __is = (input: any): input is IFile => + "object" === typeof input && null !== input && _io0(input); + let errors: any; + let $report: any; + const __validate = (input: any): import("typia").IValidation => { + if (false === __is(input)) { + errors = []; + $report = (__typia_transform__validateReport._validateReport as any)( + errors, + ); + ((input: any, _path: string, _exceptionable: boolean = true) => + ((("object" === typeof input && null !== input) || + $report(true, { + path: _path + "", + expected: "IFile", + value: input, + })) && + _vo0(input, _path + "", true)) || + $report(true, { + path: _path + "", + expected: "IFile", + value: input, + }))(input, "$input", true); + const success = 0 === errors.length; + return { + success, + errors, + data: success ? input : undefined, + } as any; + } + return { + success: true, + errors: [], + data: input, + } as any; + }; + const __decode = (input: Uint8Array): import("typia").Resolved => { + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); + }; + return ( + input: Uint8Array, + ): import("typia").IValidation> => + __validate(__decode(input)); +})(); diff --git a/test/package.json b/test/package.json index 2daa47187a..8fa07e42ad 100644 --- a/test/package.json +++ b/test/package.json @@ -12,11 +12,12 @@ "scripts": { "build": "rimraf bin && tsc", "build_run": "npm run build", - "generate": "rimraf generated && rimraf bin-generated && typia generate --input src --output generated --project tsconfig.generated.json && rimraf generated/features/functional* && rimraf generated/features/issues && node --max-old-space-size=8000 node_modules/typescript/bin/tsc --project tsconfig.generated.json", + "generate": "typia generate --input generate/input --output generate/output --project tsconfig.generate.json && tsc --project tsconfig.generate.json && prettier generate/**/*.ts --write", "prepare": "ts-patch install", "prettier": "prettier ./src/**/*.ts --write", "setup": "node build/setup.js", "start": "node bin", + "debug": "node debug", "template": "ts-node --project build/tsconfig.json build/template.ts" }, "repository": { @@ -42,16 +43,16 @@ "rimraf": "^5.0.5", "ts-node": "^10.9.2", "ts-patch": "^3.2.1", - "typescript": "^5.6.3" + "typescript": "~5.6.3" }, "dependencies": { "cli": "^1.0.1", - "protobufjs": "^7.2.5", + "protobufjs": "7.2.5", "randexp": "^0.5.3", "source-map-support": "^0.5.21", "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.12.1.tgz" + "typia": "../" } } \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayAny.json b/test/schemas/json.schemas/v3_0/ArrayAny.json new file mode 100644 index 0000000000..59d0b16e17 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayAny.json @@ -0,0 +1,64 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayAny": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayAny" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayAtomicAlias.json b/test/schemas/json.schemas/v3_0/ArrayAtomicAlias.json similarity index 100% rename from test/schemas/json/v3_0/ArrayAtomicAlias.json rename to test/schemas/json.schemas/v3_0/ArrayAtomicAlias.json diff --git a/test/schemas/json/v3_0/ArrayAtomicSimple.json b/test/schemas/json.schemas/v3_0/ArrayAtomicSimple.json similarity index 100% rename from test/schemas/json/v3_0/ArrayAtomicSimple.json rename to test/schemas/json.schemas/v3_0/ArrayAtomicSimple.json diff --git a/test/schemas/json.schemas/v3_0/ArrayHierarchical.json b/test/schemas/json.schemas/v3_0/ArrayHierarchical.json new file mode 100644 index 0000000000..18a79574e3 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayHierarchical.json @@ -0,0 +1,120 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayHierarchical": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayHierarchical.ICompany" + } + }, + "ArrayHierarchical.ICompany": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "$ref": "#/components/schemas/ArrayHierarchical.ITimestamp" + }, + "departments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayHierarchical.IDepartment" + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "ArrayHierarchical.ITimestamp": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "ArrayHierarchical.IDepartment": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ArrayHierarchical.ITimestamp" + }, + "employees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayHierarchical.IEmployee" + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + }, + "ArrayHierarchical.IEmployee": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "$ref": "#/components/schemas/ArrayHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayHierarchical" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayHierarchicalPointer.json b/test/schemas/json.schemas/v3_0/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..cf1066996c --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayHierarchicalPointer.json @@ -0,0 +1,128 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayHierarchicalPointer": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayHierarchicalPointer.ICompany" + } + } + }, + "required": [ + "value" + ] + }, + "ArrayHierarchicalPointer.ICompany": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "$ref": "#/components/schemas/ArrayHierarchicalPointer.ITimestamp" + }, + "departments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayHierarchicalPointer.IDepartment" + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "ArrayHierarchicalPointer.ITimestamp": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "ArrayHierarchicalPointer.IDepartment": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ArrayHierarchicalPointer.ITimestamp" + }, + "employees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayHierarchicalPointer.IEmployee" + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + }, + "ArrayHierarchicalPointer.IEmployee": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "$ref": "#/components/schemas/ArrayHierarchicalPointer.ITimestamp" + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayHierarchicalPointer" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayMatrix.json b/test/schemas/json.schemas/v3_0/ArrayMatrix.json similarity index 100% rename from test/schemas/json/v3_0/ArrayMatrix.json rename to test/schemas/json.schemas/v3_0/ArrayMatrix.json diff --git a/test/schemas/json.schemas/v3_0/ArrayRecursive.json b/test/schemas/json.schemas/v3_0/ArrayRecursive.json new file mode 100644 index 0000000000..274a0957ea --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRecursive.json @@ -0,0 +1,57 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ArrayRecursive.ITimestamp" + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + }, + "ArrayRecursive.ITimestamp": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRecursive.ICategory" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionExplicit.json b/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..de8ee4642a --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,238 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayRecursiveUnionExplicit": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IImageFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.ITextFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IZipFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IImageFile": { + "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" + ] + }, + "ArrayRecursiveUnionExplicit.ITextFile": { + "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" + ] + }, + "ArrayRecursiveUnionExplicit.IZipFile": { + "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" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..96ca22f928 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,254 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayRecursiveUnionExplicitPointer": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IImageFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.ITextFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IZipFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IImageFile": { + "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" + ] + }, + "ArrayRecursiveUnionExplicitPointer.ITextFile": { + "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" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IZipFile": { + "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" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionImplicit.json b/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..a17a0ccaf2 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,212 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayRecursiveUnionImplicit": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IImageFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.ITextFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IZipFile" + }, + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IImageFile": { + "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" + ] + }, + "ArrayRecursiveUnionImplicit.ITextFile": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + "ArrayRecursiveUnionImplicit.IZipFile": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayRepeatedNullable.json b/test/schemas/json.schemas/v3_0/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..bba36f7401 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRepeatedNullable.json @@ -0,0 +1,40 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayArrayRepeatedNullable.Nullable": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRepeatedNullable" + }, + "nullable": true + }, + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "$ref": "#/components/schemas/ArrayArrayRepeatedNullable.Nullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRepeatedNullable" + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRepeatedNullable" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRepeatedRequired.json b/test/schemas/json.schemas/v3_0/ArrayRepeatedRequired.json similarity index 100% rename from test/schemas/json/v3_0/ArrayRepeatedRequired.json rename to test/schemas/json.schemas/v3_0/ArrayRepeatedRequired.json diff --git a/test/schemas/json.schemas/v3_0/ArrayRepeatedUnion.json b/test/schemas/json.schemas/v3_0/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..6c2e6077f3 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRepeatedUnion.json @@ -0,0 +1,85 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRepeatedUnion.IBox3D" + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRepeatedUnion" + } + }, + "ArrayRepeatedUnion.IBox3D": { + "type": "object", + "properties": { + "scale": { + "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" + }, + "position": { + "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" + }, + "rotate": { + "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" + }, + "pivot": { + "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "ArrayRepeatedUnion.IPoint3D": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRepeatedUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayRepeatedUnionWithTuple.json b/test/schemas/json.schemas/v3_0/ArrayRepeatedUnionWithTuple.json new file mode 100644 index 0000000000..ac5634c1c4 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayRepeatedUnionWithTuple.json @@ -0,0 +1,118 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayRepeatedUnionWithTuple": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/ArrayArrayRepeatedUnionWithTuple" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IBox3D" + } + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IBox3D" + }, + { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + }, + "ArrayArrayRepeatedUnionWithTuple": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple" + } + }, + "ArrayRepeatedUnionWithTuple.IBox3D": { + "type": "object", + "properties": { + "scale": { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" + }, + "position": { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" + }, + "rotate": { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" + }, + "pivot": { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "ArrayRepeatedUnionWithTuple.IPoint3D": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArraySimple.json b/test/schemas/json.schemas/v3_0/ArraySimple.json new file mode 100644 index 0000000000..1ede2a4f66 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArraySimple.json @@ -0,0 +1,59 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArraySimple": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArraySimple.IPerson" + } + }, + "ArraySimple.IPerson": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArraySimple.IHobby" + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "ArraySimple.IHobby": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArraySimple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ArrayUnion.json b/test/schemas/json.schemas/v3_0/ArrayUnion.json new file mode 100644 index 0000000000..05aa097a28 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ArrayUnion.json @@ -0,0 +1,40 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ArrayUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayUnion.IUnion" + } + }, + "ArrayUnion.IUnion": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/AtomicAlias.json b/test/schemas/json.schemas/v3_0/AtomicAlias.json similarity index 100% rename from test/schemas/json/v3_0/AtomicAlias.json rename to test/schemas/json.schemas/v3_0/AtomicAlias.json diff --git a/test/schemas/json.schemas/v3_0/AtomicClass.json b/test/schemas/json.schemas/v3_0/AtomicClass.json new file mode 100644 index 0000000000..322b8a0d46 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/AtomicClass.json @@ -0,0 +1,48 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "AtomicClass": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "boolean" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "string" + }, + { + "type": "string" + } + ] + }, + "minItems": 9, + "maxItems": 9 + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/AtomicClass" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/AtomicIntersection.json b/test/schemas/json.schemas/v3_0/AtomicIntersection.json similarity index 100% rename from test/schemas/json/v3_0/AtomicIntersection.json rename to test/schemas/json.schemas/v3_0/AtomicIntersection.json diff --git a/test/schemas/json/v3_0/AtomicSimple.json b/test/schemas/json.schemas/v3_0/AtomicSimple.json similarity index 100% rename from test/schemas/json/v3_0/AtomicSimple.json rename to test/schemas/json.schemas/v3_0/AtomicSimple.json diff --git a/test/schemas/json/v3_0/AtomicUnion.json b/test/schemas/json.schemas/v3_0/AtomicUnion.json similarity index 100% rename from test/schemas/json/v3_0/AtomicUnion.json rename to test/schemas/json.schemas/v3_0/AtomicUnion.json diff --git a/test/schemas/json.schemas/v3_0/ClassGetter.json b/test/schemas/json.schemas/v3_0/ClassGetter.json new file mode 100644 index 0000000000..9101fc7510 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ClassGetter.json @@ -0,0 +1,32 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ClassGetter.Person": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ClassGetter.Person" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ClassMethod.json b/test/schemas/json.schemas/v3_0/ClassMethod.json new file mode 100644 index 0000000000..d35c8ff49a --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ClassMethod.json @@ -0,0 +1,27 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ClassMethod.Animal": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ClassMethod.Animal" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ClassPropertyAssignment.json b/test/schemas/json.schemas/v3_0/ClassPropertyAssignment.json new file mode 100644 index 0000000000..aec776fbb0 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ClassPropertyAssignment.json @@ -0,0 +1,45 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ClassPropertyAssignment": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ClassPropertyAssignment" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagArray.json b/test/schemas/json.schemas/v3_0/CommentTagArray.json new file mode 100644 index 0000000000..fa38284e3f --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagArray.json @@ -0,0 +1,76 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagArray": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagArray.Type" + } + } + }, + "required": [ + "value" + ] + }, + "CommentTagArray.Type": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagArray" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagArrayUnion.json b/test/schemas/json.schemas/v3_0/CommentTagArrayUnion.json new file mode 100644 index 0000000000..3184a415bc --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagArrayUnion.json @@ -0,0 +1,66 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagArrayUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagArrayUnion.Type" + } + }, + "CommentTagArrayUnion.Type": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagArrayUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagAtomicUnion.json b/test/schemas/json.schemas/v3_0/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..13528027c9 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagAtomicUnion.json @@ -0,0 +1,47 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagAtomicUnion": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagAtomicUnion.Type" + } + } + }, + "required": [ + "value" + ] + }, + "CommentTagAtomicUnion.Type": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagAtomicUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagDefault.json b/test/schemas/json.schemas/v3_0/CommentTagDefault.json new file mode 100644 index 0000000000..8b7592a7cc --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagDefault.json @@ -0,0 +1,132 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagDefault": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Default value on union typed property", + "description": "Default value on union typed property." + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Default value on union typed property", + "description": "Default value on union typed property." + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Default value on union typed property", + "description": "Default value on union typed property." + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Default value on union typed property", + "description": "Default value on union typed property." + }, + "vulnerable_range": { + "type": "number", + "minimum": 3, + "maximum": 5, + "title": "Default value on union typed property", + "description": "Default value on union typed property." + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "Default value on union typed property", + "description": "Default value on union typed property." + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagDefault" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagFormat.json b/test/schemas/json.schemas/v3_0/CommentTagFormat.json new file mode 100644 index 0000000000..5e60d67266 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagFormat.json @@ -0,0 +1,129 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagFormat": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagFormat" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagLength.json b/test/schemas/json.schemas/v3_0/CommentTagLength.json new file mode 100644 index 0000000000..2ef1665492 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagLength.json @@ -0,0 +1,61 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagLength": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagLength.Type" + } + } + }, + "required": [ + "value" + ] + }, + "CommentTagLength.Type": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagLength" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagObjectUnion.json b/test/schemas/json.schemas/v3_0/CommentTagObjectUnion.json new file mode 100644 index 0000000000..db7fd374b4 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagObjectUnion.json @@ -0,0 +1,53 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagObjectUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagObjectUnion.Type" + } + }, + "CommentTagObjectUnion.Type": { + "oneOf": [ + { + "$ref": "#/components/schemas/CommentTagObjectUnion.Numeric" + }, + { + "$ref": "#/components/schemas/CommentTagObjectUnion.Literal" + } + ] + }, + "CommentTagObjectUnion.Numeric": { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + "CommentTagObjectUnion.Literal": { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagObjectUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagPattern.json b/test/schemas/json.schemas/v3_0/CommentTagPattern.json new file mode 100644 index 0000000000..323691b0c0 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagPattern.json @@ -0,0 +1,39 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagPattern": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagPattern" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagRange.json b/test/schemas/json.schemas/v3_0/CommentTagRange.json new file mode 100644 index 0000000000..9167bd9a81 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagRange.json @@ -0,0 +1,89 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagRange": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagRange.Type" + } + } + }, + "required": [ + "value" + ] + }, + "CommentTagRange.Type": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagRange" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/CommentTagType.json b/test/schemas/json.schemas/v3_0/CommentTagType.json new file mode 100644 index 0000000000..f4b5b83477 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/CommentTagType.json @@ -0,0 +1,65 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "CommentTagType": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentTagType.Type" + } + } + }, + "required": [ + "value" + ] + }, + "CommentTagType.Type": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/CommentTagType" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ConstantAtomicAbsorbed.json b/test/schemas/json.schemas/v3_0/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..7527ee0d98 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ConstantAtomicAbsorbed.json @@ -0,0 +1,29 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ConstantAtomicAbsorbed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ConstantAtomicAbsorbed" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ConstantAtomicSimple.json b/test/schemas/json.schemas/v3_0/ConstantAtomicSimple.json new file mode 100644 index 0000000000..d8390c9cb9 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ConstantAtomicSimple.json @@ -0,0 +1,45 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ConstantAtomicSimple": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "boolean", + "enum": [ + true + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "string", + "enum": [ + "three" + ] + } + ] + }, + "minItems": 4, + "maxItems": 4 + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ConstantAtomicSimple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ConstantAtomicTagged.json b/test/schemas/json.schemas/v3_0/ConstantAtomicTagged.json new file mode 100644 index 0000000000..9487f93dec --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ConstantAtomicTagged.json @@ -0,0 +1,42 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ConstantAtomicTagged": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "enum": [ + "latest" + ] + }, + "age": { + "oneOf": [ + { + "type": "integer", + "maximum": 100 + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ConstantAtomicTagged" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ConstantAtomicUnion.json b/test/schemas/json.schemas/v3_0/ConstantAtomicUnion.json new file mode 100644 index 0000000000..a1a67bb2dd --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ConstantAtomicUnion.json @@ -0,0 +1,56 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ConstantAtomicUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConstantAtomicUnion.Union" + } + }, + "ConstantAtomicUnion.Union": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ] + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ConstantAtomicUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ConstantAtomicWrapper.json b/test/schemas/json.schemas/v3_0/ConstantAtomicWrapper.json new file mode 100644 index 0000000000..31efe48f06 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ConstantAtomicWrapper.json @@ -0,0 +1,63 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ConstantAtomicWrapper": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConstantAtomicWrapper.IPointerboolean" + }, + { + "$ref": "#/components/schemas/ConstantAtomicWrapper.IPointernumber" + }, + { + "$ref": "#/components/schemas/ConstantAtomicWrapper.IPointerstring" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + "ConstantAtomicWrapper.IPointerboolean": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "ConstantAtomicWrapper.IPointernumber": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + }, + "ConstantAtomicWrapper.IPointerstring": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ConstantAtomicWrapper" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ConstantConstEnumeration.json b/test/schemas/json.schemas/v3_0/ConstantConstEnumeration.json similarity index 100% rename from test/schemas/json/v3_0/ConstantConstEnumeration.json rename to test/schemas/json.schemas/v3_0/ConstantConstEnumeration.json diff --git a/test/schemas/json/v3_0/ConstantEnumeration.json b/test/schemas/json.schemas/v3_0/ConstantEnumeration.json similarity index 100% rename from test/schemas/json/v3_0/ConstantEnumeration.json rename to test/schemas/json.schemas/v3_0/ConstantEnumeration.json diff --git a/test/schemas/json/v3_0/ConstantIntersection.json b/test/schemas/json.schemas/v3_0/ConstantIntersection.json similarity index 100% rename from test/schemas/json/v3_0/ConstantIntersection.json rename to test/schemas/json.schemas/v3_0/ConstantIntersection.json diff --git a/test/schemas/json.schemas/v3_0/DynamicArray.json b/test/schemas/json.schemas/v3_0/DynamicArray.json new file mode 100644 index 0000000000..4281f64aa3 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicArray.json @@ -0,0 +1,31 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicArray": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicArray" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicComposite.json b/test/schemas/json.schemas/v3_0/DynamicComposite.json new file mode 100644 index 0000000000..ca7b257990 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicComposite.json @@ -0,0 +1,40 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicComposite": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicComposite" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicConstant.json b/test/schemas/json.schemas/v3_0/DynamicConstant.json new file mode 100644 index 0000000000..85b04f5b5b --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicConstant.json @@ -0,0 +1,43 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicConstant": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicConstant" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicEnumeration.json b/test/schemas/json.schemas/v3_0/DynamicEnumeration.json new file mode 100644 index 0000000000..bf2818c97d --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicEnumeration.json @@ -0,0 +1,56 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicEnumeration": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicEnumeration" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicNever.json b/test/schemas/json.schemas/v3_0/DynamicNever.json new file mode 100644 index 0000000000..5a40bd4a2e --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicNever.json @@ -0,0 +1,17 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicNever": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicNever" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicSimple.json b/test/schemas/json.schemas/v3_0/DynamicSimple.json new file mode 100644 index 0000000000..666de6ba38 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicSimple.json @@ -0,0 +1,28 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicSimple": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicSimple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicTemplate.json b/test/schemas/json.schemas/v3_0/DynamicTemplate.json new file mode 100644 index 0000000000..7f8469dde8 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicTemplate.json @@ -0,0 +1,30 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicTemplate": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicTemplate" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicTree.json b/test/schemas/json.schemas/v3_0/DynamicTree.json new file mode 100644 index 0000000000..2ddf5a4bbb --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicTree.json @@ -0,0 +1,40 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/components/schemas/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "$ref": "#/components/schemas/DynamicTree" + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicTree" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicUndefined.json b/test/schemas/json.schemas/v3_0/DynamicUndefined.json new file mode 100644 index 0000000000..387bc10cf7 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicUndefined.json @@ -0,0 +1,17 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicUndefined": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicUndefined" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/DynamicUnion.json b/test/schemas/json.schemas/v3_0/DynamicUnion.json new file mode 100644 index 0000000000..c9b3c8aa13 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/DynamicUnion.json @@ -0,0 +1,27 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "DynamicUnion": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectAlias.json b/test/schemas/json.schemas/v3_0/ObjectAlias.json new file mode 100644 index 0000000000..c9b1d58eac --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectAlias.json @@ -0,0 +1,69 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectAlias": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectAlias.IMember" + } + }, + "ObjectAlias.IMember": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectAlias" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectDate.json b/test/schemas/json.schemas/v3_0/ObjectDate.json new file mode 100644 index 0000000000..87096d51cc --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectDate.json @@ -0,0 +1,48 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectDate": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "date": { + "type": "string", + "format": "date", + "nullable": true + }, + "datetime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "time": { + "type": "string", + "format": "time", + "nullable": true + }, + "duration": { + "type": "string", + "format": "duration", + "nullable": true + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectDate" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectDescription.json b/test/schemas/json.schemas/v3_0/ObjectDescription.json new file mode 100644 index 0000000000..886996454a --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectDescription.json @@ -0,0 +1,54 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectDescription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectDescription" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectDynamic.json b/test/schemas/json.schemas/v3_0/ObjectDynamic.json new file mode 100644 index 0000000000..1da133a5e5 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectDynamic.json @@ -0,0 +1,30 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectDynamic": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectDynamic" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectGeneric.json b/test/schemas/json.schemas/v3_0/ObjectGeneric.json new file mode 100644 index 0000000000..69d1ee272b --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectGeneric.json @@ -0,0 +1,141 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectGeneric": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectGeneric.ISomethingboolean" + }, + { + "$ref": "#/components/schemas/ObjectGeneric.ISomethingnumber" + }, + { + "$ref": "#/components/schemas/ObjectGeneric.ISomethingstring" + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + "ObjectGeneric.ISomethingboolean": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + }, + "child": { + "$ref": "#/components/schemas/ObjectGeneric.IChildbooleanboolean" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGeneric.IChildbooleanboolean" + } + } + }, + "required": [ + "value", + "child", + "elements" + ] + }, + "ObjectGeneric.IChildbooleanboolean": { + "type": "object", + "properties": { + "child_value": { + "type": "boolean" + }, + "child_next": { + "type": "boolean" + } + }, + "required": [ + "child_value", + "child_next" + ] + }, + "ObjectGeneric.ISomethingnumber": { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "child": { + "$ref": "#/components/schemas/ObjectGeneric.IChildnumbernumber" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGeneric.IChildnumbernumber" + } + } + }, + "required": [ + "value", + "child", + "elements" + ] + }, + "ObjectGeneric.IChildnumbernumber": { + "type": "object", + "properties": { + "child_value": { + "type": "number" + }, + "child_next": { + "type": "number" + } + }, + "required": [ + "child_value", + "child_next" + ] + }, + "ObjectGeneric.ISomethingstring": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "child": { + "$ref": "#/components/schemas/ObjectGeneric.IChildstringstring" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGeneric.IChildstringstring" + } + } + }, + "required": [ + "value", + "child", + "elements" + ] + }, + "ObjectGeneric.IChildstringstring": { + "type": "object", + "properties": { + "child_value": { + "type": "string" + }, + "child_next": { + "type": "string" + } + }, + "required": [ + "child_value", + "child_next" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectGeneric" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectGenericAlias.json b/test/schemas/json.schemas/v3_0/ObjectGenericAlias.json new file mode 100644 index 0000000000..4785298d9d --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectGenericAlias.json @@ -0,0 +1,23 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectGenericAlias.Alias": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectGenericAlias.Alias" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectGenericArray.json b/test/schemas/json.schemas/v3_0/ObjectGenericArray.json new file mode 100644 index 0000000000..43f7a32169 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectGenericArray.json @@ -0,0 +1,68 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectGenericArray": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/ObjectGenericArray.IPagination" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericArray.IPerson" + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "ObjectGenericArray.IPagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "ObjectGenericArray.IPerson": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectGenericArray" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectGenericUnion.json b/test/schemas/json.schemas/v3_0/ObjectGenericUnion.json new file mode 100644 index 0000000000..29732ce767 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectGenericUnion.json @@ -0,0 +1,238 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectGenericUnion": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleEntireArticle" + } + }, + "required": [ + "value" + ] + }, + "ObjectGenericUnion.ISaleEntireArticle": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleQuestion" + }, + { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleReview" + } + ] + }, + "ObjectGenericUnion.ISaleAnswer.Nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleArticle.IContent" + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "nullable": true + }, + "ObjectGenericUnion.ISaleQuestion": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleAnswer.Nullable" + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleArticle.IContent" + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + "ObjectGenericUnion.ISaleAnswer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleArticle.IContent" + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + }, + "ObjectGenericUnion.ISaleArticle.IContent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericUnion.IAttachmentFile" + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + }, + "ObjectGenericUnion.IAttachmentFile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "ObjectGenericUnion.ISaleReview": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleAnswer.Nullable" + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericUnion.ISaleReview.IContent" + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + "ObjectGenericUnion.ISaleReview.IContent": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectGenericUnion.IAttachmentFile" + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectGenericUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectHierarchical.json b/test/schemas/json.schemas/v3_0/ObjectHierarchical.json new file mode 100644 index 0000000000..7ab490a52e --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectHierarchical.json @@ -0,0 +1,282 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectHierarchical.IMember.Nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "$ref": "#/components/schemas/ObjectHierarchical.IAccount" + }, + "enterprise": { + "$ref": "#/components/schemas/ObjectHierarchical.IEnterprise.Nullable" + }, + "emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + }, + "authorized": { + "type": "boolean" + } + }, + "required": [ + "id", + "account", + "enterprise", + "emails", + "created_at", + "authorized" + ], + "nullable": true + }, + "ObjectHierarchical.IEnterprise.Nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "$ref": "#/components/schemas/ObjectHierarchical.IAccount" + }, + "name": { + "type": "string" + }, + "grade": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "account", + "name", + "grade", + "created_at" + ], + "nullable": true + }, + "ObjectHierarchical.IAccount.Nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "code", + "created_at" + ], + "nullable": true + }, + "ObjectHierarchical.ICustomer": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "channel": { + "$ref": "#/components/schemas/ObjectHierarchical.IChannel" + }, + "member": { + "$ref": "#/components/schemas/ObjectHierarchical.IMember.Nullable" + }, + "account": { + "$ref": "#/components/schemas/ObjectHierarchical.IAccount.Nullable" + }, + "href": { + "type": "string" + }, + "referrer": { + "type": "string" + }, + "ip": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "minItems": 4, + "maxItems": 4 + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "channel", + "member", + "account", + "href", + "referrer", + "ip", + "created_at" + ] + }, + "ObjectHierarchical.IChannel": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "exclusive": { + "type": "boolean" + }, + "priority": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "code", + "name", + "sequence", + "exclusive", + "priority", + "created_at" + ] + }, + "ObjectHierarchical.ITimestamp": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "ObjectHierarchical.IMember": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "$ref": "#/components/schemas/ObjectHierarchical.IAccount" + }, + "enterprise": { + "$ref": "#/components/schemas/ObjectHierarchical.IEnterprise.Nullable" + }, + "emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + }, + "authorized": { + "type": "boolean" + } + }, + "required": [ + "id", + "account", + "enterprise", + "emails", + "created_at", + "authorized" + ] + }, + "ObjectHierarchical.IAccount": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "code", + "created_at" + ] + }, + "ObjectHierarchical.IEnterprise": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "account": { + "$ref": "#/components/schemas/ObjectHierarchical.IAccount" + }, + "name": { + "type": "string" + }, + "grade": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" + } + }, + "required": [ + "id", + "account", + "name", + "grade", + "created_at" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectHierarchical.ICustomer" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectInternal.json b/test/schemas/json.schemas/v3_0/ObjectInternal.json new file mode 100644 index 0000000000..4395ec2cf4 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectInternal.json @@ -0,0 +1,27 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectInternal": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectInternal" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectIntersection.json b/test/schemas/json.schemas/v3_0/ObjectIntersection.json new file mode 100644 index 0000000000..6b51e05948 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectIntersection.json @@ -0,0 +1,31 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectIntersection": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectIntersection" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectJsonTag.json b/test/schemas/json.schemas/v3_0/ObjectJsonTag.json new file mode 100644 index 0000000000..c574c8c8f0 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectJsonTag.json @@ -0,0 +1,42 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectJsonTag": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectJsonTag" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectLiteralProperty.json b/test/schemas/json.schemas/v3_0/ObjectLiteralProperty.json new file mode 100644 index 0000000000..92f7c3e7d7 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectLiteralProperty.json @@ -0,0 +1,27 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectLiteralProperty.ISomething": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectLiteralProperty.ISomething" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectLiteralType.json b/test/schemas/json.schemas/v3_0/ObjectLiteralType.json new file mode 100644 index 0000000000..a92e5caefb --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectLiteralType.json @@ -0,0 +1,27 @@ +{ + "version": "3.0", + "components": { + "schemas": {} + }, + "schemas": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectNullable.json b/test/schemas/json.schemas/v3_0/ObjectNullable.json new file mode 100644 index 0000000000..c638a0e3e6 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectNullable.json @@ -0,0 +1,130 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectNullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectNullable.IProduct" + } + } + }, + "required": [ + "value" + ] + }, + "ObjectNullable.IBrand.Nullable": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "nullable": true + }, + "ObjectNullable.IManufacturer.Nullable": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "nullable": true + }, + "ObjectNullable.IProduct": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "$ref": "#/components/schemas/ObjectNullable.IManufacturer" + }, + "brand": { + "$ref": "#/components/schemas/ObjectNullable.IBrand.Nullable" + }, + "similar": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectNullable.IBrand.Nullable" + }, + { + "$ref": "#/components/schemas/ObjectNullable.IManufacturer.Nullable" + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + }, + "ObjectNullable.IManufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "ObjectNullable.IBrand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectNullable" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectOptional.json b/test/schemas/json.schemas/v3_0/ObjectOptional.json new file mode 100644 index 0000000000..8ebcdaece2 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectOptional.json @@ -0,0 +1,30 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectOptional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectOptional" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectPartial.json b/test/schemas/json.schemas/v3_0/ObjectPartial.json new file mode 100644 index 0000000000..451e0b87dd --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectPartial.json @@ -0,0 +1,98 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectPartial.IBase.Nullable": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "$ref": "#/components/schemas/ObjectPartial.IBase.Nullable" + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + }, + "PartialObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "$ref": "#/components/schemas/ObjectPartial.IBase.Nullable" + } + }, + "required": [], + "description": "Make all properties in T optional" + }, + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "$ref": "#/components/schemas/ObjectPartial.IBase.Nullable" + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/PartialObjectPartial.IBase" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectPartialAndRequired.json b/test/schemas/json.schemas/v3_0/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..a4ed4d8695 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectPartialAndRequired.json @@ -0,0 +1,67 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectPartialAndRequired.Nullable": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "$ref": "#/components/schemas/ObjectPartialAndRequired.Nullable" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "$ref": "#/components/schemas/ObjectPartialAndRequired.Nullable" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectPartialAndRequired" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectPrimitive.json b/test/schemas/json.schemas/v3_0/ObjectPrimitive.json new file mode 100644 index 0000000000..b44a36f2e2 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectPrimitive.json @@ -0,0 +1,82 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectPrimitive.IArticle": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectPrimitive.IFile" + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "ObjectPrimitive.IFile": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectPrimitive.IArticle" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectPropertyNullable.json b/test/schemas/json.schemas/v3_0/ObjectPropertyNullable.json new file mode 100644 index 0000000000..f56036d6e9 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectPropertyNullable.json @@ -0,0 +1,149 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectPropertyNullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectPropertyNullable.IPointerboolean" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectPropertyNullable.IPointernumber" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectPropertyNullable.IPointerstring" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectPropertyNullable.IPointerObjectPropertyNullable.IMember" + } + } + ] + }, + "minItems": 4, + "maxItems": 4 + }, + "ObjectPropertyNullable.IPointerboolean": { + "type": "object", + "properties": { + "value": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "value" + ] + }, + "ObjectPropertyNullable.IPointernumber": { + "type": "object", + "properties": { + "value": { + "type": "number", + "nullable": true + } + }, + "required": [ + "value" + ] + }, + "ObjectPropertyNullable.IPointerstring": { + "type": "object", + "properties": { + "value": { + "type": "string", + "nullable": true + } + }, + "required": [ + "value" + ] + }, + "ObjectPropertyNullable.IMember.Nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + }, + "grade": { + "type": "number" + }, + "serial": { + "type": "number", + "nullable": true + }, + "activated": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "activated" + ], + "nullable": true + }, + "ObjectPropertyNullable.IPointerObjectPropertyNullable.IMember": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/ObjectPropertyNullable.IMember.Nullable" + } + }, + "required": [ + "value" + ] + }, + "ObjectPropertyNullable.IMember": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + }, + "grade": { + "type": "number" + }, + "serial": { + "type": "number", + "nullable": true + }, + "activated": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "activated" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectPropertyNullable" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectRecursive.json b/test/schemas/json.schemas/v3_0/ObjectRecursive.json new file mode 100644 index 0000000000..650e44f156 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectRecursive.json @@ -0,0 +1,90 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectRecursive.IDepartment.Nullable": { + "type": "object", + "properties": { + "parent": { + "$ref": "#/components/schemas/ObjectRecursive.IDepartment.Nullable" + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectRecursive.ITimestamp" + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + }, + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "$ref": "#/components/schemas/ObjectRecursive.IDepartment.Nullable" + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "$ref": "#/components/schemas/ObjectRecursive.ITimestamp" + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + }, + "ObjectRecursive.ITimestamp": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectRecursive.IDepartment" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectRequired.json b/test/schemas/json.schemas/v3_0/ObjectRequired.json new file mode 100644 index 0000000000..182f8e53be --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectRequired.json @@ -0,0 +1,92 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectRequired.IBase.Nullable": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "$ref": "#/components/schemas/ObjectRequired.IBase.Nullable" + } + }, + "required": [], + "nullable": true + }, + "RequiredObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "$ref": "#/components/schemas/ObjectRequired.IBase.Nullable" + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required" + }, + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "$ref": "#/components/schemas/ObjectRequired.IBase.Nullable" + } + }, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/RequiredObjectRequired.IBase" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectSimple.json b/test/schemas/json.schemas/v3_0/ObjectSimple.json new file mode 100644 index 0000000000..cac1779b40 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectSimple.json @@ -0,0 +1,54 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectSimple.IBox3D": { + "type": "object", + "properties": { + "scale": { + "$ref": "#/components/schemas/ObjectSimple.IPoint3D" + }, + "position": { + "$ref": "#/components/schemas/ObjectSimple.IPoint3D" + }, + "rotate": { + "$ref": "#/components/schemas/ObjectSimple.IPoint3D" + }, + "pivot": { + "$ref": "#/components/schemas/ObjectSimple.IPoint3D" + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "ObjectSimple.IPoint3D": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectSimple.IBox3D" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectTuple.json b/test/schemas/json.schemas/v3_0/ObjectTuple.json new file mode 100644 index 0000000000..6e55e48963 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectTuple.json @@ -0,0 +1,65 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectTuple": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectTuple.ISection" + }, + { + "$ref": "#/components/schemas/ObjectTuple.ICitizen" + } + ] + }, + "minItems": 2, + "maxItems": 2 + }, + "ObjectTuple.ISection": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "code", + "name" + ] + }, + "ObjectTuple.ICitizen": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectTuple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUndefined.json b/test/schemas/json.schemas/v3_0/ObjectUndefined.json new file mode 100644 index 0000000000..1d41a23dab --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUndefined.json @@ -0,0 +1,62 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUndefined": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUndefined.ILecture" + } + }, + "ObjectUndefined.ILecture": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "$ref": "#/components/schemas/ObjectUndefined.IClassroom" + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ] + }, + "ObjectUndefined.IClassroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUndefined" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionComposite.json b/test/schemas/json.schemas/v3_0/ObjectUnionComposite.json new file mode 100644 index 0000000000..d2d721c958 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionComposite.json @@ -0,0 +1,180 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionComposite": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.ILine" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.ITriangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.IRectangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.IPolyline" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.IPointedShape" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.IPolygon" + }, + { + "$ref": "#/components/schemas/ObjectUnionComposite.ICircle" + } + ] + } + }, + "ObjectUnionComposite.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "ObjectUnionComposite.ILine": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + } + }, + "required": [ + "p1", + "p2" + ] + }, + "ObjectUnionComposite.ITriangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + "ObjectUnionComposite.IRectangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "p4": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + "ObjectUnionComposite.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + } + } + }, + "required": [ + "points" + ] + }, + "ObjectUnionComposite.IPointedShape": { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + } + }, + "inner": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + } + }, + "required": [ + "outer", + "inner" + ] + }, + "ObjectUnionComposite.IPolygon": { + "type": "object", + "properties": { + "outer": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPolyline" + }, + "inner": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPolyline" + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + "ObjectUnionComposite.ICircle": { + "type": "object", + "properties": { + "centroid": { + "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionComposite" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionCompositePointer.json b/test/schemas/json.schemas/v3_0/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..6f379402e8 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionCompositePointer.json @@ -0,0 +1,199 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionCompositePointer": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IPointerIPointILineITriangleIRectangleIPolylineIPolygonIPointedShapeICircle" + } + } + }, + "required": [ + "value" + ] + }, + "IPointerIPointILineITriangleIRectangleIPolylineIPolygonIPointedShapeICircle": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.ILine" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.ITriangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IRectangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolyline" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPointedShape" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolygon" + }, + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.ICircle" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionCompositePointer.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "ObjectUnionCompositePointer.ILine": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + } + }, + "required": [ + "p1", + "p2" + ] + }, + "ObjectUnionCompositePointer.ITriangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + "ObjectUnionCompositePointer.IRectangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "p4": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + "ObjectUnionCompositePointer.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + } + } + }, + "required": [ + "points" + ] + }, + "ObjectUnionCompositePointer.IPointedShape": { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + } + }, + "inner": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + } + }, + "required": [ + "outer", + "inner" + ] + }, + "ObjectUnionCompositePointer.IPolygon": { + "type": "object", + "properties": { + "outer": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolyline" + }, + "inner": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolyline" + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + "ObjectUnionCompositePointer.ICircle": { + "type": "object", + "properties": { + "centroid": { + "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionCompositePointer" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionDouble.json b/test/schemas/json.schemas/v3_0/ObjectUnionDouble.json new file mode 100644 index 0000000000..a8aa49db33 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionDouble.json @@ -0,0 +1,167 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionDouble": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionDouble.Union" + } + }, + "ObjectUnionDouble.Union": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionDouble.IA" + }, + { + "$ref": "#/components/schemas/ObjectUnionDouble.IB" + } + ] + }, + "ObjectUnionDouble.IA": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionDouble.IAB" + }, + { + "$ref": "#/components/schemas/ObjectUnionDouble.IAA" + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + "ObjectUnionDouble.IAB": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionDouble.IAA": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionDouble.IB": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionDouble.IBB" + }, + { + "$ref": "#/components/schemas/ObjectUnionDouble.IBA" + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + "ObjectUnionDouble.IBB": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionDouble.IBA": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionDouble" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionExplicit.json b/test/schemas/json.schemas/v3_0/ObjectUnionExplicit.json new file mode 100644 index 0000000000..35e6d98880 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionExplicit.json @@ -0,0 +1,237 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionExplicit": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorpointObjectUnionExplicit.IPoint" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorlineObjectUnionExplicit.ILine" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatortriangleObjectUnionExplicit.ITriangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorrectangleObjectUnionExplicit.IRectangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorpolylineObjectUnionExplicit.IPolyline" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorpolygonObjectUnionExplicit.IPolygon" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorcircleObjectUnionExplicit.ICircle" + } + ] + } + }, + "ObjectUnionExplicit.DiscriminatorpointObjectUnionExplicit.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + "ObjectUnionExplicit.DiscriminatorlineObjectUnionExplicit.ILine": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + "ObjectUnionExplicit.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "ObjectUnionExplicit.DiscriminatortriangleObjectUnionExplicit.ITriangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + "ObjectUnionExplicit.DiscriminatorrectangleObjectUnionExplicit.IRectangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "p4": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + "ObjectUnionExplicit.DiscriminatorpolylineObjectUnionExplicit.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ] + }, + "ObjectUnionExplicit.DiscriminatorpolygonObjectUnionExplicit.IPolygon": { + "type": "object", + "properties": { + "outer": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPolyline" + }, + "inner": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPolyline" + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + "ObjectUnionExplicit.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + } + } + }, + "required": [ + "points" + ] + }, + "ObjectUnionExplicit.DiscriminatorcircleObjectUnionExplicit.ICircle": { + "type": "object", + "properties": { + "centroid": { + "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionExplicit" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionExplicitPointer.json b/test/schemas/json.schemas/v3_0/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..eccb71bf2b --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionExplicitPointer.json @@ -0,0 +1,259 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionExplicitPointer": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IPointerObjectUnionExplicitPointer.Shape" + } + } + }, + "required": [ + "value" + ] + }, + "IPointerObjectUnionExplicitPointer.Shape": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.Shape" + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionExplicitPointer.Shape": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorpointObjectUnionExplicitPointer.IPoint" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorlineObjectUnionExplicitPointer.ILine" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatortriangleObjectUnionExplicitPointer.ITriangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorrectangleObjectUnionExplicitPointer.IRectangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorpolylineObjectUnionExplicitPointer.IPolyline" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorpolygonObjectUnionExplicitPointer.IPolygon" + }, + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorcircleObjectUnionExplicitPointer.ICircle" + } + ] + }, + "ObjectUnionExplicitPointer.DiscriminatorpointObjectUnionExplicitPointer.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + "ObjectUnionExplicitPointer.DiscriminatorlineObjectUnionExplicitPointer.ILine": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + "ObjectUnionExplicitPointer.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "ObjectUnionExplicitPointer.DiscriminatortriangleObjectUnionExplicitPointer.ITriangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + "ObjectUnionExplicitPointer.DiscriminatorrectangleObjectUnionExplicitPointer.IRectangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "p4": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + "ObjectUnionExplicitPointer.DiscriminatorpolylineObjectUnionExplicitPointer.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ] + }, + "ObjectUnionExplicitPointer.DiscriminatorpolygonObjectUnionExplicitPointer.IPolygon": { + "type": "object", + "properties": { + "outer": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPolyline" + }, + "inner": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPolyline" + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + "ObjectUnionExplicitPointer.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + } + } + }, + "required": [ + "points" + ] + }, + "ObjectUnionExplicitPointer.DiscriminatorcircleObjectUnionExplicitPointer.ICircle": { + "type": "object", + "properties": { + "centroid": { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionExplicitPointer" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionImplicit.json b/test/schemas/json.schemas/v3_0/ObjectUnionImplicit.json new file mode 100644 index 0000000000..5dabda94a8 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionImplicit.json @@ -0,0 +1,205 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionImplicit": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + { + "$ref": "#/components/schemas/ObjectUnionImplicit.ILine" + }, + { + "$ref": "#/components/schemas/ObjectUnionImplicit.ITriangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionImplicit.IRectangle" + }, + { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPolyline" + }, + { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPolygon" + }, + { + "$ref": "#/components/schemas/ObjectUnionImplicit.ICircle" + } + ] + } + }, + "ObjectUnionImplicit.IPoint": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ] + }, + "ObjectUnionImplicit.ILine": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ] + }, + "ObjectUnionImplicit.ITriangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + "ObjectUnionImplicit.IRectangle": { + "type": "object", + "properties": { + "p1": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "p2": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "p3": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "p4": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + "ObjectUnionImplicit.IPolyline": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ] + }, + "ObjectUnionImplicit.IPolygon": { + "type": "object", + "properties": { + "outer": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPolyline" + }, + "inner": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPolyline" + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ] + }, + "ObjectUnionImplicit.ICircle": { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionImplicit" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ObjectUnionNonPredictable.json b/test/schemas/json.schemas/v3_0/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..7d7e14cdb9 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ObjectUnionNonPredictable.json @@ -0,0 +1,127 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ObjectUnionNonPredictable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrapperObjectUnionNonPredictable.IUnion" + } + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionNonPredictable.IWrapperObjectUnionNonPredictable.IUnion": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/IPointerObjectUnionNonPredictable.IUnion" + } + }, + "required": [ + "value" + ] + }, + "IPointerObjectUnionNonPredictable.IUnion": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/ObjectUnionNonPredictable.IUnion" + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionNonPredictable.IUnion": { + "oneOf": [ + { + "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrapperboolean" + }, + { + "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrappernumber" + }, + { + "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrapperstring" + } + ] + }, + "ObjectUnionNonPredictable.IWrapperboolean": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/IPointerboolean" + } + }, + "required": [ + "value" + ] + }, + "IPointerboolean": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionNonPredictable.IWrappernumber": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/IPointernumber" + } + }, + "required": [ + "value" + ] + }, + "IPointernumber": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + }, + "ObjectUnionNonPredictable.IWrapperstring": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/IPointerstring" + } + }, + "required": [ + "value" + ] + }, + "IPointerstring": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectUnionNonPredictable" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TemplateAtomic.json b/test/schemas/json.schemas/v3_0/TemplateAtomic.json new file mode 100644 index 0000000000..c4fedafd36 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TemplateAtomic.json @@ -0,0 +1,62 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TemplateAtomic": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TemplateAtomic" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TemplateConstant.json b/test/schemas/json.schemas/v3_0/TemplateConstant.json new file mode 100644 index 0000000000..bec5214a61 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TemplateConstant.json @@ -0,0 +1,66 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TemplateConstant": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateConstant.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TemplateConstant.Type": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TemplateConstant" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TemplateUnion.json b/test/schemas/json.schemas/v3_0/TemplateUnion.json new file mode 100644 index 0000000000..da1732a848 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TemplateUnion.json @@ -0,0 +1,82 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TemplateUnion": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateUnion.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TemplateUnion.Type": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "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)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TemplateUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ToJsonArray.json b/test/schemas/json.schemas/v3_0/ToJsonArray.json new file mode 100644 index 0000000000..dd8fc0d1f1 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ToJsonArray.json @@ -0,0 +1,56 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ToJsonArray": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "boolean" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToJsonArray.IObject" + } + } + ] + }, + "minItems": 4, + "maxItems": 4 + }, + "ToJsonArray.IObject": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ToJsonArray" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ToJsonAtomicSimple.json b/test/schemas/json.schemas/v3_0/ToJsonAtomicSimple.json similarity index 100% rename from test/schemas/json/v3_0/ToJsonAtomicSimple.json rename to test/schemas/json.schemas/v3_0/ToJsonAtomicSimple.json diff --git a/test/schemas/json/v3_0/ToJsonAtomicUnion.json b/test/schemas/json.schemas/v3_0/ToJsonAtomicUnion.json similarity index 100% rename from test/schemas/json/v3_0/ToJsonAtomicUnion.json rename to test/schemas/json.schemas/v3_0/ToJsonAtomicUnion.json diff --git a/test/schemas/json.schemas/v3_0/ToJsonDouble.json b/test/schemas/json.schemas/v3_0/ToJsonDouble.json new file mode 100644 index 0000000000..142f474724 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ToJsonDouble.json @@ -0,0 +1,27 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ToJsonDouble.Child": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ToJsonDouble.Child" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ToJsonNull.json b/test/schemas/json.schemas/v3_0/ToJsonNull.json new file mode 100644 index 0000000000..9d789510b0 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ToJsonNull.json @@ -0,0 +1,11 @@ +{ + "version": "3.0", + "components": { + "schemas": {} + }, + "schemas": [ + { + "type": "null" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ToJsonTuple.json b/test/schemas/json.schemas/v3_0/ToJsonTuple.json new file mode 100644 index 0000000000..d104b96366 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ToJsonTuple.json @@ -0,0 +1,51 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ToJsonTuple": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/ToJsonTuple.IObject" + } + ] + }, + "minItems": 4, + "maxItems": 4 + }, + "ToJsonTuple.IObject": { + "$ref": "#/components/schemas/ToJsonTuple.IHobby" + }, + "ToJsonTuple.IHobby": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "code", + "name" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ToJsonTuple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/ToJsonUnion.json b/test/schemas/json.schemas/v3_0/ToJsonUnion.json new file mode 100644 index 0000000000..5ff59f680b --- /dev/null +++ b/test/schemas/json.schemas/v3_0/ToJsonUnion.json @@ -0,0 +1,75 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "ToJsonUnion": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/ToJsonUnion.ICitizen" + }, + { + "$ref": "#/components/schemas/ToJsonUnion.IProduct" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/components/schemas/ToJsonUnion.ICitizen" + } + ] + } + }, + "ToJsonUnion.ICitizen": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + "ToJsonUnion.IProduct": { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ToJsonUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TupleHierarchical.json b/test/schemas/json.schemas/v3_0/TupleHierarchical.json new file mode 100644 index 0000000000..d201dbf747 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TupleHierarchical.json @@ -0,0 +1,135 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TupleHierarchical": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + }, + "minItems": 3, + "maxItems": 3 + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + }, + "minItems": 3, + "maxItems": 3 + } + } + ] + }, + "minItems": 3, + "maxItems": 3 + } + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + ] + }, + "minItems": 5, + "maxItems": 5 + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TupleHierarchical" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TupleRestArray.json b/test/schemas/json.schemas/v3_0/TupleRestArray.json similarity index 100% rename from test/schemas/json/v3_0/TupleRestArray.json rename to test/schemas/json.schemas/v3_0/TupleRestArray.json diff --git a/test/schemas/json/v3_0/TupleRestAtomic.json b/test/schemas/json.schemas/v3_0/TupleRestAtomic.json similarity index 100% rename from test/schemas/json/v3_0/TupleRestAtomic.json rename to test/schemas/json.schemas/v3_0/TupleRestAtomic.json diff --git a/test/schemas/json.schemas/v3_0/TupleRestObject.json b/test/schemas/json.schemas/v3_0/TupleRestObject.json new file mode 100644 index 0000000000..a368fae0dd --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TupleRestObject.json @@ -0,0 +1,40 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TupleRestObject": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "$ref": "#/components/schemas/TupleRestObject.IObject" + } + ] + }, + "minItems": 2 + }, + "TupleRestObject.IObject": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TupleRestObject" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagArray.json b/test/schemas/json.schemas/v3_0/TypeTagArray.json new file mode 100644 index 0000000000..621ec5f1fa --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagArray.json @@ -0,0 +1,81 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagArray": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagArray.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TypeTagArray.Type": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagArray" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagArrayUnion.json b/test/schemas/json.schemas/v3_0/TypeTagArrayUnion.json new file mode 100644 index 0000000000..e1537c21dc --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagArrayUnion.json @@ -0,0 +1,71 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagArrayUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagArrayUnion.Type" + } + }, + "TypeTagArrayUnion.Type": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagArrayUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagAtomicUnion.json b/test/schemas/json.schemas/v3_0/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..6ba721a316 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagAtomicUnion.json @@ -0,0 +1,47 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagAtomicUnion": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagAtomicUnion.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TypeTagAtomicUnion.Type": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagAtomicUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagCustom.json b/test/schemas/json.schemas/v3_0/TypeTagCustom.json new file mode 100644 index 0000000000..4cda4159a2 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagCustom.json @@ -0,0 +1,39 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagCustom": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagCustom" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagDefault.json b/test/schemas/json.schemas/v3_0/TypeTagDefault.json new file mode 100644 index 0000000000..33f225bdc9 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagDefault.json @@ -0,0 +1,114 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagDefault": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagDefault" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagFormat.json b/test/schemas/json.schemas/v3_0/TypeTagFormat.json new file mode 100644 index 0000000000..b4e0281cbc --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagFormat.json @@ -0,0 +1,129 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagFormat": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagFormat" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagLength.json b/test/schemas/json.schemas/v3_0/TypeTagLength.json new file mode 100644 index 0000000000..a7972c2e53 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagLength.json @@ -0,0 +1,61 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagLength": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagLength.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TypeTagLength.Type": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagLength" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagMatrix.json b/test/schemas/json.schemas/v3_0/TypeTagMatrix.json new file mode 100644 index 0000000000..4a3dd07724 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagMatrix.json @@ -0,0 +1,34 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagMatrix": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagMatrix" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagObjectUnion.json b/test/schemas/json.schemas/v3_0/TypeTagObjectUnion.json new file mode 100644 index 0000000000..d54d6af502 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagObjectUnion.json @@ -0,0 +1,53 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagObjectUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagObjectUnion.Type" + } + }, + "TypeTagObjectUnion.Type": { + "oneOf": [ + { + "$ref": "#/components/schemas/TypeTagObjectUnion.Numeric" + }, + { + "$ref": "#/components/schemas/TypeTagObjectUnion.Literal" + } + ] + }, + "TypeTagObjectUnion.Numeric": { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + "TypeTagObjectUnion.Literal": { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagObjectUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagPattern.json b/test/schemas/json.schemas/v3_0/TypeTagPattern.json new file mode 100644 index 0000000000..cefb89eb51 --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagPattern.json @@ -0,0 +1,39 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagPattern": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagPattern" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagRange.json b/test/schemas/json.schemas/v3_0/TypeTagRange.json new file mode 100644 index 0000000000..579197033c --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagRange.json @@ -0,0 +1,89 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagRange": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagRange.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TypeTagRange.Type": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagRange" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagTuple.json b/test/schemas/json.schemas/v3_0/TypeTagTuple.json new file mode 100644 index 0000000000..ff0e18a42c --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagTuple.json @@ -0,0 +1,59 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagTuple": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3, + "maximum": 7 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 2 + }, + "minItems": 3, + "maxItems": 7 + }, + { + "type": "array", + "items": { + "type": "number", + "minimum": 1, + "maximum": 2 + }, + "minItems": 3, + "maxItems": 7 + } + ] + }, + "minItems": 4, + "maxItems": 4 + } + }, + "required": [ + "tuple" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagTuple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/TypeTagType.json b/test/schemas/json.schemas/v3_0/TypeTagType.json new file mode 100644 index 0000000000..fa506d3b7a --- /dev/null +++ b/test/schemas/json.schemas/v3_0/TypeTagType.json @@ -0,0 +1,61 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "TypeTagType": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeTagType.Type" + } + } + }, + "required": [ + "value" + ] + }, + "TypeTagType.Type": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagType" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_0/UltimateUnion.json b/test/schemas/json.schemas/v3_0/UltimateUnion.json new file mode 100644 index 0000000000..acce20017b --- /dev/null +++ b/test/schemas/json.schemas/v3_0/UltimateUnion.json @@ -0,0 +1,1150 @@ +{ + "version": "3.0", + "components": { + "schemas": { + "UltimateUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IJsonSchemaCollection.IV3_1Arrayunknown" + } + }, + "IJsonSchemaCollection.IV3_1Arrayunknown": { + "type": "object", + "properties": { + "version": { + "type": "string", + "enum": [ + "3.1" + ] + }, + "components": { + "$ref": "#/components/schemas/OpenApi.IComponents" + }, + "schemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema" + } + }, + "__types": { + "type": "array", + "items": {} + } + }, + "required": [ + "version", + "components", + "schemas" + ] + }, + "OpenApi.IComponents": { + "type": "object", + "properties": { + "schemas": { + "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", + "title": "An object to hold reusable DTO schemas", + "description": "An object to hold reusable DTO schemas.\n\nIn other words, a collection of named JSON schemas." + }, + "securitySchemes": { + "$ref": "#/components/schemas/RecordstringOpenApi.ISecurityScheme", + "title": "An object to hold reusable security schemes", + "description": "An object to hold reusable security schemes.\n\nIn other words, a collection of named security schemes." + } + }, + "required": [], + "description": "Reusable components in OpenAPI.\n\nA storage of reusable components in OpenAPI document.\n\nIn other words, it is a storage of named DTO schemas and security schemes." + }, + "RecordstringOpenApi.IJsonSchema": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema" + } + }, + "OpenApi.IJsonSchema": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ], + "title": "Type schema info", + "description": "Type schema info.\n\n`OpenApi.IJsonSchema` is a type schema info of the OpenAPI.\n\n`OpenApi.IJsonSchema` basically follows the JSON schema definition of\nOpenAPI v3.1, but a little bit shrinked to remove ambiguous and duplicated\nexpressions of OpenAPI v3.1 for the convenience and clarity.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Array type utilizes only single {@link OpenAPI.IJsonSchema.IArray.items}\n- Tuple type utilizes only {@link OpenApi.IJsonSchema.ITuple.prefixItems}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link OpenApi.IJsonSchema.IObject}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAnyOf} to {@link OpenApi.IJsonSchema.IOneOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link OpenApi.IJsonSchema.IReference}" + }, + "OpenApi.IJsonSchema.IString": { + "type": "object", + "properties": { + "default": { + "type": "string", + "title": "Default value", + "description": "Default value." + }, + "format": { + "type": "string", + "title": "Format restriction", + "description": "Format restriction." + }, + "pattern": { + "type": "string", + "title": "Pattern restriction", + "description": "Pattern restriction." + }, + "contentMediaType": { + "type": "string", + "title": "Content media type restriction", + "description": "Content media type restriction." + }, + "minLength": { + "type": "integer", + "title": "Minimum length restriction", + "description": "Minimum length restriction." + }, + "maxLength": { + "type": "integer", + "title": "Maximum length restriction", + "description": "Maximum length restriction." + }, + "type": { + "type": "string", + "enum": [ + "string" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "String type info." + }, + "Recordstringany": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": {} + }, + "OpenApi.IJsonSchema.INumber": { + "type": "object", + "properties": { + "default": { + "type": "number", + "title": "Default value", + "description": "Default value." + }, + "minimum": { + "type": "number", + "title": "Minimum value restriction", + "description": "Minimum value restriction." + }, + "maximum": { + "type": "number", + "title": "Maximum value restriction", + "description": "Maximum value restriction." + }, + "exclusiveMinimum": { + "type": "boolean", + "title": "Exclusive minimum value restriction", + "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." + }, + "exclusiveMaximum": { + "type": "boolean", + "title": "Exclusive maximum value restriction", + "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": true, + "minimum": 0, + "title": "Multiple of value restriction", + "description": "Multiple of value restriction." + }, + "type": { + "type": "string", + "enum": [ + "number" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Number (double) type info." + }, + "OpenApi.IJsonSchema.IConstant": { + "type": "object", + "properties": { + "const": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "The constant value", + "description": "The constant value." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "const" + ], + "description": "Constant value type." + }, + "OpenApi.IJsonSchema.IBoolean": { + "type": "object", + "properties": { + "default": { + "type": "boolean", + "title": "The default value", + "description": "The default value." + }, + "type": { + "type": "string", + "enum": [ + "boolean" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Boolean type info." + }, + "OpenApi.IJsonSchema.IInteger": { + "type": "object", + "properties": { + "default": { + "type": "integer", + "title": "Default value", + "description": "Default value." + }, + "minimum": { + "type": "integer", + "title": "Minimum value restriction", + "description": "Minimum value restriction." + }, + "maximum": { + "type": "integer", + "title": "Maximum value restriction", + "description": "Maximum value restriction." + }, + "exclusiveMinimum": { + "type": "boolean", + "title": "Exclusive minimum value restriction", + "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." + }, + "exclusiveMaximum": { + "type": "boolean", + "title": "Exclusive maximum value restriction", + "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." + }, + "multipleOf": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 0, + "title": "Multiple of value restriction", + "description": "Multiple of value restriction." + }, + "type": { + "type": "string", + "enum": [ + "integer" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Integer type info." + }, + "OpenApi.IJsonSchema.IArray": { + "type": "object", + "properties": { + "items": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema", + "title": "Items type info", + "description": "Items type info.\n\nThe `items` means the type of the array elements. In other words, it is\nthe type schema info of the `T` in the TypeScript array type `Array`." + }, + "uniqueItems": { + "type": "boolean", + "title": "Unique items restriction", + "description": "Unique items restriction.\n\nIf this property value is `true`, target array must have unique items." + }, + "minItems": { + "type": "integer", + "title": "Minimum items restriction", + "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the array." + }, + "maxItems": { + "type": "integer", + "title": "Maximum items restriction", + "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the array." + }, + "type": { + "type": "string", + "enum": [ + "array" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "items", + "type" + ], + "description": "Array type info." + }, + "OpenApi.IJsonSchema.ITuple": { + "type": "object", + "properties": { + "prefixItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema" + }, + "title": "Prefix items", + "description": "Prefix items.\n\nThe `prefixItems` means the type schema info of the prefix items in the\ntuple type. In the TypeScript, it is expressed as `[T1, T2]`.\n\nIf you want to express `[T1, T2, ...TO[]]` type, you can configure the\n`...TO[]` through the {@link additionalItems} property." + }, + "additionalItems": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ], + "title": "Additional items", + "description": "Additional items.\n\nThe `additionalItems` means the type schema info of the additional items\nafter the {@link prefixItems}. In the TypeScript, if there's a type\n`[T1, T2, ...TO[]]`, the `...TO[]` is represented by the `additionalItems`.\n\nBy the way, if you configure the `additionalItems` as `true`, it means\nthe additional items are not restricted. They can be any type, so that\nit is equivalent to the TypeScript type `[T1, T2, ...any[]]`.\n\nOtherwise configure the `additionalItems` as the {@link IJsonSchema},\nit means the additional items must follow the type schema info.\nTherefore, it is equivalent to the TypeScript type `[T1, T2, ...TO[]]`." + }, + "uniqueItems": { + "type": "boolean", + "title": "Unique items restriction", + "description": "Unique items restriction.\n\nIf this property value is `true`, target tuple must have unique items." + }, + "minItems": { + "type": "integer", + "title": "Minimum items restriction", + "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the tuple." + }, + "maxItems": { + "type": "integer", + "title": "Maximum items restriction", + "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the tuple." + }, + "type": { + "type": "string", + "enum": [ + "array" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "prefixItems", + "type" + ], + "description": "Tuple type info." + }, + "OpenApi.IJsonSchema.IObject": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", + "title": "Properties of the object", + "description": "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's\nregular properties. The key is the name of the regular property,\nand the value is the type schema info.\n\nIf you need additional properties that is represented by dynamic key,\nyou can use the {@link additionalProperties} instead." + }, + "additionalProperties": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ], + "title": "Additional properties' info", + "description": "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nIf the value is `true`, it means that the additional properties are not\nrestricted. They can be any type. Otherwise, if the value is\n{@link IOpenAiSchema} type, it means that the additional properties must\nfollow the type schema info.\n\n- `true`: `Record`\n- `IOpenAiSchema`: `Record`" + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of key values of the required properties", + "description": "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```" + }, + "type": { + "type": "string", + "enum": [ + "object" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Object type info." + }, + "OpenApi.IJsonSchema.IReferencestring": { + "type": "object", + "properties": { + "$ref": { + "type": "string", + "title": "Reference to the named schema", + "description": "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/components/schemas/` which means the type is stored in\nthe {@link OpenApi.IComponents.schemas} object.\n\n- `#/components/schemas/SomeObject`\n- `#/components/schemas/AnotherObject`" + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "$ref" + ], + "description": "Reference type directing named schema." + }, + "OpenApi.IJsonSchema.IOneOf": { + "type": "object", + "properties": { + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ] + }, + "title": "List of the union types", + "description": "List of the union types." + }, + "discriminator": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf.IDiscriminator", + "title": "Discriminator info of the union type", + "description": "Discriminator info of the union type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "oneOf" + ], + "description": "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly\nconverts it to `oneOf` type." + }, + "OpenApi.IJsonSchema.INull": { + "type": "object", + "properties": { + "default": { + "type": "null", + "title": "Default value", + "description": "Default value." + }, + "type": { + "type": "string", + "enum": [ + "null" + ], + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Null type." + }, + "OpenApi.IJsonSchema.IUnknown": { + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [], + "description": "Unknown, the `any` type." + }, + "OpenApi.IJsonSchema.IOneOf.IDiscriminator": { + "type": "object", + "properties": { + "propertyName": { + "type": "string", + "title": "Property name for the discriminator", + "description": "Property name for the discriminator." + }, + "mapping": { + "$ref": "#/components/schemas/Recordstringstring", + "title": "Mapping of the discriminator value to the schema name", + "description": "Mapping of the discriminator value to the schema name.\n\nThis property is valid only for {@link IReference} typed\n{@link IOneOf.oneof} elements. Therefore, `key` of `mapping` is\nthe discriminator value, and `value` of `mapping` is the\nschema name like `#/components/schemas/SomeObject`." + } + }, + "required": [ + "propertyName" + ], + "description": "Discriminator info of the union type." + }, + "Recordstringstring": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "type": "string" + } + }, + "RecordstringOpenApi.ISecurityScheme": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme" + } + }, + "OpenApi.ISecurityScheme": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IApiKey" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBasic" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBearer" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOpenId" + } + ], + "title": "Security scheme of Swagger Documents", + "description": "Security scheme of Swagger Documents.\n\n`OpenApi.ISecurityScheme` is a data structure representing content of\n`securitySchemes` in `swagger.json` file. It is composed with 5 types of\nsecurity schemes as an union type like below." + }, + "OpenApi.ISecurityScheme.IApiKey": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "in": { + "type": "string", + "enum": [ + "cookie", + "header", + "query" + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type" + ], + "description": "Normal API key type." + }, + "OpenApi.ISecurityScheme.IHttpBasic": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "scheme": { + "type": "string", + "enum": [ + "basic" + ] + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "scheme" + ], + "description": "HTTP basic authentication type." + }, + "OpenApi.ISecurityScheme.IHttpBearer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "scheme": { + "type": "string", + "enum": [ + "bearer" + ] + }, + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "scheme" + ], + "description": "HTTP bearer authentication type." + }, + "OpenApi.ISecurityScheme.IOAuth2": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flows": { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlowSet" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "flows" + ], + "description": "OAuth2 authentication type." + }, + "OpenApi.ISecurityScheme.IOAuth2.IFlowSet": { + "type": "object", + "properties": { + "authorizationCode": { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlow" + }, + "implicit": { + "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl" + }, + "password": { + "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" + }, + "clientCredentials": { + "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" + } + }, + "required": [] + }, + "OpenApi.ISecurityScheme.IOAuth2.IFlow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string" + }, + "tokenUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/components/schemas/Recordstringstring" + } + }, + "required": [] + }, + "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/components/schemas/Recordstringstring" + } + }, + "required": [], + "description": "Construct a type with the properties of T except for those in type K." + }, + "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/components/schemas/Recordstringstring" + } + }, + "required": [], + "description": "Construct a type with the properties of T except for those in type K." + }, + "OpenApi.ISecurityScheme.IOpenId": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "openIdConnectUrl": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "openIdConnectUrl" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/UltimateUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ArrayAny.json b/test/schemas/json.schemas/v3_1/ArrayAny.json similarity index 100% rename from test/schemas/json/v3_1/ArrayAny.json rename to test/schemas/json.schemas/v3_1/ArrayAny.json diff --git a/test/schemas/json/v3_1/ArrayAtomicAlias.json b/test/schemas/json.schemas/v3_1/ArrayAtomicAlias.json similarity index 100% rename from test/schemas/json/v3_1/ArrayAtomicAlias.json rename to test/schemas/json.schemas/v3_1/ArrayAtomicAlias.json diff --git a/test/schemas/json/v3_1/ArrayAtomicSimple.json b/test/schemas/json.schemas/v3_1/ArrayAtomicSimple.json similarity index 100% rename from test/schemas/json/v3_1/ArrayAtomicSimple.json rename to test/schemas/json.schemas/v3_1/ArrayAtomicSimple.json diff --git a/test/schemas/json/v3_1/ArrayHierarchical.json b/test/schemas/json.schemas/v3_1/ArrayHierarchical.json similarity index 100% rename from test/schemas/json/v3_1/ArrayHierarchical.json rename to test/schemas/json.schemas/v3_1/ArrayHierarchical.json diff --git a/test/schemas/json/v3_1/ArrayHierarchicalPointer.json b/test/schemas/json.schemas/v3_1/ArrayHierarchicalPointer.json similarity index 100% rename from test/schemas/json/v3_1/ArrayHierarchicalPointer.json rename to test/schemas/json.schemas/v3_1/ArrayHierarchicalPointer.json diff --git a/test/schemas/json/v3_1/ArrayMatrix.json b/test/schemas/json.schemas/v3_1/ArrayMatrix.json similarity index 100% rename from test/schemas/json/v3_1/ArrayMatrix.json rename to test/schemas/json.schemas/v3_1/ArrayMatrix.json diff --git a/test/schemas/json/v3_1/ArrayRecursive.json b/test/schemas/json.schemas/v3_1/ArrayRecursive.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRecursive.json rename to test/schemas/json.schemas/v3_1/ArrayRecursive.json diff --git a/test/schemas/json/v3_1/ArrayRecursiveUnionExplicit.json b/test/schemas/json.schemas/v3_1/ArrayRecursiveUnionExplicit.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRecursiveUnionExplicit.json rename to test/schemas/json.schemas/v3_1/ArrayRecursiveUnionExplicit.json diff --git a/test/schemas/json/v3_1/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/json.schemas/v3_1/ArrayRecursiveUnionExplicitPointer.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRecursiveUnionExplicitPointer.json rename to test/schemas/json.schemas/v3_1/ArrayRecursiveUnionExplicitPointer.json diff --git a/test/schemas/json/v3_1/ArrayRecursiveUnionImplicit.json b/test/schemas/json.schemas/v3_1/ArrayRecursiveUnionImplicit.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRecursiveUnionImplicit.json rename to test/schemas/json.schemas/v3_1/ArrayRecursiveUnionImplicit.json diff --git a/test/schemas/json/v3_1/ArrayRepeatedNullable.json b/test/schemas/json.schemas/v3_1/ArrayRepeatedNullable.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRepeatedNullable.json rename to test/schemas/json.schemas/v3_1/ArrayRepeatedNullable.json diff --git a/test/schemas/json/v3_1/ArrayRepeatedRequired.json b/test/schemas/json.schemas/v3_1/ArrayRepeatedRequired.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRepeatedRequired.json rename to test/schemas/json.schemas/v3_1/ArrayRepeatedRequired.json diff --git a/test/schemas/json/v3_1/ArrayRepeatedUnion.json b/test/schemas/json.schemas/v3_1/ArrayRepeatedUnion.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRepeatedUnion.json rename to test/schemas/json.schemas/v3_1/ArrayRepeatedUnion.json diff --git a/test/schemas/json/v3_1/ArrayRepeatedUnionWithTuple.json b/test/schemas/json.schemas/v3_1/ArrayRepeatedUnionWithTuple.json similarity index 100% rename from test/schemas/json/v3_1/ArrayRepeatedUnionWithTuple.json rename to test/schemas/json.schemas/v3_1/ArrayRepeatedUnionWithTuple.json diff --git a/test/schemas/json/v3_1/ArraySimple.json b/test/schemas/json.schemas/v3_1/ArraySimple.json similarity index 100% rename from test/schemas/json/v3_1/ArraySimple.json rename to test/schemas/json.schemas/v3_1/ArraySimple.json diff --git a/test/schemas/json.schemas/v3_1/ArrayUnion.json b/test/schemas/json.schemas/v3_1/ArrayUnion.json new file mode 100644 index 0000000000..a98ee8d2c8 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/ArrayUnion.json @@ -0,0 +1,40 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "ArrayUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArrayUnion.IUnion" + } + }, + "ArrayUnion.IUnion": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ArrayUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/AtomicAlias.json b/test/schemas/json.schemas/v3_1/AtomicAlias.json similarity index 100% rename from test/schemas/json/v3_1/AtomicAlias.json rename to test/schemas/json.schemas/v3_1/AtomicAlias.json diff --git a/test/schemas/json/v3_1/AtomicClass.json b/test/schemas/json.schemas/v3_1/AtomicClass.json similarity index 100% rename from test/schemas/json/v3_1/AtomicClass.json rename to test/schemas/json.schemas/v3_1/AtomicClass.json diff --git a/test/schemas/json/v3_1/AtomicIntersection.json b/test/schemas/json.schemas/v3_1/AtomicIntersection.json similarity index 100% rename from test/schemas/json/v3_1/AtomicIntersection.json rename to test/schemas/json.schemas/v3_1/AtomicIntersection.json diff --git a/test/schemas/json/v3_1/AtomicSimple.json b/test/schemas/json.schemas/v3_1/AtomicSimple.json similarity index 100% rename from test/schemas/json/v3_1/AtomicSimple.json rename to test/schemas/json.schemas/v3_1/AtomicSimple.json diff --git a/test/schemas/json/v3_1/AtomicUnion.json b/test/schemas/json.schemas/v3_1/AtomicUnion.json similarity index 100% rename from test/schemas/json/v3_1/AtomicUnion.json rename to test/schemas/json.schemas/v3_1/AtomicUnion.json diff --git a/test/schemas/json/v3_1/ClassGetter.json b/test/schemas/json.schemas/v3_1/ClassGetter.json similarity index 100% rename from test/schemas/json/v3_1/ClassGetter.json rename to test/schemas/json.schemas/v3_1/ClassGetter.json diff --git a/test/schemas/json/v3_1/ClassMethod.json b/test/schemas/json.schemas/v3_1/ClassMethod.json similarity index 100% rename from test/schemas/json/v3_1/ClassMethod.json rename to test/schemas/json.schemas/v3_1/ClassMethod.json diff --git a/test/schemas/json/v3_1/ClassPropertyAssignment.json b/test/schemas/json.schemas/v3_1/ClassPropertyAssignment.json similarity index 100% rename from test/schemas/json/v3_1/ClassPropertyAssignment.json rename to test/schemas/json.schemas/v3_1/ClassPropertyAssignment.json diff --git a/test/schemas/json/v3_1/CommentTagArray.json b/test/schemas/json.schemas/v3_1/CommentTagArray.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagArray.json rename to test/schemas/json.schemas/v3_1/CommentTagArray.json diff --git a/test/schemas/json/v3_1/CommentTagArrayUnion.json b/test/schemas/json.schemas/v3_1/CommentTagArrayUnion.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagArrayUnion.json rename to test/schemas/json.schemas/v3_1/CommentTagArrayUnion.json diff --git a/test/schemas/json/v3_1/CommentTagAtomicUnion.json b/test/schemas/json.schemas/v3_1/CommentTagAtomicUnion.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagAtomicUnion.json rename to test/schemas/json.schemas/v3_1/CommentTagAtomicUnion.json diff --git a/test/schemas/json/v3_1/CommentTagDefault.json b/test/schemas/json.schemas/v3_1/CommentTagDefault.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagDefault.json rename to test/schemas/json.schemas/v3_1/CommentTagDefault.json diff --git a/test/schemas/json/v3_1/CommentTagFormat.json b/test/schemas/json.schemas/v3_1/CommentTagFormat.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagFormat.json rename to test/schemas/json.schemas/v3_1/CommentTagFormat.json diff --git a/test/schemas/json/v3_1/CommentTagLength.json b/test/schemas/json.schemas/v3_1/CommentTagLength.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagLength.json rename to test/schemas/json.schemas/v3_1/CommentTagLength.json diff --git a/test/schemas/json/v3_1/CommentTagObjectUnion.json b/test/schemas/json.schemas/v3_1/CommentTagObjectUnion.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagObjectUnion.json rename to test/schemas/json.schemas/v3_1/CommentTagObjectUnion.json diff --git a/test/schemas/json/v3_1/CommentTagPattern.json b/test/schemas/json.schemas/v3_1/CommentTagPattern.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagPattern.json rename to test/schemas/json.schemas/v3_1/CommentTagPattern.json diff --git a/test/schemas/json/v3_1/CommentTagRange.json b/test/schemas/json.schemas/v3_1/CommentTagRange.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagRange.json rename to test/schemas/json.schemas/v3_1/CommentTagRange.json diff --git a/test/schemas/json/v3_1/CommentTagType.json b/test/schemas/json.schemas/v3_1/CommentTagType.json similarity index 100% rename from test/schemas/json/v3_1/CommentTagType.json rename to test/schemas/json.schemas/v3_1/CommentTagType.json diff --git a/test/schemas/json/v3_1/ConstantAtomicAbsorbed.json b/test/schemas/json.schemas/v3_1/ConstantAtomicAbsorbed.json similarity index 100% rename from test/schemas/json/v3_1/ConstantAtomicAbsorbed.json rename to test/schemas/json.schemas/v3_1/ConstantAtomicAbsorbed.json diff --git a/test/schemas/json/v3_1/ConstantAtomicSimple.json b/test/schemas/json.schemas/v3_1/ConstantAtomicSimple.json similarity index 100% rename from test/schemas/json/v3_1/ConstantAtomicSimple.json rename to test/schemas/json.schemas/v3_1/ConstantAtomicSimple.json diff --git a/test/schemas/json/v3_1/ConstantAtomicTagged.json b/test/schemas/json.schemas/v3_1/ConstantAtomicTagged.json similarity index 100% rename from test/schemas/json/v3_1/ConstantAtomicTagged.json rename to test/schemas/json.schemas/v3_1/ConstantAtomicTagged.json diff --git a/test/schemas/json/v3_1/ConstantAtomicUnion.json b/test/schemas/json.schemas/v3_1/ConstantAtomicUnion.json similarity index 100% rename from test/schemas/json/v3_1/ConstantAtomicUnion.json rename to test/schemas/json.schemas/v3_1/ConstantAtomicUnion.json diff --git a/test/schemas/json/v3_1/ConstantAtomicWrapper.json b/test/schemas/json.schemas/v3_1/ConstantAtomicWrapper.json similarity index 100% rename from test/schemas/json/v3_1/ConstantAtomicWrapper.json rename to test/schemas/json.schemas/v3_1/ConstantAtomicWrapper.json diff --git a/test/schemas/json/v3_1/ConstantConstEnumeration.json b/test/schemas/json.schemas/v3_1/ConstantConstEnumeration.json similarity index 100% rename from test/schemas/json/v3_1/ConstantConstEnumeration.json rename to test/schemas/json.schemas/v3_1/ConstantConstEnumeration.json diff --git a/test/schemas/json/v3_1/ConstantEnumeration.json b/test/schemas/json.schemas/v3_1/ConstantEnumeration.json similarity index 100% rename from test/schemas/json/v3_1/ConstantEnumeration.json rename to test/schemas/json.schemas/v3_1/ConstantEnumeration.json diff --git a/test/schemas/json/v3_1/ConstantIntersection.json b/test/schemas/json.schemas/v3_1/ConstantIntersection.json similarity index 100% rename from test/schemas/json/v3_1/ConstantIntersection.json rename to test/schemas/json.schemas/v3_1/ConstantIntersection.json diff --git a/test/schemas/json.schemas/v3_1/DynamicArray.json b/test/schemas/json.schemas/v3_1/DynamicArray.json new file mode 100644 index 0000000000..1cfbfc582f --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicArray.json @@ -0,0 +1,31 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicArray": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicArray" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicComposite.json b/test/schemas/json.schemas/v3_1/DynamicComposite.json similarity index 100% rename from test/schemas/json/v3_1/DynamicComposite.json rename to test/schemas/json.schemas/v3_1/DynamicComposite.json diff --git a/test/schemas/json/v3_1/DynamicConstant.json b/test/schemas/json.schemas/v3_1/DynamicConstant.json similarity index 100% rename from test/schemas/json/v3_1/DynamicConstant.json rename to test/schemas/json.schemas/v3_1/DynamicConstant.json diff --git a/test/schemas/json.schemas/v3_1/DynamicEnumeration.json b/test/schemas/json.schemas/v3_1/DynamicEnumeration.json new file mode 100644 index 0000000000..994eeddddd --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicEnumeration.json @@ -0,0 +1,56 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicEnumeration": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicEnumeration" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/DynamicNever.json b/test/schemas/json.schemas/v3_1/DynamicNever.json new file mode 100644 index 0000000000..fb210620c3 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicNever.json @@ -0,0 +1,17 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicNever": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicNever" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/DynamicSimple.json b/test/schemas/json.schemas/v3_1/DynamicSimple.json new file mode 100644 index 0000000000..74595ba4d2 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicSimple.json @@ -0,0 +1,28 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicSimple": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicSimple" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/DynamicTemplate.json b/test/schemas/json.schemas/v3_1/DynamicTemplate.json new file mode 100644 index 0000000000..c88b4d7d9b --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicTemplate.json @@ -0,0 +1,30 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicTemplate": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicTemplate" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/DynamicTree.json b/test/schemas/json.schemas/v3_1/DynamicTree.json new file mode 100644 index 0000000000..ef3a8e5f11 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicTree.json @@ -0,0 +1,40 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/components/schemas/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "$ref": "#/components/schemas/DynamicTree" + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicTree" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/DynamicUndefined.json b/test/schemas/json.schemas/v3_1/DynamicUndefined.json new file mode 100644 index 0000000000..177b109816 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicUndefined.json @@ -0,0 +1,17 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicUndefined": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicUndefined" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/DynamicUnion.json b/test/schemas/json.schemas/v3_1/DynamicUnion.json new file mode 100644 index 0000000000..3cbe19dfe7 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/DynamicUnion.json @@ -0,0 +1,27 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "DynamicUnion": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/DynamicUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectAlias.json b/test/schemas/json.schemas/v3_1/ObjectAlias.json similarity index 100% rename from test/schemas/json/v3_1/ObjectAlias.json rename to test/schemas/json.schemas/v3_1/ObjectAlias.json diff --git a/test/schemas/json/v3_1/ObjectDate.json b/test/schemas/json.schemas/v3_1/ObjectDate.json similarity index 100% rename from test/schemas/json/v3_1/ObjectDate.json rename to test/schemas/json.schemas/v3_1/ObjectDate.json diff --git a/test/schemas/json/v3_1/ObjectDescription.json b/test/schemas/json.schemas/v3_1/ObjectDescription.json similarity index 100% rename from test/schemas/json/v3_1/ObjectDescription.json rename to test/schemas/json.schemas/v3_1/ObjectDescription.json diff --git a/test/schemas/json.schemas/v3_1/ObjectDynamic.json b/test/schemas/json.schemas/v3_1/ObjectDynamic.json new file mode 100644 index 0000000000..a0fcd0d88c --- /dev/null +++ b/test/schemas/json.schemas/v3_1/ObjectDynamic.json @@ -0,0 +1,30 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "ObjectDynamic": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectDynamic" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectGeneric.json b/test/schemas/json.schemas/v3_1/ObjectGeneric.json similarity index 100% rename from test/schemas/json/v3_1/ObjectGeneric.json rename to test/schemas/json.schemas/v3_1/ObjectGeneric.json diff --git a/test/schemas/json/v3_1/ObjectGenericAlias.json b/test/schemas/json.schemas/v3_1/ObjectGenericAlias.json similarity index 100% rename from test/schemas/json/v3_1/ObjectGenericAlias.json rename to test/schemas/json.schemas/v3_1/ObjectGenericAlias.json diff --git a/test/schemas/json/v3_1/ObjectGenericArray.json b/test/schemas/json.schemas/v3_1/ObjectGenericArray.json similarity index 100% rename from test/schemas/json/v3_1/ObjectGenericArray.json rename to test/schemas/json.schemas/v3_1/ObjectGenericArray.json diff --git a/test/schemas/json/v3_1/ObjectGenericUnion.json b/test/schemas/json.schemas/v3_1/ObjectGenericUnion.json similarity index 100% rename from test/schemas/json/v3_1/ObjectGenericUnion.json rename to test/schemas/json.schemas/v3_1/ObjectGenericUnion.json diff --git a/test/schemas/json/v3_1/ObjectHierarchical.json b/test/schemas/json.schemas/v3_1/ObjectHierarchical.json similarity index 100% rename from test/schemas/json/v3_1/ObjectHierarchical.json rename to test/schemas/json.schemas/v3_1/ObjectHierarchical.json diff --git a/test/schemas/json/v3_1/ObjectInternal.json b/test/schemas/json.schemas/v3_1/ObjectInternal.json similarity index 100% rename from test/schemas/json/v3_1/ObjectInternal.json rename to test/schemas/json.schemas/v3_1/ObjectInternal.json diff --git a/test/schemas/json/v3_1/ObjectIntersection.json b/test/schemas/json.schemas/v3_1/ObjectIntersection.json similarity index 100% rename from test/schemas/json/v3_1/ObjectIntersection.json rename to test/schemas/json.schemas/v3_1/ObjectIntersection.json diff --git a/test/schemas/json/v3_1/ObjectJsonTag.json b/test/schemas/json.schemas/v3_1/ObjectJsonTag.json similarity index 100% rename from test/schemas/json/v3_1/ObjectJsonTag.json rename to test/schemas/json.schemas/v3_1/ObjectJsonTag.json diff --git a/test/schemas/json/v3_1/ObjectLiteralProperty.json b/test/schemas/json.schemas/v3_1/ObjectLiteralProperty.json similarity index 100% rename from test/schemas/json/v3_1/ObjectLiteralProperty.json rename to test/schemas/json.schemas/v3_1/ObjectLiteralProperty.json diff --git a/test/schemas/json/v3_1/ObjectLiteralType.json b/test/schemas/json.schemas/v3_1/ObjectLiteralType.json similarity index 100% rename from test/schemas/json/v3_1/ObjectLiteralType.json rename to test/schemas/json.schemas/v3_1/ObjectLiteralType.json diff --git a/test/schemas/json/v3_1/ObjectNullable.json b/test/schemas/json.schemas/v3_1/ObjectNullable.json similarity index 100% rename from test/schemas/json/v3_1/ObjectNullable.json rename to test/schemas/json.schemas/v3_1/ObjectNullable.json diff --git a/test/schemas/json.schemas/v3_1/ObjectOptional.json b/test/schemas/json.schemas/v3_1/ObjectOptional.json new file mode 100644 index 0000000000..bcd5f8ee09 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/ObjectOptional.json @@ -0,0 +1,30 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "ObjectOptional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/ObjectOptional" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json.schemas/v3_1/ObjectPartial.json b/test/schemas/json.schemas/v3_1/ObjectPartial.json new file mode 100644 index 0000000000..78ef6ede81 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/ObjectPartial.json @@ -0,0 +1,81 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "PartialObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ObjectPartial.IBase" + } + ] + } + }, + "required": [], + "description": "Make all properties in T optional" + }, + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/PartialObjectPartial.IBase" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectPartialAndRequired.json b/test/schemas/json.schemas/v3_1/ObjectPartialAndRequired.json similarity index 100% rename from test/schemas/json/v3_1/ObjectPartialAndRequired.json rename to test/schemas/json.schemas/v3_1/ObjectPartialAndRequired.json diff --git a/test/schemas/json/v3_1/ObjectPrimitive.json b/test/schemas/json.schemas/v3_1/ObjectPrimitive.json similarity index 100% rename from test/schemas/json/v3_1/ObjectPrimitive.json rename to test/schemas/json.schemas/v3_1/ObjectPrimitive.json diff --git a/test/schemas/json/v3_1/ObjectPropertyNullable.json b/test/schemas/json.schemas/v3_1/ObjectPropertyNullable.json similarity index 100% rename from test/schemas/json/v3_1/ObjectPropertyNullable.json rename to test/schemas/json.schemas/v3_1/ObjectPropertyNullable.json diff --git a/test/schemas/json/v3_1/ObjectRecursive.json b/test/schemas/json.schemas/v3_1/ObjectRecursive.json similarity index 100% rename from test/schemas/json/v3_1/ObjectRecursive.json rename to test/schemas/json.schemas/v3_1/ObjectRecursive.json diff --git a/test/schemas/json.schemas/v3_1/ObjectRequired.json b/test/schemas/json.schemas/v3_1/ObjectRequired.json new file mode 100644 index 0000000000..666ba69fae --- /dev/null +++ b/test/schemas/json.schemas/v3_1/ObjectRequired.json @@ -0,0 +1,81 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "RequiredObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required" + }, + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ObjectRequired.IBase" + } + ] + } + }, + "required": [] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/RequiredObjectRequired.IBase" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectSimple.json b/test/schemas/json.schemas/v3_1/ObjectSimple.json similarity index 100% rename from test/schemas/json/v3_1/ObjectSimple.json rename to test/schemas/json.schemas/v3_1/ObjectSimple.json diff --git a/test/schemas/json/v3_1/ObjectTuple.json b/test/schemas/json.schemas/v3_1/ObjectTuple.json similarity index 100% rename from test/schemas/json/v3_1/ObjectTuple.json rename to test/schemas/json.schemas/v3_1/ObjectTuple.json diff --git a/test/schemas/json/v3_1/ObjectUndefined.json b/test/schemas/json.schemas/v3_1/ObjectUndefined.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUndefined.json rename to test/schemas/json.schemas/v3_1/ObjectUndefined.json diff --git a/test/schemas/json/v3_1/ObjectUnionComposite.json b/test/schemas/json.schemas/v3_1/ObjectUnionComposite.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionComposite.json rename to test/schemas/json.schemas/v3_1/ObjectUnionComposite.json diff --git a/test/schemas/json/v3_1/ObjectUnionCompositePointer.json b/test/schemas/json.schemas/v3_1/ObjectUnionCompositePointer.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionCompositePointer.json rename to test/schemas/json.schemas/v3_1/ObjectUnionCompositePointer.json diff --git a/test/schemas/json/v3_1/ObjectUnionDouble.json b/test/schemas/json.schemas/v3_1/ObjectUnionDouble.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionDouble.json rename to test/schemas/json.schemas/v3_1/ObjectUnionDouble.json diff --git a/test/schemas/json/v3_1/ObjectUnionExplicit.json b/test/schemas/json.schemas/v3_1/ObjectUnionExplicit.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionExplicit.json rename to test/schemas/json.schemas/v3_1/ObjectUnionExplicit.json diff --git a/test/schemas/json/v3_1/ObjectUnionExplicitPointer.json b/test/schemas/json.schemas/v3_1/ObjectUnionExplicitPointer.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionExplicitPointer.json rename to test/schemas/json.schemas/v3_1/ObjectUnionExplicitPointer.json diff --git a/test/schemas/json/v3_1/ObjectUnionImplicit.json b/test/schemas/json.schemas/v3_1/ObjectUnionImplicit.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionImplicit.json rename to test/schemas/json.schemas/v3_1/ObjectUnionImplicit.json diff --git a/test/schemas/json/v3_1/ObjectUnionNonPredictable.json b/test/schemas/json.schemas/v3_1/ObjectUnionNonPredictable.json similarity index 100% rename from test/schemas/json/v3_1/ObjectUnionNonPredictable.json rename to test/schemas/json.schemas/v3_1/ObjectUnionNonPredictable.json diff --git a/test/schemas/json/v3_1/TemplateAtomic.json b/test/schemas/json.schemas/v3_1/TemplateAtomic.json similarity index 100% rename from test/schemas/json/v3_1/TemplateAtomic.json rename to test/schemas/json.schemas/v3_1/TemplateAtomic.json diff --git a/test/schemas/json/v3_1/TemplateConstant.json b/test/schemas/json.schemas/v3_1/TemplateConstant.json similarity index 100% rename from test/schemas/json/v3_1/TemplateConstant.json rename to test/schemas/json.schemas/v3_1/TemplateConstant.json diff --git a/test/schemas/json/v3_1/TemplateUnion.json b/test/schemas/json.schemas/v3_1/TemplateUnion.json similarity index 100% rename from test/schemas/json/v3_1/TemplateUnion.json rename to test/schemas/json.schemas/v3_1/TemplateUnion.json diff --git a/test/schemas/json/v3_1/ToJsonArray.json b/test/schemas/json.schemas/v3_1/ToJsonArray.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonArray.json rename to test/schemas/json.schemas/v3_1/ToJsonArray.json diff --git a/test/schemas/json/v3_1/ToJsonAtomicSimple.json b/test/schemas/json.schemas/v3_1/ToJsonAtomicSimple.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonAtomicSimple.json rename to test/schemas/json.schemas/v3_1/ToJsonAtomicSimple.json diff --git a/test/schemas/json/v3_1/ToJsonAtomicUnion.json b/test/schemas/json.schemas/v3_1/ToJsonAtomicUnion.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonAtomicUnion.json rename to test/schemas/json.schemas/v3_1/ToJsonAtomicUnion.json diff --git a/test/schemas/json/v3_1/ToJsonDouble.json b/test/schemas/json.schemas/v3_1/ToJsonDouble.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonDouble.json rename to test/schemas/json.schemas/v3_1/ToJsonDouble.json diff --git a/test/schemas/json/v3_1/ToJsonNull.json b/test/schemas/json.schemas/v3_1/ToJsonNull.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonNull.json rename to test/schemas/json.schemas/v3_1/ToJsonNull.json diff --git a/test/schemas/json/v3_1/ToJsonTuple.json b/test/schemas/json.schemas/v3_1/ToJsonTuple.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonTuple.json rename to test/schemas/json.schemas/v3_1/ToJsonTuple.json diff --git a/test/schemas/json/v3_1/ToJsonUnion.json b/test/schemas/json.schemas/v3_1/ToJsonUnion.json similarity index 100% rename from test/schemas/json/v3_1/ToJsonUnion.json rename to test/schemas/json.schemas/v3_1/ToJsonUnion.json diff --git a/test/schemas/json/v3_1/TupleHierarchical.json b/test/schemas/json.schemas/v3_1/TupleHierarchical.json similarity index 100% rename from test/schemas/json/v3_1/TupleHierarchical.json rename to test/schemas/json.schemas/v3_1/TupleHierarchical.json diff --git a/test/schemas/json/v3_1/TupleRestArray.json b/test/schemas/json.schemas/v3_1/TupleRestArray.json similarity index 100% rename from test/schemas/json/v3_1/TupleRestArray.json rename to test/schemas/json.schemas/v3_1/TupleRestArray.json diff --git a/test/schemas/json/v3_1/TupleRestAtomic.json b/test/schemas/json.schemas/v3_1/TupleRestAtomic.json similarity index 100% rename from test/schemas/json/v3_1/TupleRestAtomic.json rename to test/schemas/json.schemas/v3_1/TupleRestAtomic.json diff --git a/test/schemas/json/v3_1/TupleRestObject.json b/test/schemas/json.schemas/v3_1/TupleRestObject.json similarity index 100% rename from test/schemas/json/v3_1/TupleRestObject.json rename to test/schemas/json.schemas/v3_1/TupleRestObject.json diff --git a/test/schemas/json/v3_1/TypeTagArray.json b/test/schemas/json.schemas/v3_1/TypeTagArray.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagArray.json rename to test/schemas/json.schemas/v3_1/TypeTagArray.json diff --git a/test/schemas/json/v3_1/TypeTagArrayUnion.json b/test/schemas/json.schemas/v3_1/TypeTagArrayUnion.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagArrayUnion.json rename to test/schemas/json.schemas/v3_1/TypeTagArrayUnion.json diff --git a/test/schemas/json/v3_1/TypeTagAtomicUnion.json b/test/schemas/json.schemas/v3_1/TypeTagAtomicUnion.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagAtomicUnion.json rename to test/schemas/json.schemas/v3_1/TypeTagAtomicUnion.json diff --git a/test/schemas/json/v3_1/TypeTagCustom.json b/test/schemas/json.schemas/v3_1/TypeTagCustom.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagCustom.json rename to test/schemas/json.schemas/v3_1/TypeTagCustom.json diff --git a/test/schemas/json.schemas/v3_1/TypeTagDefault.json b/test/schemas/json.schemas/v3_1/TypeTagDefault.json new file mode 100644 index 0000000000..03fd447c59 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/TypeTagDefault.json @@ -0,0 +1,114 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "TypeTagDefault": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/TypeTagDefault" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_1/TypeTagFormat.json b/test/schemas/json.schemas/v3_1/TypeTagFormat.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagFormat.json rename to test/schemas/json.schemas/v3_1/TypeTagFormat.json diff --git a/test/schemas/json/v3_1/TypeTagLength.json b/test/schemas/json.schemas/v3_1/TypeTagLength.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagLength.json rename to test/schemas/json.schemas/v3_1/TypeTagLength.json diff --git a/test/schemas/json/v3_1/TypeTagMatrix.json b/test/schemas/json.schemas/v3_1/TypeTagMatrix.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagMatrix.json rename to test/schemas/json.schemas/v3_1/TypeTagMatrix.json diff --git a/test/schemas/json/v3_1/TypeTagObjectUnion.json b/test/schemas/json.schemas/v3_1/TypeTagObjectUnion.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagObjectUnion.json rename to test/schemas/json.schemas/v3_1/TypeTagObjectUnion.json diff --git a/test/schemas/json/v3_1/TypeTagPattern.json b/test/schemas/json.schemas/v3_1/TypeTagPattern.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagPattern.json rename to test/schemas/json.schemas/v3_1/TypeTagPattern.json diff --git a/test/schemas/json/v3_1/TypeTagRange.json b/test/schemas/json.schemas/v3_1/TypeTagRange.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagRange.json rename to test/schemas/json.schemas/v3_1/TypeTagRange.json diff --git a/test/schemas/json/v3_1/TypeTagTuple.json b/test/schemas/json.schemas/v3_1/TypeTagTuple.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagTuple.json rename to test/schemas/json.schemas/v3_1/TypeTagTuple.json diff --git a/test/schemas/json/v3_1/TypeTagType.json b/test/schemas/json.schemas/v3_1/TypeTagType.json similarity index 100% rename from test/schemas/json/v3_1/TypeTagType.json rename to test/schemas/json.schemas/v3_1/TypeTagType.json diff --git a/test/schemas/json.schemas/v3_1/UltimateUnion.json b/test/schemas/json.schemas/v3_1/UltimateUnion.json new file mode 100644 index 0000000000..494a058584 --- /dev/null +++ b/test/schemas/json.schemas/v3_1/UltimateUnion.json @@ -0,0 +1,1107 @@ +{ + "version": "3.1", + "components": { + "schemas": { + "UltimateUnion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IJsonSchemaCollection.IV3_1Arrayunknown" + } + }, + "IJsonSchemaCollection.IV3_1Arrayunknown": { + "type": "object", + "properties": { + "version": { + "const": "3.1" + }, + "components": { + "$ref": "#/components/schemas/OpenApi.IComponents" + }, + "schemas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema" + } + }, + "__types": { + "type": "array", + "items": {} + } + }, + "required": [ + "version", + "components", + "schemas" + ] + }, + "OpenApi.IComponents": { + "type": "object", + "properties": { + "schemas": { + "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", + "title": "An object to hold reusable DTO schemas", + "description": "An object to hold reusable DTO schemas.\n\nIn other words, a collection of named JSON schemas." + }, + "securitySchemes": { + "$ref": "#/components/schemas/RecordstringOpenApi.ISecurityScheme", + "title": "An object to hold reusable security schemes", + "description": "An object to hold reusable security schemes.\n\nIn other words, a collection of named security schemes." + } + }, + "required": [], + "description": "Reusable components in OpenAPI.\n\nA storage of reusable components in OpenAPI document.\n\nIn other words, it is a storage of named DTO schemas and security schemes." + }, + "RecordstringOpenApi.IJsonSchema": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema" + } + }, + "OpenApi.IJsonSchema": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ], + "title": "Type schema info", + "description": "Type schema info.\n\n`OpenApi.IJsonSchema` is a type schema info of the OpenAPI.\n\n`OpenApi.IJsonSchema` basically follows the JSON schema definition of\nOpenAPI v3.1, but a little bit shrinked to remove ambiguous and duplicated\nexpressions of OpenAPI v3.1 for the convenience and clarity.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Array type utilizes only single {@link OpenAPI.IJsonSchema.IArray.items}\n- Tuple type utilizes only {@link OpenApi.IJsonSchema.ITuple.prefixItems}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link OpenApi.IJsonSchema.IObject}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAnyOf} to {@link OpenApi.IJsonSchema.IOneOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link OpenApi.IJsonSchema.IReference}" + }, + "OpenApi.IJsonSchema.IString": { + "type": "object", + "properties": { + "default": { + "type": "string", + "title": "Default value", + "description": "Default value." + }, + "format": { + "type": "string", + "title": "Format restriction", + "description": "Format restriction." + }, + "pattern": { + "type": "string", + "title": "Pattern restriction", + "description": "Pattern restriction." + }, + "contentMediaType": { + "type": "string", + "title": "Content media type restriction", + "description": "Content media type restriction." + }, + "minLength": { + "type": "integer", + "title": "Minimum length restriction", + "description": "Minimum length restriction." + }, + "maxLength": { + "type": "integer", + "title": "Maximum length restriction", + "description": "Maximum length restriction." + }, + "type": { + "const": "string", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "String type info." + }, + "Recordstringany": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": {} + }, + "OpenApi.IJsonSchema.INumber": { + "type": "object", + "properties": { + "default": { + "type": "number", + "title": "Default value", + "description": "Default value." + }, + "minimum": { + "type": "number", + "title": "Minimum value restriction", + "description": "Minimum value restriction." + }, + "maximum": { + "type": "number", + "title": "Maximum value restriction", + "description": "Maximum value restriction." + }, + "exclusiveMinimum": { + "type": "boolean", + "title": "Exclusive minimum value restriction", + "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." + }, + "exclusiveMaximum": { + "type": "boolean", + "title": "Exclusive maximum value restriction", + "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": true, + "minimum": 0, + "title": "Multiple of value restriction", + "description": "Multiple of value restriction." + }, + "type": { + "const": "number", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Number (double) type info." + }, + "OpenApi.IJsonSchema.IConstant": { + "type": "object", + "properties": { + "const": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "title": "The constant value", + "description": "The constant value." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "const" + ], + "description": "Constant value type." + }, + "OpenApi.IJsonSchema.IBoolean": { + "type": "object", + "properties": { + "default": { + "type": "boolean", + "title": "The default value", + "description": "The default value." + }, + "type": { + "const": "boolean", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Boolean type info." + }, + "OpenApi.IJsonSchema.IInteger": { + "type": "object", + "properties": { + "default": { + "type": "integer", + "title": "Default value", + "description": "Default value." + }, + "minimum": { + "type": "integer", + "title": "Minimum value restriction", + "description": "Minimum value restriction." + }, + "maximum": { + "type": "integer", + "title": "Maximum value restriction", + "description": "Maximum value restriction." + }, + "exclusiveMinimum": { + "type": "boolean", + "title": "Exclusive minimum value restriction", + "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." + }, + "exclusiveMaximum": { + "type": "boolean", + "title": "Exclusive maximum value restriction", + "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." + }, + "multipleOf": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 0, + "title": "Multiple of value restriction", + "description": "Multiple of value restriction." + }, + "type": { + "const": "integer", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Integer type info." + }, + "OpenApi.IJsonSchema.IArray": { + "type": "object", + "properties": { + "items": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema", + "title": "Items type info", + "description": "Items type info.\n\nThe `items` means the type of the array elements. In other words, it is\nthe type schema info of the `T` in the TypeScript array type `Array`." + }, + "uniqueItems": { + "type": "boolean", + "title": "Unique items restriction", + "description": "Unique items restriction.\n\nIf this property value is `true`, target array must have unique items." + }, + "minItems": { + "type": "integer", + "title": "Minimum items restriction", + "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the array." + }, + "maxItems": { + "type": "integer", + "title": "Maximum items restriction", + "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the array." + }, + "type": { + "const": "array", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "items", + "type" + ], + "description": "Array type info." + }, + "OpenApi.IJsonSchema.ITuple": { + "type": "object", + "properties": { + "prefixItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema" + }, + "title": "Prefix items", + "description": "Prefix items.\n\nThe `prefixItems` means the type schema info of the prefix items in the\ntuple type. In the TypeScript, it is expressed as `[T1, T2]`.\n\nIf you want to express `[T1, T2, ...TO[]]` type, you can configure the\n`...TO[]` through the {@link additionalItems} property." + }, + "additionalItems": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ], + "title": "Additional items", + "description": "Additional items.\n\nThe `additionalItems` means the type schema info of the additional items\nafter the {@link prefixItems}. In the TypeScript, if there's a type\n`[T1, T2, ...TO[]]`, the `...TO[]` is represented by the `additionalItems`.\n\nBy the way, if you configure the `additionalItems` as `true`, it means\nthe additional items are not restricted. They can be any type, so that\nit is equivalent to the TypeScript type `[T1, T2, ...any[]]`.\n\nOtherwise configure the `additionalItems` as the {@link IJsonSchema},\nit means the additional items must follow the type schema info.\nTherefore, it is equivalent to the TypeScript type `[T1, T2, ...TO[]]`." + }, + "uniqueItems": { + "type": "boolean", + "title": "Unique items restriction", + "description": "Unique items restriction.\n\nIf this property value is `true`, target tuple must have unique items." + }, + "minItems": { + "type": "integer", + "title": "Minimum items restriction", + "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the tuple." + }, + "maxItems": { + "type": "integer", + "title": "Maximum items restriction", + "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the tuple." + }, + "type": { + "const": "array", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "prefixItems", + "type" + ], + "description": "Tuple type info." + }, + "OpenApi.IJsonSchema.IObject": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", + "title": "Properties of the object", + "description": "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's\nregular properties. The key is the name of the regular property,\nand the value is the type schema info.\n\nIf you need additional properties that is represented by dynamic key,\nyou can use the {@link additionalProperties} instead." + }, + "additionalProperties": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ], + "title": "Additional properties' info", + "description": "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nIf the value is `true`, it means that the additional properties are not\nrestricted. They can be any type. Otherwise, if the value is\n{@link IOpenAiSchema} type, it means that the additional properties must\nfollow the type schema info.\n\n- `true`: `Record`\n- `IOpenAiSchema`: `Record`" + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of key values of the required properties", + "description": "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```" + }, + "type": { + "const": "object", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Object type info." + }, + "OpenApi.IJsonSchema.IReferencestring": { + "type": "object", + "properties": { + "$ref": { + "type": "string", + "title": "Reference to the named schema", + "description": "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/components/schemas/` which means the type is stored in\nthe {@link OpenApi.IComponents.schemas} object.\n\n- `#/components/schemas/SomeObject`\n- `#/components/schemas/AnotherObject`" + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "$ref" + ], + "description": "Reference type directing named schema." + }, + "OpenApi.IJsonSchema.IOneOf": { + "type": "object", + "properties": { + "oneOf": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArray" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITuple" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObject" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" + }, + { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" + } + ] + }, + "title": "List of the union types", + "description": "List of the union types." + }, + "discriminator": { + "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf.IDiscriminator", + "title": "Discriminator info of the union type", + "description": "Discriminator info of the union type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "oneOf" + ], + "description": "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly\nconverts it to `oneOf` type." + }, + "OpenApi.IJsonSchema.INull": { + "type": "object", + "properties": { + "default": { + "type": "null", + "title": "Default value", + "description": "Default value." + }, + "type": { + "const": "null", + "title": "Discriminator value of the type", + "description": "Discriminator value of the type." + }, + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [ + "type" + ], + "description": "Null type." + }, + "OpenApi.IJsonSchema.IUnknown": { + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "Title of the schema", + "description": "Title of the schema." + }, + "description": { + "type": "string", + "title": "Detailed description of the schema", + "description": "Detailed description of the schema." + }, + "deprecated": { + "type": "boolean", + "title": "Whether the type is deprecated or not", + "description": "Whether the type is deprecated or not." + }, + "example": { + "title": "Example value", + "description": "Example value." + }, + "examples": { + "$ref": "#/components/schemas/Recordstringany", + "title": "List of example values as key-value pairs", + "description": "List of example values as key-value pairs." + } + }, + "required": [], + "description": "Unknown, the `any` type." + }, + "OpenApi.IJsonSchema.IOneOf.IDiscriminator": { + "type": "object", + "properties": { + "propertyName": { + "type": "string", + "title": "Property name for the discriminator", + "description": "Property name for the discriminator." + }, + "mapping": { + "$ref": "#/components/schemas/Recordstringstring", + "title": "Mapping of the discriminator value to the schema name", + "description": "Mapping of the discriminator value to the schema name.\n\nThis property is valid only for {@link IReference} typed\n{@link IOneOf.oneof} elements. Therefore, `key` of `mapping` is\nthe discriminator value, and `value` of `mapping` is the\nschema name like `#/components/schemas/SomeObject`." + } + }, + "required": [ + "propertyName" + ], + "description": "Discriminator info of the union type." + }, + "Recordstringstring": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "type": "string" + } + }, + "RecordstringOpenApi.ISecurityScheme": { + "type": "object", + "properties": {}, + "required": [], + "description": "Construct a type with a set of properties K of type T", + "additionalProperties": { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme" + } + }, + "OpenApi.ISecurityScheme": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IApiKey" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBasic" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBearer" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2" + }, + { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOpenId" + } + ], + "title": "Security scheme of Swagger Documents", + "description": "Security scheme of Swagger Documents.\n\n`OpenApi.ISecurityScheme` is a data structure representing content of\n`securitySchemes` in `swagger.json` file. It is composed with 5 types of\nsecurity schemes as an union type like below." + }, + "OpenApi.ISecurityScheme.IApiKey": { + "type": "object", + "properties": { + "type": { + "const": "apiKey" + }, + "in": { + "oneOf": [ + { + "const": "cookie" + }, + { + "const": "header" + }, + { + "const": "query" + } + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type" + ], + "description": "Normal API key type." + }, + "OpenApi.ISecurityScheme.IHttpBasic": { + "type": "object", + "properties": { + "type": { + "const": "http" + }, + "scheme": { + "const": "basic" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "scheme" + ], + "description": "HTTP basic authentication type." + }, + "OpenApi.ISecurityScheme.IHttpBearer": { + "type": "object", + "properties": { + "type": { + "const": "http" + }, + "scheme": { + "const": "bearer" + }, + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "scheme" + ], + "description": "HTTP bearer authentication type." + }, + "OpenApi.ISecurityScheme.IOAuth2": { + "type": "object", + "properties": { + "type": { + "const": "oauth2" + }, + "flows": { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlowSet" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "flows" + ], + "description": "OAuth2 authentication type." + }, + "OpenApi.ISecurityScheme.IOAuth2.IFlowSet": { + "type": "object", + "properties": { + "authorizationCode": { + "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlow" + }, + "implicit": { + "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl" + }, + "password": { + "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" + }, + "clientCredentials": { + "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" + } + }, + "required": [] + }, + "OpenApi.ISecurityScheme.IOAuth2.IFlow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string" + }, + "tokenUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/components/schemas/Recordstringstring" + } + }, + "required": [] + }, + "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/components/schemas/Recordstringstring" + } + }, + "required": [], + "description": "Construct a type with the properties of T except for those in type K." + }, + "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/components/schemas/Recordstringstring" + } + }, + "required": [], + "description": "Construct a type with the properties of T except for those in type K." + }, + "OpenApi.ISecurityScheme.IOpenId": { + "type": "object", + "properties": { + "type": { + "const": "openIdConnect" + }, + "openIdConnectUrl": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "openIdConnectUrl" + ] + } + } + }, + "schemas": [ + { + "$ref": "#/components/schemas/UltimateUnion" + } + ] +} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayAny.json b/test/schemas/json/v3_0/ArrayAny.json deleted file mode 100644 index cb0f360f73..0000000000 --- a/test/schemas/json/v3_0/ArrayAny.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayAny": { - "type": "object", - "properties": { - "anys": { - "type": "array", - "items": {} - }, - "undefindable1": { - "type": "array", - "items": {} - }, - "undefindable2": { - "type": "array", - "items": {} - }, - "nullables1": { - "type": "array", - "items": {}, - "nullable": true - }, - "nullables2": { - "type": "array", - "items": {}, - "nullable": true - }, - "both1": { - "type": "array", - "items": {}, - "nullable": true - }, - "both2": { - "type": "array", - "items": {}, - "nullable": true - }, - "both3": { - "type": "array", - "items": {}, - "nullable": true - }, - "union": { - "type": "array", - "items": {} - } - }, - "nullable": false, - "required": [ - "anys", - "nullables1", - "nullables2", - "union" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayAny" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayHierarchical.json b/test/schemas/json/v3_0/ArrayHierarchical.json deleted file mode 100644 index 4344ced5e9..0000000000 --- a/test/schemas/json/v3_0/ArrayHierarchical.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayHierarchical": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayHierarchical.ICompany" - } - }, - "ArrayHierarchical.ICompany": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "serial": { - "type": "number" - }, - "name": { - "type": "string" - }, - "established_at": { - "$ref": "#/components/schemas/ArrayHierarchical.ITimestamp" - }, - "departments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayHierarchical.IDepartment" - } - } - }, - "nullable": false, - "required": [ - "id", - "serial", - "name", - "established_at", - "departments" - ] - }, - "ArrayHierarchical.ITimestamp": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "time", - "zone" - ] - }, - "ArrayHierarchical.IDepartment": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "sales": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ArrayHierarchical.ITimestamp" - }, - "employees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayHierarchical.IEmployee" - } - } - }, - "nullable": false, - "required": [ - "id", - "code", - "sales", - "created_at", - "employees" - ] - }, - "ArrayHierarchical.IEmployee": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "age": { - "type": "number" - }, - "grade": { - "type": "number" - }, - "employeed_at": { - "$ref": "#/components/schemas/ArrayHierarchical.ITimestamp" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "age", - "grade", - "employeed_at" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayHierarchical" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayHierarchicalPointer.json b/test/schemas/json/v3_0/ArrayHierarchicalPointer.json deleted file mode 100644 index 9c257b48b5..0000000000 --- a/test/schemas/json/v3_0/ArrayHierarchicalPointer.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayHierarchicalPointer": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayHierarchicalPointer.ICompany" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ArrayHierarchicalPointer.ICompany": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "serial": { - "type": "number" - }, - "name": { - "type": "string" - }, - "established_at": { - "$ref": "#/components/schemas/ArrayHierarchicalPointer.ITimestamp" - }, - "departments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayHierarchicalPointer.IDepartment" - } - } - }, - "nullable": false, - "required": [ - "id", - "serial", - "name", - "established_at", - "departments" - ] - }, - "ArrayHierarchicalPointer.ITimestamp": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "time", - "zone" - ] - }, - "ArrayHierarchicalPointer.IDepartment": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "sales": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ArrayHierarchicalPointer.ITimestamp" - }, - "employees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayHierarchicalPointer.IEmployee" - } - } - }, - "nullable": false, - "required": [ - "id", - "code", - "sales", - "created_at", - "employees" - ] - }, - "ArrayHierarchicalPointer.IEmployee": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "age": { - "type": "number" - }, - "grade": { - "type": "number" - }, - "employeed_at": { - "$ref": "#/components/schemas/ArrayHierarchicalPointer.ITimestamp" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "age", - "grade", - "employeed_at" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayHierarchicalPointer" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRecursive.json b/test/schemas/json/v3_0/ArrayRecursive.json deleted file mode 100644 index 0685497e3f..0000000000 --- a/test/schemas/json/v3_0/ArrayRecursive.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRecursive.ICategory": { - "type": "object", - "properties": { - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursive.ICategory" - } - }, - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ArrayRecursive.ITimestamp" - } - }, - "nullable": false, - "required": [ - "children", - "id", - "code", - "sequence", - "created_at" - ] - }, - "ArrayRecursive.ITimestamp": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "time", - "zone" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRecursive.ICategory" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRecursiveUnionExplicit.json b/test/schemas/json/v3_0/ArrayRecursiveUnionExplicit.json deleted file mode 100644 index 470a1a65cb..0000000000 --- a/test/schemas/json/v3_0/ArrayRecursiveUnionExplicit.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRecursiveUnionExplicit": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IBucket" - } - }, - "ArrayRecursiveUnionExplicit.IBucket": { - "oneOf": [ - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IDirectory" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IImageFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.ITextFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IZipFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IShortcut" - } - ] - }, - "ArrayRecursiveUnionExplicit.IDirectory": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IBucket" - } - }, - "type": { - "type": "string", - "enum": [ - "directory" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "children", - "type" - ] - }, - "ArrayRecursiveUnionExplicit.IImageFile": { - "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" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "width", - "height", - "url", - "size", - "type", - "extension" - ] - }, - "ArrayRecursiveUnionExplicit.ITextFile": { - "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" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "size", - "content", - "type", - "extension" - ] - }, - "ArrayRecursiveUnionExplicit.IZipFile": { - "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" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "size", - "count", - "type", - "extension" - ] - }, - "ArrayRecursiveUnionExplicit.IShortcut": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "target": { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit.IBucket" - }, - "type": { - "type": "string", - "enum": [ - "file" - ] - }, - "extension": { - "type": "string", - "enum": [ - "lnk" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "target", - "type", - "extension" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicit" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/json/v3_0/ArrayRecursiveUnionExplicitPointer.json deleted file mode 100644 index e49625b320..0000000000 --- a/test/schemas/json/v3_0/ArrayRecursiveUnionExplicitPointer.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRecursiveUnionExplicitPointer": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IBucket" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ArrayRecursiveUnionExplicitPointer.IBucket": { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IDirectory" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IImageFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.ITextFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IZipFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IShortcut" - } - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ArrayRecursiveUnionExplicitPointer.IDirectory": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IBucket" - } - }, - "type": { - "type": "string", - "enum": [ - "directory" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "children", - "type" - ] - }, - "ArrayRecursiveUnionExplicitPointer.IImageFile": { - "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" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "width", - "height", - "url", - "size", - "type", - "extension" - ] - }, - "ArrayRecursiveUnionExplicitPointer.ITextFile": { - "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" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "size", - "content", - "type", - "extension" - ] - }, - "ArrayRecursiveUnionExplicitPointer.IZipFile": { - "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" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "size", - "count", - "type", - "extension" - ] - }, - "ArrayRecursiveUnionExplicitPointer.IShortcut": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "target": { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer.IBucket" - }, - "type": { - "type": "string", - "enum": [ - "file" - ] - }, - "extension": { - "type": "string", - "enum": [ - "lnk" - ] - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "target", - "type", - "extension" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRecursiveUnionExplicitPointer" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRecursiveUnionImplicit.json b/test/schemas/json/v3_0/ArrayRecursiveUnionImplicit.json deleted file mode 100644 index feb5938b79..0000000000 --- a/test/schemas/json/v3_0/ArrayRecursiveUnionImplicit.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRecursiveUnionImplicit": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" - } - }, - "ArrayRecursiveUnionImplicit.IBucket": { - "oneOf": [ - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IDirectory" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.ISharedDirectory" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IImageFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.ITextFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IZipFile" - }, - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IShortcut" - } - ] - }, - "ArrayRecursiveUnionImplicit.IDirectory": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" - } - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "children" - ] - }, - "ArrayRecursiveUnionImplicit.ISharedDirectory": { - "type": "object", - "properties": { - "access": { - "type": "string", - "enum": [ - "read", - "write" - ] - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" - } - } - }, - "nullable": false, - "required": [ - "access", - "id", - "name", - "path", - "children" - ] - }, - "ArrayRecursiveUnionImplicit.IImageFile": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "width": { - "type": "number" - }, - "height": { - "type": "number" - }, - "url": { - "type": "string" - }, - "size": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "width", - "height", - "url", - "size" - ] - }, - "ArrayRecursiveUnionImplicit.ITextFile": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "size": { - "type": "number" - }, - "content": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "size", - "content" - ] - }, - "ArrayRecursiveUnionImplicit.IZipFile": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "size": { - "type": "number" - }, - "count": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "size", - "count" - ] - }, - "ArrayRecursiveUnionImplicit.IShortcut": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "path": { - "type": "string" - }, - "target": { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit.IBucket" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "path", - "target" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRecursiveUnionImplicit" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRepeatedNullable.json b/test/schemas/json/v3_0/ArrayRepeatedNullable.json deleted file mode 100644 index aced6dbef8..0000000000 --- a/test/schemas/json/v3_0/ArrayRepeatedNullable.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRepeatedNullable": { - "oneOf": [ - { - "type": "string", - "nullable": true - }, - { - "type": "number", - "nullable": true - }, - { - "$ref": "#/components/schemas/ArrayArrayRepeatedNullable" - } - ] - }, - "ArrayArrayRepeatedNullable": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRepeatedNullable" - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRepeatedNullable" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRepeatedUnion.json b/test/schemas/json/v3_0/ArrayRepeatedUnion.json deleted file mode 100644 index cfeffa232a..0000000000 --- a/test/schemas/json/v3_0/ArrayRepeatedUnion.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRepeatedUnion": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "$ref": "#/components/schemas/ArrayArrayRepeatedUnion" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRepeatedUnion.IBox3D" - } - } - ] - }, - "ArrayArrayRepeatedUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRepeatedUnion" - } - }, - "ArrayRepeatedUnion.IBox3D": { - "type": "object", - "properties": { - "scale": { - "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" - }, - "position": { - "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" - }, - "rotate": { - "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" - }, - "pivot": { - "$ref": "#/components/schemas/ArrayRepeatedUnion.IPoint3D" - } - }, - "nullable": false, - "required": [ - "scale", - "position", - "rotate", - "pivot" - ] - }, - "ArrayRepeatedUnion.IPoint3D": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y", - "z" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRepeatedUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json b/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json deleted file mode 100644 index ff19a74870..0000000000 --- a/test/schemas/json/v3_0/ArrayRepeatedUnionWithTuple.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayRepeatedUnionWithTuple": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "$ref": "#/components/schemas/ArrayArrayRepeatedUnionWithTuple" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IBox3D" - } - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "minItems": 3, - "maxItems": 3 - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IBox3D" - }, - { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" - } - ] - }, - "minItems": 2, - "maxItems": 2 - } - ] - }, - "ArrayArrayRepeatedUnionWithTuple": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple" - } - }, - "ArrayRepeatedUnionWithTuple.IBox3D": { - "type": "object", - "properties": { - "scale": { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" - }, - "position": { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" - }, - "rotate": { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" - }, - "pivot": { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple.IPoint3D" - } - }, - "nullable": false, - "required": [ - "scale", - "position", - "rotate", - "pivot" - ] - }, - "ArrayRepeatedUnionWithTuple.IPoint3D": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y", - "z" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayRepeatedUnionWithTuple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArraySimple.json b/test/schemas/json/v3_0/ArraySimple.json deleted file mode 100644 index aad12d3c5c..0000000000 --- a/test/schemas/json/v3_0/ArraySimple.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArraySimple": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArraySimple.IPerson" - } - }, - "ArraySimple.IPerson": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "hobbies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArraySimple.IHobby" - } - } - }, - "nullable": false, - "required": [ - "name", - "email", - "hobbies" - ] - }, - "ArraySimple.IHobby": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "rank": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "name", - "body", - "rank" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArraySimple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ArrayUnion.json b/test/schemas/json/v3_0/ArrayUnion.json deleted file mode 100644 index 0af8e54c10..0000000000 --- a/test/schemas/json/v3_0/ArrayUnion.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ArrayUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayUnion.IUnion" - } - }, - "ArrayUnion.IUnion": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - } - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/AtomicClass.json b/test/schemas/json/v3_0/AtomicClass.json deleted file mode 100644 index f43673184d..0000000000 --- a/test/schemas/json/v3_0/AtomicClass.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "AtomicClass": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 9, - "maxItems": 9 - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/AtomicClass" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ClassGetter.json b/test/schemas/json/v3_0/ClassGetter.json deleted file mode 100644 index 2ef0ef1bd3..0000000000 --- a/test/schemas/json/v3_0/ClassGetter.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ClassGetter.Person": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "dead": { - "type": "boolean", - "nullable": true - } - }, - "nullable": false, - "required": [ - "id", - "name", - "dead" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ClassGetter.Person" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ClassMethod.json b/test/schemas/json/v3_0/ClassMethod.json deleted file mode 100644 index 27b0dc19c7..0000000000 --- a/test/schemas/json/v3_0/ClassMethod.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ClassMethod.Animal": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "age": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "name", - "age" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ClassMethod.Animal" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ClassPropertyAssignment.json b/test/schemas/json/v3_0/ClassPropertyAssignment.json deleted file mode 100644 index 24eb19c6c7..0000000000 --- a/test/schemas/json/v3_0/ClassPropertyAssignment.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ClassPropertyAssignment": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "note": { - "type": "string", - "enum": [ - "assignment" - ] - }, - "editable": { - "type": "boolean", - "enum": [ - false - ] - }, - "incremental": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "note", - "editable", - "incremental" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ClassPropertyAssignment" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagArray.json b/test/schemas/json/v3_0/CommentTagArray.json deleted file mode 100644 index 128174a375..0000000000 --- a/test/schemas/json/v3_0/CommentTagArray.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagArray": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagArray.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "CommentTagArray.Type": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 3, - "maxItems": 3 - }, - "minItems": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 3 - }, - "both": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 3, - "maxItems": 7 - }, - "equal": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 10, - "maxItems": 10 - }, - "unique": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "nullable": false, - "required": [ - "items", - "minItems", - "both", - "equal", - "unique" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagArray" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagArrayUnion.json b/test/schemas/json/v3_0/CommentTagArrayUnion.json deleted file mode 100644 index f0b6269ab6..0000000000 --- a/test/schemas/json/v3_0/CommentTagArrayUnion.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagArrayUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagArrayUnion.Type" - } - }, - "CommentTagArrayUnion.Type": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 3, - "maxItems": 3 - }, - "minItems": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 3 - }, - "maxItems": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "maxItems": 7 - }, - "both": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 3, - "maxItems": 7 - } - }, - "nullable": false, - "required": [ - "items", - "minItems", - "maxItems", - "both" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagArrayUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagAtomicUnion.json b/test/schemas/json/v3_0/CommentTagAtomicUnion.json deleted file mode 100644 index 23b758455e..0000000000 --- a/test/schemas/json/v3_0/CommentTagAtomicUnion.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagAtomicUnion": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagAtomicUnion.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "CommentTagAtomicUnion.Type": { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - { - "type": "number", - "minimum": 3 - } - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagAtomicUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagDefault.json b/test/schemas/json/v3_0/CommentTagDefault.json deleted file mode 100644 index 67cbbd4092..0000000000 --- a/test/schemas/json/v3_0/CommentTagDefault.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagDefault": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean", - "title": "Default tag on `boolean` typed value", - "description": "Default tag on `boolean` typed value." - }, - "number": { - "type": "number", - "title": "Default tag on `number` typed value", - "description": "Default tag on `number` typed value." - }, - "string": { - "type": "string", - "title": "Default tag on `string` typed value", - "description": "Default tag on `string` typed value." - }, - "text": { - "type": "string", - "title": "Default tag on `string` typed value with long characters", - "description": "Default tag on `string` typed value with long characters." - }, - "boolean_and_number_and_string": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." - }, - "union_but_boolean": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." - }, - "union_but_number": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." - }, - "union_but_string": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." - }, - "vulnerable_range": { - "type": "number", - "minimum": 3, - "maximum": 5, - "title": "Default value on union typed property", - "description": "Default value on union typed property." - }, - "boolean_and_number_and_template": { - "oneOf": [ - { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "Default value on union typed property", - "description": "Default value on union typed property." - } - }, - "nullable": false, - "required": [ - "boolean", - "number", - "string", - "text", - "boolean_and_number_and_string", - "union_but_boolean", - "union_but_number", - "union_but_string", - "vulnerable_range", - "boolean_and_number_and_template" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagDefault" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagFormat.json b/test/schemas/json/v3_0/CommentTagFormat.json deleted file mode 100644 index b16bdff302..0000000000 --- a/test/schemas/json/v3_0/CommentTagFormat.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagFormat": { - "type": "object", - "properties": { - "byte": { - "type": "string", - "format": "byte" - }, - "password": { - "type": "string", - "format": "password" - }, - "regex": { - "type": "string", - "format": "regex" - }, - "uuid": { - "type": "string", - "format": "uuid" - }, - "email": { - "type": "string", - "format": "email" - }, - "hostname": { - "type": "string", - "format": "hostname" - }, - "idnEmail": { - "type": "string", - "format": "idn-email" - }, - "idnHostname": { - "type": "string", - "format": "idn-hostname" - }, - "iri": { - "type": "string", - "format": "iri" - }, - "iriReference": { - "type": "string", - "format": "iri-reference" - }, - "ipv4": { - "type": "string", - "format": "ipv4" - }, - "ipv6": { - "type": "string", - "format": "ipv6" - }, - "uri": { - "type": "string", - "format": "uri" - }, - "uriReference": { - "type": "string", - "format": "uri-reference" - }, - "uriTemplate": { - "type": "string", - "format": "uri-template" - }, - "url": { - "type": "string", - "format": "url" - }, - "datetime": { - "type": "string", - "format": "date-time" - }, - "date": { - "type": "string", - "format": "date" - }, - "time": { - "type": "string", - "format": "time" - }, - "duration": { - "type": "string", - "format": "duration" - }, - "jsonPointer": { - "type": "string", - "format": "json-pointer" - }, - "relativeJsonPointer": { - "type": "string", - "format": "relative-json-pointer" - } - }, - "nullable": false, - "required": [ - "byte", - "password", - "regex", - "uuid", - "email", - "hostname", - "idnEmail", - "idnHostname", - "iri", - "iriReference", - "ipv4", - "ipv6", - "uri", - "uriReference", - "uriTemplate", - "url", - "datetime", - "date", - "time", - "duration", - "jsonPointer", - "relativeJsonPointer" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagFormat" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagLength.json b/test/schemas/json/v3_0/CommentTagLength.json deleted file mode 100644 index 3834f9a5c7..0000000000 --- a/test/schemas/json/v3_0/CommentTagLength.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagLength": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagLength.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "CommentTagLength.Type": { - "type": "object", - "properties": { - "fixed": { - "type": "string", - "minLength": 5, - "maxLength": 5 - }, - "minimum": { - "type": "string", - "minLength": 3 - }, - "maximum": { - "type": "string", - "maxLength": 7 - }, - "minimum_and_maximum": { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - "equal": { - "type": "string", - "minLength": 10, - "maxLength": 19 - } - }, - "nullable": false, - "required": [ - "fixed", - "minimum", - "maximum", - "minimum_and_maximum", - "equal" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagLength" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagObjectUnion.json b/test/schemas/json/v3_0/CommentTagObjectUnion.json deleted file mode 100644 index cfebbf5b74..0000000000 --- a/test/schemas/json/v3_0/CommentTagObjectUnion.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagObjectUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagObjectUnion.Type" - } - }, - "CommentTagObjectUnion.Type": { - "oneOf": [ - { - "$ref": "#/components/schemas/CommentTagObjectUnion.Numeric" - }, - { - "$ref": "#/components/schemas/CommentTagObjectUnion.Literal" - } - ] - }, - "CommentTagObjectUnion.Numeric": { - "type": "object", - "properties": { - "value": { - "type": "number", - "minimum": 3 - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "CommentTagObjectUnion.Literal": { - "type": "object", - "properties": { - "value": { - "type": "string", - "minLength": 3, - "maxLength": 7 - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagObjectUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagPattern.json b/test/schemas/json/v3_0/CommentTagPattern.json deleted file mode 100644 index 4357efa223..0000000000 --- a/test/schemas/json/v3_0/CommentTagPattern.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagPattern": { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" - }, - "email": { - "type": "string", - "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" - }, - "ipv4": { - "type": "string", - "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" - }, - "ipv6": { - "type": "string", - "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", - "ipv4", - "ipv6" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagPattern" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagRange.json b/test/schemas/json/v3_0/CommentTagRange.json deleted file mode 100644 index a3680d5e8c..0000000000 --- a/test/schemas/json/v3_0/CommentTagRange.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagRange": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagRange.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "CommentTagRange.Type": { - "type": "object", - "properties": { - "greater": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3 - }, - "greater_equal": { - "type": "integer", - "minimum": 3 - }, - "less": { - "type": "integer", - "exclusiveMaximum": true, - "maximum": 7 - }, - "less_equal": { - "type": "integer", - "maximum": 7 - }, - "greater_less": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_equal_less": { - "type": "integer", - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_less_equal": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "maximum": 7 - }, - "greater_equal_less_equal": { - "type": "integer", - "minimum": 3, - "maximum": 7 - }, - "equal": { - "type": "integer", - "minimum": 10, - "maximum": 10 - } - }, - "nullable": false, - "required": [ - "greater", - "greater_equal", - "less", - "less_equal", - "greater_less", - "greater_equal_less", - "greater_less_equal", - "greater_equal_less_equal", - "equal" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagRange" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/CommentTagType.json b/test/schemas/json/v3_0/CommentTagType.json deleted file mode 100644 index bd8085c028..0000000000 --- a/test/schemas/json/v3_0/CommentTagType.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "CommentTagType": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CommentTagType.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "CommentTagType.Type": { - "type": "object", - "properties": { - "int": { - "type": "integer", - "title": "Integer value", - "description": "Integer value." - }, - "uint": { - "type": "integer", - "title": "Unsigned integer value", - "description": "Unsigned integer value." - }, - "int32": { - "type": "integer" - }, - "uint32": { - "type": "integer" - }, - "int64": { - "type": "integer" - }, - "uint64": { - "type": "integer" - }, - "float": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "int", - "uint", - "int32", - "uint32", - "int64", - "uint64", - "float" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/CommentTagType" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ConstantAtomicAbsorbed.json b/test/schemas/json/v3_0/ConstantAtomicAbsorbed.json deleted file mode 100644 index 97e3e6c610..0000000000 --- a/test/schemas/json/v3_0/ConstantAtomicAbsorbed.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ConstantAtomicAbsorbed": { - "type": "object", - "properties": { - "id": { - "type": "string", - "default": "something" - }, - "age": { - "type": "number", - "default": 20 - } - }, - "nullable": false, - "required": [ - "id", - "age" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ConstantAtomicAbsorbed" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ConstantAtomicSimple.json b/test/schemas/json/v3_0/ConstantAtomicSimple.json deleted file mode 100644 index 3dfdb2531e..0000000000 --- a/test/schemas/json/v3_0/ConstantAtomicSimple.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ConstantAtomicSimple": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "enum": [ - false, - true - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "string", - "enum": [ - "three" - ] - } - ] - }, - "minItems": 4, - "maxItems": 4 - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ConstantAtomicSimple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ConstantAtomicTagged.json b/test/schemas/json/v3_0/ConstantAtomicTagged.json deleted file mode 100644 index af9e8bb292..0000000000 --- a/test/schemas/json/v3_0/ConstantAtomicTagged.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ConstantAtomicTagged": { - "type": "object", - "properties": { - "id": { - "oneOf": [ - { - "type": "string", - "enum": [ - "latest" - ] - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "age": { - "oneOf": [ - { - "type": "number", - "enum": [ - -1 - ] - }, - { - "type": "integer", - "maximum": 100 - } - ] - } - }, - "nullable": false, - "required": [ - "id", - "age" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ConstantAtomicTagged" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ConstantAtomicUnion.json b/test/schemas/json/v3_0/ConstantAtomicUnion.json deleted file mode 100644 index 80217d3157..0000000000 --- a/test/schemas/json/v3_0/ConstantAtomicUnion.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ConstantAtomicUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstantAtomicUnion.Union" - } - }, - "ConstantAtomicUnion.Union": { - "oneOf": [ - { - "type": "boolean", - "enum": [ - false - ] - }, - { - "type": "number", - "enum": [ - 1, - 2 - ] - }, - { - "type": "string", - "enum": [ - "three", - "four" - ] - }, - { - "type": "object", - "properties": { - "key": { - "type": "string", - "enum": [ - "key" - ] - } - }, - "nullable": false, - "required": [ - "key" - ] - } - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ConstantAtomicUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ConstantAtomicWrapper.json b/test/schemas/json/v3_0/ConstantAtomicWrapper.json deleted file mode 100644 index 02a5d41b95..0000000000 --- a/test/schemas/json/v3_0/ConstantAtomicWrapper.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ConstantAtomicWrapper": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ConstantAtomicWrapper.IPointerboolean" - }, - { - "$ref": "#/components/schemas/ConstantAtomicWrapper.IPointernumber" - }, - { - "$ref": "#/components/schemas/ConstantAtomicWrapper.IPointerstring" - } - ] - }, - "minItems": 3, - "maxItems": 3 - }, - "ConstantAtomicWrapper.IPointerboolean": { - "type": "object", - "properties": { - "value": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ConstantAtomicWrapper.IPointernumber": { - "type": "object", - "properties": { - "value": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ConstantAtomicWrapper.IPointerstring": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ConstantAtomicWrapper" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicArray.json b/test/schemas/json/v3_0/DynamicArray.json deleted file mode 100644 index eaffafa8c2..0000000000 --- a/test/schemas/json/v3_0/DynamicArray.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicArray": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {}, - "nullable": false, - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicArray" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicComposite.json b/test/schemas/json/v3_0/DynamicComposite.json deleted file mode 100644 index 8e46b3b315..0000000000 --- a/test/schemas/json/v3_0/DynamicComposite.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicComposite": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "name" - ], - "additionalProperties": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicComposite" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicConstant.json b/test/schemas/json/v3_0/DynamicConstant.json deleted file mode 100644 index 99dc891981..0000000000 --- a/test/schemas/json/v3_0/DynamicConstant.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicConstant": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "a": { - "type": "number" - }, - "b": { - "type": "number" - }, - "c": { - "type": "number" - }, - "d": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "a", - "b", - "c", - "d" - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicConstant" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicEnumeration.json b/test/schemas/json/v3_0/DynamicEnumeration.json deleted file mode 100644 index 52661f172c..0000000000 --- a/test/schemas/json/v3_0/DynamicEnumeration.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicEnumeration": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "ar": { - "type": "string" - }, - "zh-Hans": { - "type": "string" - }, - "zh-Hant": { - "type": "string" - }, - "en": { - "type": "string" - }, - "fr": { - "type": "string" - }, - "de": { - "type": "string" - }, - "ja": { - "type": "string" - }, - "ko": { - "type": "string" - }, - "pt": { - "type": "string" - }, - "ru": { - "type": "string" - } - }, - "nullable": false - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicEnumeration" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicNever.json b/test/schemas/json/v3_0/DynamicNever.json deleted file mode 100644 index ca434f90a3..0000000000 --- a/test/schemas/json/v3_0/DynamicNever.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicNever": { - "type": "object", - "properties": {}, - "nullable": false - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicNever" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicSimple.json b/test/schemas/json/v3_0/DynamicSimple.json deleted file mode 100644 index de7b67bf3d..0000000000 --- a/test/schemas/json/v3_0/DynamicSimple.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicSimple": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {}, - "nullable": false, - "additionalProperties": { - "type": "number" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicSimple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicTemplate.json b/test/schemas/json/v3_0/DynamicTemplate.json deleted file mode 100644 index 2091d32c66..0000000000 --- a/test/schemas/json/v3_0/DynamicTemplate.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicTemplate": { - "type": "object", - "properties": {}, - "nullable": false, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicTemplate" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicTree.json b/test/schemas/json/v3_0/DynamicTree.json deleted file mode 100644 index ce59b35271..0000000000 --- a/test/schemas/json/v3_0/DynamicTree.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicTree": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "children": { - "$ref": "#/components/schemas/RecordstringDynamicTree" - } - }, - "nullable": false, - "required": [ - "id", - "sequence", - "children" - ] - }, - "RecordstringDynamicTree": { - "type": "object", - "properties": {}, - "nullable": false, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "$ref": "#/components/schemas/DynamicTree" - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicTree" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicUndefined.json b/test/schemas/json/v3_0/DynamicUndefined.json deleted file mode 100644 index aabd00b948..0000000000 --- a/test/schemas/json/v3_0/DynamicUndefined.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicUndefined": { - "type": "object", - "properties": {}, - "nullable": false - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicUndefined" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/DynamicUnion.json b/test/schemas/json/v3_0/DynamicUnion.json deleted file mode 100644 index d5902fee3a..0000000000 --- a/test/schemas/json/v3_0/DynamicUnion.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "DynamicUnion": { - "type": "object", - "properties": {}, - "nullable": false, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectAlias.json b/test/schemas/json/v3_0/ObjectAlias.json deleted file mode 100644 index 065e6081a1..0000000000 --- a/test/schemas/json/v3_0/ObjectAlias.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectAlias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectAlias.IMember" - } - }, - "ObjectAlias.IMember": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string" - }, - "name": { - "type": "string" - }, - "sex": { - "oneOf": [ - { - "type": "number", - "enum": [ - 1, - 2 - ], - "nullable": true - }, - { - "type": "string", - "enum": [ - "male", - "female" - ], - "nullable": true - } - ] - }, - "age": { - "type": "number", - "nullable": true - }, - "dead": { - "type": "boolean", - "nullable": true - } - }, - "nullable": false, - "required": [ - "id", - "email", - "name", - "sex", - "age", - "dead" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectAlias" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectDate.json b/test/schemas/json/v3_0/ObjectDate.json deleted file mode 100644 index 3b5617b47b..0000000000 --- a/test/schemas/json/v3_0/ObjectDate.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectDate": { - "type": "object", - "properties": { - "classDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "date": { - "type": "string", - "format": "date", - "nullable": true - }, - "datetime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "time": { - "type": "string", - "format": "time", - "nullable": true - }, - "duration": { - "type": "string", - "format": "duration", - "nullable": true - } - }, - "nullable": false, - "required": [ - "date", - "datetime", - "time", - "duration" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectDate" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectDescription.json b/test/schemas/json/v3_0/ObjectDescription.json deleted file mode 100644 index f51d503aaf..0000000000 --- a/test/schemas/json/v3_0/ObjectDescription.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectDescription": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "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." - }, - "title": { - "type": "string", - "title": "This is the title", - "description": "Title tag can replace the first line of the comment." - }, - "descriptions": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Description property", - "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." - }, - "newLine": { - "type": "number", - "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", - "title", - "descriptions", - "newLine" - ], - "title": "This is the title of object type", - "description": "An interface designed to test JSON schema's object description." - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectDescription" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectDynamic.json b/test/schemas/json/v3_0/ObjectDynamic.json deleted file mode 100644 index 6b640bf289..0000000000 --- a/test/schemas/json/v3_0/ObjectDynamic.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectDynamic": { - "type": "object", - "properties": {}, - "nullable": false, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectDynamic" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectGeneric.json b/test/schemas/json/v3_0/ObjectGeneric.json deleted file mode 100644 index a48d93cc15..0000000000 --- a/test/schemas/json/v3_0/ObjectGeneric.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectGeneric": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectGeneric.ISomethingboolean" - }, - { - "$ref": "#/components/schemas/ObjectGeneric.ISomethingnumber" - }, - { - "$ref": "#/components/schemas/ObjectGeneric.ISomethingstring" - } - ] - }, - "minItems": 3, - "maxItems": 3 - }, - "ObjectGeneric.ISomethingboolean": { - "type": "object", - "properties": { - "value": { - "type": "boolean" - }, - "child": { - "$ref": "#/components/schemas/ObjectGeneric.IChildbooleanboolean" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGeneric.IChildbooleanboolean" - } - } - }, - "nullable": false, - "required": [ - "value", - "child", - "elements" - ] - }, - "ObjectGeneric.IChildbooleanboolean": { - "type": "object", - "properties": { - "child_value": { - "type": "boolean" - }, - "child_next": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "child_value", - "child_next" - ] - }, - "ObjectGeneric.ISomethingnumber": { - "type": "object", - "properties": { - "value": { - "type": "number" - }, - "child": { - "$ref": "#/components/schemas/ObjectGeneric.IChildnumbernumber" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGeneric.IChildnumbernumber" - } - } - }, - "nullable": false, - "required": [ - "value", - "child", - "elements" - ] - }, - "ObjectGeneric.IChildnumbernumber": { - "type": "object", - "properties": { - "child_value": { - "type": "number" - }, - "child_next": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "child_value", - "child_next" - ] - }, - "ObjectGeneric.ISomethingstring": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "child": { - "$ref": "#/components/schemas/ObjectGeneric.IChildstringstring" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGeneric.IChildstringstring" - } - } - }, - "nullable": false, - "required": [ - "value", - "child", - "elements" - ] - }, - "ObjectGeneric.IChildstringstring": { - "type": "object", - "properties": { - "child_value": { - "type": "string" - }, - "child_next": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "child_value", - "child_next" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectGeneric" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectGenericAlias.json b/test/schemas/json/v3_0/ObjectGenericAlias.json deleted file mode 100644 index f30c56b5fe..0000000000 --- a/test/schemas/json/v3_0/ObjectGenericAlias.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectGenericAlias.Alias": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectGenericAlias.Alias" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectGenericArray.json b/test/schemas/json/v3_0/ObjectGenericArray.json deleted file mode 100644 index 4e323e7070..0000000000 --- a/test/schemas/json/v3_0/ObjectGenericArray.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectGenericArray": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/ObjectGenericArray.IPagination" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGenericArray.IPerson" - } - } - }, - "nullable": false, - "required": [ - "pagination", - "data" - ] - }, - "ObjectGenericArray.IPagination": { - "type": "object", - "properties": { - "page": { - "type": "number" - }, - "limit": { - "type": "number" - }, - "total_count": { - "type": "number" - }, - "total_pages": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "page", - "limit", - "total_count", - "total_pages" - ] - }, - "ObjectGenericArray.IPerson": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "age": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "name", - "age" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectGenericArray" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectGenericUnion.json b/test/schemas/json/v3_0/ObjectGenericUnion.json deleted file mode 100644 index c51a501035..0000000000 --- a/test/schemas/json/v3_0/ObjectGenericUnion.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectGenericUnion": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleEntireArticle" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectGenericUnion.ISaleEntireArticle": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleQuestion" - }, - { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleReview" - } - ] - }, - "ObjectGenericUnion.ISaleQuestion": { - "type": "object", - "properties": { - "writer": { - "type": "string" - }, - "answer": { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleAnswer.Nullable" - }, - "id": { - "type": "string" - }, - "hit": { - "type": "number" - }, - "contents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleArticle.IContent" - } - }, - "created_at": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "writer", - "answer", - "id", - "hit", - "contents", - "created_at" - ] - }, - "ObjectGenericUnion.ISaleAnswer.Nullable": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hit": { - "type": "number" - }, - "contents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleArticle.IContent" - } - }, - "created_at": { - "type": "string" - } - }, - "nullable": true, - "required": [ - "id", - "hit", - "contents", - "created_at" - ] - }, - "ObjectGenericUnion.ISaleArticle.IContent": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGenericUnion.IAttachmentFile" - } - } - }, - "nullable": false, - "required": [ - "id", - "created_at", - "title", - "body", - "files" - ] - }, - "ObjectGenericUnion.IAttachmentFile": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "extension": { - "type": "string", - "nullable": true - }, - "url": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "name", - "extension", - "url" - ] - }, - "ObjectGenericUnion.ISaleReview": { - "type": "object", - "properties": { - "writer": { - "type": "string" - }, - "answer": { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleAnswer.Nullable" - }, - "id": { - "type": "string" - }, - "hit": { - "type": "number" - }, - "contents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGenericUnion.ISaleReview.IContent" - } - }, - "created_at": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "writer", - "answer", - "id", - "hit", - "contents", - "created_at" - ] - }, - "ObjectGenericUnion.ISaleReview.IContent": { - "type": "object", - "properties": { - "score": { - "type": "number" - }, - "id": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectGenericUnion.IAttachmentFile" - } - } - }, - "nullable": false, - "required": [ - "score", - "id", - "created_at", - "title", - "body", - "files" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectGenericUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectHierarchical.json b/test/schemas/json/v3_0/ObjectHierarchical.json deleted file mode 100644 index 7947c5df71..0000000000 --- a/test/schemas/json/v3_0/ObjectHierarchical.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectHierarchical.ICustomer": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "channel": { - "$ref": "#/components/schemas/ObjectHierarchical.IChannel" - }, - "member": { - "$ref": "#/components/schemas/ObjectHierarchical.IMember.Nullable" - }, - "account": { - "$ref": "#/components/schemas/ObjectHierarchical.IAccount.Nullable" - }, - "href": { - "type": "string" - }, - "referrer": { - "type": "string" - }, - "ip": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 4, - "maxItems": 4 - }, - "created_at": { - "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" - } - }, - "nullable": false, - "required": [ - "id", - "channel", - "member", - "account", - "href", - "referrer", - "ip", - "created_at" - ] - }, - "ObjectHierarchical.IChannel": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "exclusive": { - "type": "boolean" - }, - "priority": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" - } - }, - "nullable": false, - "required": [ - "id", - "code", - "name", - "sequence", - "exclusive", - "priority", - "created_at" - ] - }, - "ObjectHierarchical.ITimestamp": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "time", - "zone" - ] - }, - "ObjectHierarchical.IMember.Nullable": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "account": { - "$ref": "#/components/schemas/ObjectHierarchical.IAccount" - }, - "enterprise": { - "$ref": "#/components/schemas/ObjectHierarchical.IEnterprise.Nullable" - }, - "emails": { - "type": "array", - "items": { - "type": "string" - } - }, - "created_at": { - "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" - }, - "authorized": { - "type": "boolean" - } - }, - "nullable": true, - "required": [ - "id", - "account", - "enterprise", - "emails", - "created_at", - "authorized" - ] - }, - "ObjectHierarchical.IAccount": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "created_at": { - "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" - } - }, - "nullable": false, - "required": [ - "id", - "code", - "created_at" - ] - }, - "ObjectHierarchical.IEnterprise.Nullable": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "account": { - "$ref": "#/components/schemas/ObjectHierarchical.IAccount" - }, - "name": { - "type": "string" - }, - "grade": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" - } - }, - "nullable": true, - "required": [ - "id", - "account", - "name", - "grade", - "created_at" - ] - }, - "ObjectHierarchical.IAccount.Nullable": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "created_at": { - "$ref": "#/components/schemas/ObjectHierarchical.ITimestamp" - } - }, - "nullable": true, - "required": [ - "id", - "code", - "created_at" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectHierarchical.ICustomer" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectInternal.json b/test/schemas/json/v3_0/ObjectInternal.json deleted file mode 100644 index 91c2df41d5..0000000000 --- a/test/schemas/json/v3_0/ObjectInternal.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectInternal": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "name" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectInternal" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectIntersection.json b/test/schemas/json/v3_0/ObjectIntersection.json deleted file mode 100644 index fe2f6988c8..0000000000 --- a/test/schemas/json/v3_0/ObjectIntersection.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectIntersection": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "name": { - "type": "string" - }, - "vulnerable": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "email", - "name", - "vulnerable" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectIntersection" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectJsonTag.json b/test/schemas/json/v3_0/ObjectJsonTag.json deleted file mode 100644 index 6ca85217da..0000000000 --- a/test/schemas/json/v3_0/ObjectJsonTag.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectJsonTag": { - "type": "object", - "properties": { - "vulnerable": { - "type": "string", - "deprecated": true - }, - "description": { - "type": "string", - "title": "Descripted property", - "description": "Descripted property." - }, - "title": { - "type": "string", - "title": "something", - "description": "Titled property." - }, - "complicate_title": { - "type": "string", - "title": "something weirdo with {@link something } tag", - "description": "Complicate title." - } - }, - "nullable": false, - "required": [ - "vulnerable", - "description", - "title", - "complicate_title" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectJsonTag" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectLiteralProperty.json b/test/schemas/json/v3_0/ObjectLiteralProperty.json deleted file mode 100644 index 081a912cd5..0000000000 --- a/test/schemas/json/v3_0/ObjectLiteralProperty.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectLiteralProperty.ISomething": { - "type": "object", - "properties": { - "something-interesting-do-you-want?": { - "type": "string" - }, - "or-something-crazy-do-you-want?": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "something-interesting-do-you-want?", - "or-something-crazy-do-you-want?" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectLiteralProperty.ISomething" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectLiteralType.json b/test/schemas/json/v3_0/ObjectLiteralType.json deleted file mode 100644 index 430f7f767d..0000000000 --- a/test/schemas/json/v3_0/ObjectLiteralType.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": "3.0", - "components": {}, - "schemas": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "age": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "age" - ] - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectNullable.json b/test/schemas/json/v3_0/ObjectNullable.json deleted file mode 100644 index c0248d71e8..0000000000 --- a/test/schemas/json/v3_0/ObjectNullable.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectNullable": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectNullable.IProduct" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectNullable.IProduct": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "manufacturer": { - "$ref": "#/components/schemas/ObjectNullable.IManufacturer" - }, - "brand": { - "$ref": "#/components/schemas/ObjectNullable.IBrand.Nullable" - }, - "similar": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectNullable.IBrand.Nullable" - }, - { - "$ref": "#/components/schemas/ObjectNullable.IManufacturer.Nullable" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "brand": "#/components/schemas/ObjectNullable.IBrand", - "manufacturer": "#/components/schemas/ObjectNullable.IManufacturer" - } - } - } - }, - "nullable": false, - "required": [ - "name", - "manufacturer", - "brand", - "similar" - ] - }, - "ObjectNullable.IManufacturer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "manufacturer" - ] - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "type", - "name" - ] - }, - "ObjectNullable.IBrand.Nullable": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "brand" - ] - }, - "name": { - "type": "string" - } - }, - "nullable": true, - "required": [ - "type", - "name" - ] - }, - "ObjectNullable.IManufacturer.Nullable": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "manufacturer" - ] - }, - "name": { - "type": "string" - } - }, - "nullable": true, - "required": [ - "type", - "name" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectNullable" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectOptional.json b/test/schemas/json/v3_0/ObjectOptional.json deleted file mode 100644 index b0b4476cba..0000000000 --- a/test/schemas/json/v3_0/ObjectOptional.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectOptional": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sequence": { - "type": "number" - } - }, - "nullable": false - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectOptional" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectPartial.json b/test/schemas/json/v3_0/ObjectPartial.json deleted file mode 100644 index 40586150b9..0000000000 --- a/test/schemas/json/v3_0/ObjectPartial.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "PartialObjectPartial.IBase": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "$ref": "#/components/schemas/ObjectPartial.IBase.Nullable" - } - }, - "nullable": false, - "description": "Make all properties in T optional" - }, - "ObjectPartial.IBase.Nullable": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "$ref": "#/components/schemas/ObjectPartial.IBase.Nullable" - } - }, - "nullable": true, - "required": [ - "boolean", - "number", - "string", - "array", - "object" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/PartialObjectPartial.IBase" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectPartialAndRequired.json b/test/schemas/json/v3_0/ObjectPartialAndRequired.json deleted file mode 100644 index f28fe1bdad..0000000000 --- a/test/schemas/json/v3_0/ObjectPartialAndRequired.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectPartialAndRequired": { - "type": "object", - "properties": { - "string": { - "type": "string" - }, - "number": { - "type": "number" - }, - "boolean": { - "type": "boolean" - }, - "object": { - "$ref": "#/components/schemas/ObjectPartialAndRequired.Nullable" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "nullable": false, - "required": [ - "object", - "array" - ] - }, - "ObjectPartialAndRequired.Nullable": { - "type": "object", - "properties": { - "string": { - "type": "string" - }, - "number": { - "type": "number" - }, - "boolean": { - "type": "boolean" - }, - "object": { - "$ref": "#/components/schemas/ObjectPartialAndRequired.Nullable" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "nullable": true, - "required": [ - "object", - "array" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectPartialAndRequired" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectPrimitive.json b/test/schemas/json/v3_0/ObjectPrimitive.json deleted file mode 100644 index e4d9440b90..0000000000 --- a/test/schemas/json/v3_0/ObjectPrimitive.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectPrimitive.IArticle": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "extension": { - "type": "string", - "enum": [ - "txt", - "md", - "html" - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectPrimitive.IFile" - } - }, - "secret": { - "type": "boolean" - }, - "created_at": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "extension", - "title", - "body", - "files", - "secret", - "created_at" - ] - }, - "ObjectPrimitive.IFile": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "extension": { - "type": "string" - }, - "url": { - "type": "string" - }, - "created_at": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "name", - "extension", - "url", - "created_at" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectPrimitive.IArticle" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectPropertyNullable.json b/test/schemas/json/v3_0/ObjectPropertyNullable.json deleted file mode 100644 index cae006411f..0000000000 --- a/test/schemas/json/v3_0/ObjectPropertyNullable.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectPropertyNullable": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectPropertyNullable.IPointerboolean" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectPropertyNullable.IPointernumber" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectPropertyNullable.IPointerstring" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectPropertyNullable.IPointerObjectPropertyNullable.IMember" - } - } - ] - }, - "minItems": 4, - "maxItems": 4 - }, - "ObjectPropertyNullable.IPointerboolean": { - "type": "object", - "properties": { - "value": { - "type": "boolean", - "nullable": true - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectPropertyNullable.IPointernumber": { - "type": "object", - "properties": { - "value": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectPropertyNullable.IPointerstring": { - "type": "object", - "properties": { - "value": { - "type": "string", - "nullable": true - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectPropertyNullable.IPointerObjectPropertyNullable.IMember": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/ObjectPropertyNullable.IMember.Nullable" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectPropertyNullable.IMember.Nullable": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "grade": { - "type": "number" - }, - "serial": { - "type": "number", - "nullable": true - }, - "activated": { - "type": "boolean", - "nullable": true - } - }, - "nullable": true, - "required": [ - "id", - "name", - "activated" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectPropertyNullable" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectRecursive.json b/test/schemas/json/v3_0/ObjectRecursive.json deleted file mode 100644 index a70f6cfadb..0000000000 --- a/test/schemas/json/v3_0/ObjectRecursive.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectRecursive.IDepartment": { - "type": "object", - "properties": { - "parent": { - "$ref": "#/components/schemas/ObjectRecursive.IDepartment.Nullable" - }, - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ObjectRecursive.ITimestamp" - } - }, - "nullable": false, - "required": [ - "parent", - "id", - "code", - "name", - "sequence", - "created_at" - ] - }, - "ObjectRecursive.IDepartment.Nullable": { - "type": "object", - "properties": { - "parent": { - "$ref": "#/components/schemas/ObjectRecursive.IDepartment.Nullable" - }, - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "created_at": { - "$ref": "#/components/schemas/ObjectRecursive.ITimestamp" - } - }, - "nullable": true, - "required": [ - "parent", - "id", - "code", - "name", - "sequence", - "created_at" - ] - }, - "ObjectRecursive.ITimestamp": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "time", - "zone" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectRecursive.IDepartment" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectRequired.json b/test/schemas/json/v3_0/ObjectRequired.json deleted file mode 100644 index 9e026e2c74..0000000000 --- a/test/schemas/json/v3_0/ObjectRequired.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "RequiredObjectRequired.IBase": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "$ref": "#/components/schemas/ObjectRequired.IBase.Nullable" - } - }, - "nullable": false, - "required": [ - "boolean", - "number", - "string", - "array", - "object" - ], - "description": "Make all properties in T required" - }, - "ObjectRequired.IBase.Nullable": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "$ref": "#/components/schemas/ObjectRequired.IBase.Nullable" - } - }, - "nullable": true - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/RequiredObjectRequired.IBase" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectSimple.json b/test/schemas/json/v3_0/ObjectSimple.json deleted file mode 100644 index 557505ff2d..0000000000 --- a/test/schemas/json/v3_0/ObjectSimple.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectSimple.IBox3D": { - "type": "object", - "properties": { - "scale": { - "$ref": "#/components/schemas/ObjectSimple.IPoint3D" - }, - "position": { - "$ref": "#/components/schemas/ObjectSimple.IPoint3D" - }, - "rotate": { - "$ref": "#/components/schemas/ObjectSimple.IPoint3D" - }, - "pivot": { - "$ref": "#/components/schemas/ObjectSimple.IPoint3D" - } - }, - "nullable": false, - "required": [ - "scale", - "position", - "rotate", - "pivot" - ] - }, - "ObjectSimple.IPoint3D": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y", - "z" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectSimple.IBox3D" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectTuple.json b/test/schemas/json/v3_0/ObjectTuple.json deleted file mode 100644 index 3b073055e0..0000000000 --- a/test/schemas/json/v3_0/ObjectTuple.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectTuple": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectTuple.ISection" - }, - { - "$ref": "#/components/schemas/ObjectTuple.ICitizen" - } - ] - }, - "minItems": 2, - "maxItems": 2 - }, - "ObjectTuple.ISection": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "code", - "name" - ] - }, - "ObjectTuple.ICitizen": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "mobile", - "name" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectTuple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUndefined.json b/test/schemas/json/v3_0/ObjectUndefined.json deleted file mode 100644 index 355a6771d1..0000000000 --- a/test/schemas/json/v3_0/ObjectUndefined.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUndefined": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUndefined.ILecture" - } - }, - "ObjectUndefined.ILecture": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "professor": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "classroom": { - "$ref": "#/components/schemas/ObjectUndefined.IClassroom" - }, - "grade": { - "type": "number" - }, - "unknown": {} - }, - "nullable": false, - "required": [ - "name", - "unknown" - ] - }, - "ObjectUndefined.IClassroom": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "name" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUndefined" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionComposite.json b/test/schemas/json/v3_0/ObjectUnionComposite.json deleted file mode 100644 index d655346b8d..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionComposite.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionComposite": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.ILine" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.ITriangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.IRectangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.IPolyline" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.IPointedShape" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.IPolygon" - }, - { - "$ref": "#/components/schemas/ObjectUnionComposite.ICircle" - } - ] - } - }, - "ObjectUnionComposite.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y" - ] - }, - "ObjectUnionComposite.ILine": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - } - }, - "nullable": false, - "required": [ - "p1", - "p2" - ] - }, - "ObjectUnionComposite.ITriangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3" - ] - }, - "ObjectUnionComposite.IRectangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "p4": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "p4" - ] - }, - "ObjectUnionComposite.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - } - } - }, - "nullable": false, - "required": [ - "points" - ] - }, - "ObjectUnionComposite.IPointedShape": { - "type": "object", - "properties": { - "outer": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - } - }, - "inner": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - } - }, - "nullable": false, - "required": [ - "outer", - "inner" - ] - }, - "ObjectUnionComposite.IPolygon": { - "type": "object", - "properties": { - "outer": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPolyline" - }, - "inner": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPolyline" - } - } - }, - "nullable": false, - "required": [ - "outer", - "inner" - ] - }, - "ObjectUnionComposite.ICircle": { - "type": "object", - "properties": { - "centroid": { - "$ref": "#/components/schemas/ObjectUnionComposite.IPoint" - }, - "radius": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "centroid", - "radius" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionComposite" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionCompositePointer.json b/test/schemas/json/v3_0/ObjectUnionCompositePointer.json deleted file mode 100644 index 8811ad7bc5..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionCompositePointer.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionCompositePointer": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IPointerIPointILineITriangleIRectangleIPolylineIPolygonIPointedShapeICircle" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "IPointerIPointILineITriangleIRectangleIPolylineIPolygonIPointedShapeICircle": { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.ILine" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.ITriangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IRectangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolyline" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPointedShape" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolygon" - }, - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.ICircle" - } - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionCompositePointer.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y" - ] - }, - "ObjectUnionCompositePointer.ILine": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - } - }, - "nullable": false, - "required": [ - "p1", - "p2" - ] - }, - "ObjectUnionCompositePointer.ITriangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3" - ] - }, - "ObjectUnionCompositePointer.IRectangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "p4": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "p4" - ] - }, - "ObjectUnionCompositePointer.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - } - } - }, - "nullable": false, - "required": [ - "points" - ] - }, - "ObjectUnionCompositePointer.IPointedShape": { - "type": "object", - "properties": { - "outer": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - } - }, - "inner": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - } - }, - "nullable": false, - "required": [ - "outer", - "inner" - ] - }, - "ObjectUnionCompositePointer.IPolygon": { - "type": "object", - "properties": { - "outer": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolyline" - }, - "inner": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPolyline" - } - } - }, - "nullable": false, - "required": [ - "outer", - "inner" - ] - }, - "ObjectUnionCompositePointer.ICircle": { - "type": "object", - "properties": { - "centroid": { - "$ref": "#/components/schemas/ObjectUnionCompositePointer.IPoint" - }, - "radius": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "centroid", - "radius" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionCompositePointer" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionDouble.json b/test/schemas/json/v3_0/ObjectUnionDouble.json deleted file mode 100644 index c0cd6fb6b7..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionDouble.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionDouble": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionDouble.Union" - } - }, - "ObjectUnionDouble.Union": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionDouble.IA" - }, - { - "$ref": "#/components/schemas/ObjectUnionDouble.IB" - } - ] - }, - "ObjectUnionDouble.IA": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "x": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x" - ] - }, - "child": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionDouble.IAB" - }, - { - "$ref": "#/components/schemas/ObjectUnionDouble.IAA" - } - ] - } - }, - "nullable": false, - "required": [ - "value", - "child" - ] - }, - "ObjectUnionDouble.IAB": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "y": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "y" - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionDouble.IAA": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "y": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "y" - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionDouble.IB": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "x": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "x" - ] - }, - "child": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionDouble.IBB" - }, - { - "$ref": "#/components/schemas/ObjectUnionDouble.IBA" - } - ] - } - }, - "nullable": false, - "required": [ - "value", - "child" - ] - }, - "ObjectUnionDouble.IBB": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "y": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "nullable": false, - "required": [ - "y" - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionDouble.IBA": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "y": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "y" - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionDouble" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionExplicit.json b/test/schemas/json/v3_0/ObjectUnionExplicit.json deleted file mode 100644 index 6128cb88ec..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionExplicit.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionExplicit": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorpointObjectUnionExplicit.IPoint" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorlineObjectUnionExplicit.ILine" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatortriangleObjectUnionExplicit.ITriangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorrectangleObjectUnionExplicit.IRectangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorpolylineObjectUnionExplicit.IPolyline" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorpolygonObjectUnionExplicit.IPolygon" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicit.DiscriminatorcircleObjectUnionExplicit.ICircle" - } - ] - } - }, - "ObjectUnionExplicit.DiscriminatorpointObjectUnionExplicit.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "type": { - "type": "string", - "enum": [ - "point" - ] - } - }, - "nullable": false, - "required": [ - "x", - "y", - "type" - ] - }, - "ObjectUnionExplicit.DiscriminatorlineObjectUnionExplicit.ILine": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "type": { - "type": "string", - "enum": [ - "line" - ] - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "type" - ] - }, - "ObjectUnionExplicit.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y" - ] - }, - "ObjectUnionExplicit.DiscriminatortriangleObjectUnionExplicit.ITriangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "type": { - "type": "string", - "enum": [ - "triangle" - ] - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "type" - ] - }, - "ObjectUnionExplicit.DiscriminatorrectangleObjectUnionExplicit.IRectangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "p4": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "type": { - "type": "string", - "enum": [ - "rectangle" - ] - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "p4", - "type" - ] - }, - "ObjectUnionExplicit.DiscriminatorpolylineObjectUnionExplicit.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - } - }, - "type": { - "type": "string", - "enum": [ - "polyline" - ] - } - }, - "nullable": false, - "required": [ - "points", - "type" - ] - }, - "ObjectUnionExplicit.DiscriminatorpolygonObjectUnionExplicit.IPolygon": { - "type": "object", - "properties": { - "outer": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPolyline" - }, - "inner": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPolyline" - } - }, - "type": { - "type": "string", - "enum": [ - "polygon" - ] - } - }, - "nullable": false, - "required": [ - "outer", - "inner", - "type" - ] - }, - "ObjectUnionExplicit.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - } - } - }, - "nullable": false, - "required": [ - "points" - ] - }, - "ObjectUnionExplicit.DiscriminatorcircleObjectUnionExplicit.ICircle": { - "type": "object", - "properties": { - "centroid": { - "$ref": "#/components/schemas/ObjectUnionExplicit.IPoint" - }, - "radius": { - "type": "number" - }, - "type": { - "type": "string", - "enum": [ - "circle" - ] - } - }, - "nullable": false, - "required": [ - "centroid", - "radius", - "type" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionExplicit" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionExplicitPointer.json b/test/schemas/json/v3_0/ObjectUnionExplicitPointer.json deleted file mode 100644 index 757451b120..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionExplicitPointer.json +++ /dev/null @@ -1,270 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionExplicitPointer": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IPointerObjectUnionExplicitPointer.Shape" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "IPointerObjectUnionExplicitPointer.Shape": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.Shape" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionExplicitPointer.Shape": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorpointObjectUnionExplicitPointer.IPoint" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorlineObjectUnionExplicitPointer.ILine" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatortriangleObjectUnionExplicitPointer.ITriangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorrectangleObjectUnionExplicitPointer.IRectangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorpolylineObjectUnionExplicitPointer.IPolyline" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorpolygonObjectUnionExplicitPointer.IPolygon" - }, - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.DiscriminatorcircleObjectUnionExplicitPointer.ICircle" - } - ] - }, - "ObjectUnionExplicitPointer.DiscriminatorpointObjectUnionExplicitPointer.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "type": { - "type": "string", - "enum": [ - "point" - ] - } - }, - "nullable": false, - "required": [ - "x", - "y", - "type" - ] - }, - "ObjectUnionExplicitPointer.DiscriminatorlineObjectUnionExplicitPointer.ILine": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "type": { - "type": "string", - "enum": [ - "line" - ] - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "type" - ] - }, - "ObjectUnionExplicitPointer.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "x", - "y" - ] - }, - "ObjectUnionExplicitPointer.DiscriminatortriangleObjectUnionExplicitPointer.ITriangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "type": { - "type": "string", - "enum": [ - "triangle" - ] - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "type" - ] - }, - "ObjectUnionExplicitPointer.DiscriminatorrectangleObjectUnionExplicitPointer.IRectangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "p4": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "type": { - "type": "string", - "enum": [ - "rectangle" - ] - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "p4", - "type" - ] - }, - "ObjectUnionExplicitPointer.DiscriminatorpolylineObjectUnionExplicitPointer.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - } - }, - "type": { - "type": "string", - "enum": [ - "polyline" - ] - } - }, - "nullable": false, - "required": [ - "points", - "type" - ] - }, - "ObjectUnionExplicitPointer.DiscriminatorpolygonObjectUnionExplicitPointer.IPolygon": { - "type": "object", - "properties": { - "outer": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPolyline" - }, - "inner": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPolyline" - } - }, - "type": { - "type": "string", - "enum": [ - "polygon" - ] - } - }, - "nullable": false, - "required": [ - "outer", - "inner", - "type" - ] - }, - "ObjectUnionExplicitPointer.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - } - } - }, - "nullable": false, - "required": [ - "points" - ] - }, - "ObjectUnionExplicitPointer.DiscriminatorcircleObjectUnionExplicitPointer.ICircle": { - "type": "object", - "properties": { - "centroid": { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer.IPoint" - }, - "radius": { - "type": "number" - }, - "type": { - "type": "string", - "enum": [ - "circle" - ] - } - }, - "nullable": false, - "required": [ - "centroid", - "radius", - "type" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionExplicitPointer" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionImplicit.json b/test/schemas/json/v3_0/ObjectUnionImplicit.json deleted file mode 100644 index 490b1c6819..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionImplicit.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionImplicit": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - { - "$ref": "#/components/schemas/ObjectUnionImplicit.ILine" - }, - { - "$ref": "#/components/schemas/ObjectUnionImplicit.ITriangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionImplicit.IRectangle" - }, - { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPolyline" - }, - { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPolygon" - }, - { - "$ref": "#/components/schemas/ObjectUnionImplicit.ICircle" - } - ] - } - }, - "ObjectUnionImplicit.IPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "slope": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "x", - "y" - ] - }, - "ObjectUnionImplicit.ILine": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "width": { - "type": "number", - "nullable": true - }, - "distance": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "p1", - "p2" - ] - }, - "ObjectUnionImplicit.ITriangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "width": { - "type": "number", - "nullable": true - }, - "height": { - "type": "number", - "nullable": true - }, - "area": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3" - ] - }, - "ObjectUnionImplicit.IRectangle": { - "type": "object", - "properties": { - "p1": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "p2": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "p3": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "p4": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "width": { - "type": "number", - "nullable": true - }, - "height": { - "type": "number", - "nullable": true - }, - "area": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "p1", - "p2", - "p3", - "p4" - ] - }, - "ObjectUnionImplicit.IPolyline": { - "type": "object", - "properties": { - "points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - } - }, - "length": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "points" - ] - }, - "ObjectUnionImplicit.IPolygon": { - "type": "object", - "properties": { - "outer": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPolyline" - }, - "inner": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPolyline" - } - }, - "area": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "outer" - ] - }, - "ObjectUnionImplicit.ICircle": { - "type": "object", - "properties": { - "radius": { - "type": "number" - }, - "centroid": { - "$ref": "#/components/schemas/ObjectUnionImplicit.IPoint" - }, - "area": { - "type": "number", - "nullable": true - } - }, - "nullable": false, - "required": [ - "radius" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionImplicit" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ObjectUnionNonPredictable.json b/test/schemas/json/v3_0/ObjectUnionNonPredictable.json deleted file mode 100644 index 5e5a72f837..0000000000 --- a/test/schemas/json/v3_0/ObjectUnionNonPredictable.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ObjectUnionNonPredictable": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrapperObjectUnionNonPredictable.IUnion" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionNonPredictable.IWrapperObjectUnionNonPredictable.IUnion": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/IPointerObjectUnionNonPredictable.IUnion" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "IPointerObjectUnionNonPredictable.IUnion": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/ObjectUnionNonPredictable.IUnion" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionNonPredictable.IUnion": { - "oneOf": [ - { - "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrapperboolean" - }, - { - "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrappernumber" - }, - { - "$ref": "#/components/schemas/ObjectUnionNonPredictable.IWrapperstring" - } - ] - }, - "ObjectUnionNonPredictable.IWrapperboolean": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/IPointerboolean" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "IPointerboolean": { - "type": "object", - "properties": { - "value": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionNonPredictable.IWrappernumber": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/IPointernumber" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "IPointernumber": { - "type": "object", - "properties": { - "value": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "ObjectUnionNonPredictable.IWrapperstring": { - "type": "object", - "properties": { - "value": { - "$ref": "#/components/schemas/IPointerstring" - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "IPointerstring": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectUnionNonPredictable" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TemplateAtomic.json b/test/schemas/json/v3_0/TemplateAtomic.json deleted file mode 100644 index 009b533ed5..0000000000 --- a/test/schemas/json/v3_0/TemplateAtomic.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TemplateAtomic": { - "type": "object", - "properties": { - "prefix": { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - "postfix": { - "type": "string", - "pattern": "((.*)_postfix)$" - }, - "middle_string": { - "type": "string", - "pattern": "^(the_(.*)_value)$" - }, - "middle_string_empty": { - "type": "string", - "pattern": "^(the_(.*)_value)$" - }, - "middle_numeric": { - "type": "string", - "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" - }, - "middle_boolean": { - "type": "string", - "enum": [ - "the_false_value", - "the_true_value" - ] - }, - "ipv4": { - "type": "string", - "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" - }, - "email": { - "type": "string", - "pattern": "((.*)@(.*)\\.(.*))" - } - }, - "nullable": false, - "required": [ - "prefix", - "postfix", - "middle_string", - "middle_string_empty", - "middle_numeric", - "middle_boolean", - "ipv4", - "email" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TemplateAtomic" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TemplateConstant.json b/test/schemas/json/v3_0/TemplateConstant.json deleted file mode 100644 index c39a182eae..0000000000 --- a/test/schemas/json/v3_0/TemplateConstant.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TemplateConstant": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TemplateConstant.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TemplateConstant.Type": { - "type": "object", - "properties": { - "prefix": { - "type": "string", - "enum": [ - "prefix_A", - "prefix_B", - "prefix_C" - ] - }, - "postfix": { - "type": "string", - "enum": [ - "1_postfix", - "2_postfix", - "3_postfix" - ] - }, - "combined": { - "type": "string", - "enum": [ - "the_1_value_with_label_A", - "the_1_value_with_label_B", - "the_1_value_with_label_C", - "the_2_value_with_label_A", - "the_2_value_with_label_B", - "the_2_value_with_label_C", - "the_3_value_with_label_A", - "the_3_value_with_label_B", - "the_3_value_with_label_C" - ] - } - }, - "nullable": false, - "required": [ - "prefix", - "postfix", - "combined" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TemplateConstant" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TemplateUnion.json b/test/schemas/json/v3_0/TemplateUnion.json deleted file mode 100644 index b81d086e1d..0000000000 --- a/test/schemas/json/v3_0/TemplateUnion.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TemplateUnion": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TemplateUnion.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TemplateUnion.Type": { - "type": "object", - "properties": { - "prefix": { - "type": "string", - "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" - }, - "postfix": { - "type": "string", - "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" - ] - } - ] - }, - "mixed": { - "oneOf": [ - { - "type": "string", - "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" - }, - { - "type": "string", - "enum": [ - "the_A_value", - "the_B_value" - ] - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "name" - ] - } - ] - } - }, - "nullable": false, - "required": [ - "prefix", - "postfix", - "middle", - "mixed" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TemplateUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ToJsonArray.json b/test/schemas/json/v3_0/ToJsonArray.json deleted file mode 100644 index c9f4eac453..0000000000 --- a/test/schemas/json/v3_0/ToJsonArray.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ToJsonArray": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToJsonArray.IObject" - } - } - ] - }, - "minItems": 4, - "maxItems": 4 - }, - "ToJsonArray.IObject": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ToJsonArray" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ToJsonDouble.json b/test/schemas/json/v3_0/ToJsonDouble.json deleted file mode 100644 index 84edc2a757..0000000000 --- a/test/schemas/json/v3_0/ToJsonDouble.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ToJsonDouble.Child": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "flag": { - "type": "boolean" - } - }, - "nullable": false, - "required": [ - "id", - "flag" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ToJsonDouble.Child" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ToJsonNull.json b/test/schemas/json/v3_0/ToJsonNull.json deleted file mode 100644 index 5515ac3288..0000000000 --- a/test/schemas/json/v3_0/ToJsonNull.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": "3.0", - "components": {}, - "schemas": [ - { - "type": "null" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ToJsonTuple.json b/test/schemas/json/v3_0/ToJsonTuple.json deleted file mode 100644 index 6f07597526..0000000000 --- a/test/schemas/json/v3_0/ToJsonTuple.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ToJsonTuple": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/ToJsonTuple.IObject" - } - ] - }, - "minItems": 4, - "maxItems": 4 - }, - "ToJsonTuple.IObject": { - "$ref": "#/components/schemas/ToJsonTuple.IHobby" - }, - "ToJsonTuple.IHobby": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "code", - "name" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ToJsonTuple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/ToJsonUnion.json b/test/schemas/json/v3_0/ToJsonUnion.json deleted file mode 100644 index 762eb8857a..0000000000 --- a/test/schemas/json/v3_0/ToJsonUnion.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "ToJsonUnion": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/ToJsonUnion.ICitizen" - }, - { - "$ref": "#/components/schemas/ToJsonUnion.IProduct" - }, - { - "type": "string" - }, - { - "type": "number" - }, - { - "$ref": "#/components/schemas/ToJsonUnion.ICitizen" - } - ] - } - }, - "ToJsonUnion.ICitizen": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "mobile": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "id", - "mobile", - "name" - ] - }, - "ToJsonUnion.IProduct": { - "type": "object", - "properties": { - "manufacturer": { - "type": "string" - }, - "brand": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "manufacturer", - "brand", - "name" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ToJsonUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TupleHierarchical.json b/test/schemas/json/v3_0/TupleHierarchical.json deleted file mode 100644 index e0a75a157f..0000000000 --- a/test/schemas/json/v3_0/TupleHierarchical.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TupleHierarchical": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "nullable": true - }, - { - "type": "number", - "nullable": true - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "nullable": true - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "minItems": 2, - "maxItems": 2 - } - ] - }, - "minItems": 2, - "maxItems": 2, - "nullable": true - } - ] - }, - "minItems": 3, - "maxItems": 3, - "nullable": true - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "minItems": 2, - "maxItems": 2 - } - ] - }, - "minItems": 3, - "maxItems": 3 - } - } - ] - }, - "minItems": 3, - "maxItems": 3 - } - } - ] - }, - "minItems": 2, - "maxItems": 2, - "nullable": true - } - ] - }, - "minItems": 5, - "maxItems": 5 - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TupleHierarchical" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TupleRestObject.json b/test/schemas/json/v3_0/TupleRestObject.json deleted file mode 100644 index 5abe0e4dbf..0000000000 --- a/test/schemas/json/v3_0/TupleRestObject.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TupleRestObject": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "$ref": "#/components/schemas/TupleRestObject.IObject" - } - ] - }, - "minItems": 2 - }, - "TupleRestObject.IObject": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TupleRestObject" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagArray.json b/test/schemas/json/v3_0/TypeTagArray.json deleted file mode 100644 index 8286dea0b0..0000000000 --- a/test/schemas/json/v3_0/TypeTagArray.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagArray": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagArray.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TypeTagArray.Type": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 3 - }, - "minItems": { - "type": "array", - "items": { - "type": "number", - "minimum": 3 - }, - "minItems": 3 - }, - "both": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 7 - }, - "equal": { - "type": "array", - "items": { - "type": "number", - "minimum": 10, - "maximum": 10 - }, - "minItems": 10, - "maxItems": 10 - }, - "unique": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "nullable": false, - "required": [ - "items", - "minItems", - "both", - "equal", - "unique" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagArray" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagArrayUnion.json b/test/schemas/json/v3_0/TypeTagArrayUnion.json deleted file mode 100644 index 385621f035..0000000000 --- a/test/schemas/json/v3_0/TypeTagArrayUnion.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagArrayUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagArrayUnion.Type" - } - }, - "TypeTagArrayUnion.Type": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 3 - }, - "minItems": { - "type": "array", - "items": { - "type": "number", - "minimum": 3 - }, - "minItems": 3 - }, - "maxItems": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "maxLength": 7 - }, - { - "type": "number", - "maximum": 7 - } - ] - }, - "maxItems": 7 - }, - "both": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 7 - } - }, - "nullable": false, - "required": [ - "items", - "minItems", - "maxItems", - "both" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagArrayUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagAtomicUnion.json b/test/schemas/json/v3_0/TypeTagAtomicUnion.json deleted file mode 100644 index 82f726c307..0000000000 --- a/test/schemas/json/v3_0/TypeTagAtomicUnion.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagAtomicUnion": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagAtomicUnion.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TypeTagAtomicUnion.Type": { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - { - "type": "number", - "minimum": 3 - } - ] - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagAtomicUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagCustom.json b/test/schemas/json/v3_0/TypeTagCustom.json deleted file mode 100644 index 5a9cea97c7..0000000000 --- a/test/schemas/json/v3_0/TypeTagCustom.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagCustom": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "dollar": { - "type": "string", - "x-typia-monetary": "dollar" - }, - "postfix": { - "type": "string", - "x-typia-postfix": "abcd" - }, - "powerOf": { - "type": "number", - "x-typia-powerOf": 2 - } - }, - "nullable": false, - "required": [ - "id", - "dollar", - "postfix", - "powerOf" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagCustom" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagDefault.json b/test/schemas/json/v3_0/TypeTagDefault.json deleted file mode 100644 index 538a20d358..0000000000 --- a/test/schemas/json/v3_0/TypeTagDefault.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagDefault": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean", - "default": false - }, - "number": { - "type": "number", - "default": 1 - }, - "string": { - "type": "string", - "default": "two" - }, - "text": { - "type": "string", - "default": "Very long text, can you understand it?" - }, - "boolean_and_number_and_string": { - "oneOf": [ - { - "type": "number", - "default": 1 - }, - { - "type": "string", - "default": "two" - }, - { - "type": "boolean", - "default": false - } - ] - }, - "union_but_boolean": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean", - "default": false - } - ] - }, - "union_but_number": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number", - "default": 1 - }, - { - "type": "boolean" - } - ] - }, - "union_but_string": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string", - "default": "two" - }, - { - "type": "boolean" - } - ] - }, - "boolean_and_number_and_template": { - "oneOf": [ - { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - { - "type": "number", - "default": 2 - }, - { - "type": "boolean", - "default": false - } - ] - } - }, - "nullable": false, - "required": [ - "boolean", - "number", - "string", - "text", - "boolean_and_number_and_string", - "union_but_boolean", - "union_but_number", - "union_but_string", - "boolean_and_number_and_template" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagDefault" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagFormat.json b/test/schemas/json/v3_0/TypeTagFormat.json deleted file mode 100644 index 00d68362f8..0000000000 --- a/test/schemas/json/v3_0/TypeTagFormat.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagFormat": { - "type": "object", - "properties": { - "byte": { - "type": "string", - "format": "byte" - }, - "password": { - "type": "string", - "format": "password" - }, - "regex": { - "type": "string", - "format": "regex" - }, - "uuid": { - "type": "string", - "format": "uuid" - }, - "email": { - "type": "string", - "format": "email" - }, - "hostname": { - "type": "string", - "format": "hostname" - }, - "idnEmail": { - "type": "string", - "format": "idn-email" - }, - "idnHostname": { - "type": "string", - "format": "idn-hostname" - }, - "iri": { - "type": "string", - "format": "iri" - }, - "iriReference": { - "type": "string", - "format": "iri-reference" - }, - "ipv4": { - "type": "string", - "format": "ipv4" - }, - "ipv6": { - "type": "string", - "format": "ipv6" - }, - "uri": { - "type": "string", - "format": "uri" - }, - "uriReference": { - "type": "string", - "format": "uri-reference" - }, - "uriTemplate": { - "type": "string", - "format": "uri-template" - }, - "url": { - "type": "string", - "format": "url" - }, - "datetime": { - "type": "string", - "format": "date-time" - }, - "date": { - "type": "string", - "format": "date" - }, - "time": { - "type": "string", - "format": "time" - }, - "duration": { - "type": "string", - "format": "duration" - }, - "jsonPointer": { - "type": "string", - "format": "json-pointer" - }, - "relativeJsonPointer": { - "type": "string", - "format": "relative-json-pointer" - } - }, - "nullable": false, - "required": [ - "byte", - "password", - "regex", - "uuid", - "email", - "hostname", - "idnEmail", - "idnHostname", - "iri", - "iriReference", - "ipv4", - "ipv6", - "uri", - "uriReference", - "uriTemplate", - "url", - "datetime", - "date", - "time", - "duration", - "jsonPointer", - "relativeJsonPointer" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagFormat" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagLength.json b/test/schemas/json/v3_0/TypeTagLength.json deleted file mode 100644 index 665520c074..0000000000 --- a/test/schemas/json/v3_0/TypeTagLength.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagLength": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagLength.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TypeTagLength.Type": { - "type": "object", - "properties": { - "fixed": { - "type": "string", - "minLength": 5, - "maxLength": 5 - }, - "minimum": { - "type": "string", - "minLength": 3 - }, - "maximum": { - "type": "string", - "maxLength": 7 - }, - "minimum_and_maximum": { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - "equal": { - "type": "string", - "minLength": 10, - "maxLength": 19 - } - }, - "nullable": false, - "required": [ - "fixed", - "minimum", - "maximum", - "minimum_and_maximum", - "equal" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagLength" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagMatrix.json b/test/schemas/json/v3_0/TypeTagMatrix.json deleted file mode 100644 index 288947d1ed..0000000000 --- a/test/schemas/json/v3_0/TypeTagMatrix.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagMatrix": { - "type": "object", - "properties": { - "matrix": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 4, - "maxItems": 4 - }, - "minItems": 3, - "maxItems": 3 - } - }, - "nullable": false, - "required": [ - "matrix" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagMatrix" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagObjectUnion.json b/test/schemas/json/v3_0/TypeTagObjectUnion.json deleted file mode 100644 index ffe52f9d0f..0000000000 --- a/test/schemas/json/v3_0/TypeTagObjectUnion.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagObjectUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagObjectUnion.Type" - } - }, - "TypeTagObjectUnion.Type": { - "oneOf": [ - { - "$ref": "#/components/schemas/TypeTagObjectUnion.Numeric" - }, - { - "$ref": "#/components/schemas/TypeTagObjectUnion.Literal" - } - ] - }, - "TypeTagObjectUnion.Numeric": { - "type": "object", - "properties": { - "value": { - "type": "number", - "minimum": 3 - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TypeTagObjectUnion.Literal": { - "type": "object", - "properties": { - "value": { - "type": "string", - "minLength": 3, - "maxLength": 7 - } - }, - "nullable": false, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagObjectUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagPattern.json b/test/schemas/json/v3_0/TypeTagPattern.json deleted file mode 100644 index 56a6e2539e..0000000000 --- a/test/schemas/json/v3_0/TypeTagPattern.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagPattern": { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" - }, - "email": { - "type": "string", - "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" - }, - "ipv4": { - "type": "string", - "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" - }, - "ipv6": { - "type": "string", - "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", - "ipv4", - "ipv6" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagPattern" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagRange.json b/test/schemas/json/v3_0/TypeTagRange.json deleted file mode 100644 index 9888c8b0cb..0000000000 --- a/test/schemas/json/v3_0/TypeTagRange.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagRange": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagRange.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TypeTagRange.Type": { - "type": "object", - "properties": { - "greater": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3 - }, - "greater_equal": { - "type": "integer", - "minimum": 3 - }, - "less": { - "type": "integer", - "exclusiveMaximum": true, - "maximum": 7 - }, - "less_equal": { - "type": "integer", - "maximum": 7 - }, - "greater_less": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_equal_less": { - "type": "integer", - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_less_equal": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "maximum": 7 - }, - "greater_equal_less_equal": { - "type": "integer", - "minimum": 3, - "maximum": 7 - }, - "equal": { - "type": "integer", - "minimum": 10, - "maximum": 10 - } - }, - "nullable": false, - "required": [ - "greater", - "greater_equal", - "less", - "less_equal", - "greater_less", - "greater_equal_less", - "greater_less_equal", - "greater_equal_less_equal", - "equal" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagRange" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagTuple.json b/test/schemas/json/v3_0/TypeTagTuple.json deleted file mode 100644 index 50ba180bb4..0000000000 --- a/test/schemas/json/v3_0/TypeTagTuple.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagTuple": { - "type": "object", - "properties": { - "tuple": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - { - "type": "number", - "minimum": 3, - "maximum": 7 - }, - { - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 2 - }, - "minItems": 3, - "maxItems": 7 - }, - { - "type": "array", - "items": { - "type": "number", - "minimum": 1, - "maximum": 2 - }, - "minItems": 3, - "maxItems": 7 - } - ] - }, - "minItems": 4, - "maxItems": 4 - } - }, - "nullable": false, - "required": [ - "tuple" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagTuple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/TypeTagType.json b/test/schemas/json/v3_0/TypeTagType.json deleted file mode 100644 index 9369e06e64..0000000000 --- a/test/schemas/json/v3_0/TypeTagType.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "TypeTagType": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TypeTagType.Type" - } - } - }, - "nullable": false, - "required": [ - "value" - ] - }, - "TypeTagType.Type": { - "type": "object", - "properties": { - "int": { - "type": "integer" - }, - "uint": { - "type": "integer" - }, - "int32": { - "type": "integer" - }, - "uint32": { - "type": "integer" - }, - "int64": { - "type": "integer" - }, - "uint64": { - "type": "integer" - }, - "float": { - "type": "number" - } - }, - "nullable": false, - "required": [ - "int", - "uint", - "int32", - "uint32", - "int64", - "uint64", - "float" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagType" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_0/UltimateUnion.json b/test/schemas/json/v3_0/UltimateUnion.json deleted file mode 100644 index 33f8047036..0000000000 --- a/test/schemas/json/v3_0/UltimateUnion.json +++ /dev/null @@ -1,1166 +0,0 @@ -{ - "version": "3.0", - "components": { - "schemas": { - "UltimateUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IJsonApplication.IV3_1Arrayunknown" - } - }, - "IJsonApplication.IV3_1Arrayunknown": { - "type": "object", - "properties": { - "version": { - "type": "string", - "enum": [ - "3.1" - ] - }, - "components": { - "$ref": "#/components/schemas/OpenApi.IComponentsOpenApi.IJsonSchema" - }, - "schemas": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema" - } - }, - "__types": { - "type": "array", - "items": {} - } - }, - "nullable": false, - "required": [ - "version", - "components", - "schemas" - ] - }, - "OpenApi.IComponentsOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "schemas": { - "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", - "title": "An object to hold reusable DTO schemas", - "description": "An object to hold reusable DTO schemas.\n\nIn other words, a collection of named JSON schemas." - }, - "securitySchemes": { - "$ref": "#/components/schemas/RecordstringOpenApi.ISecurityScheme", - "title": "An object to hold reusable security schemes", - "description": "An object to hold reusable security schemes.\n\nIn other words, a collection of named security schemes." - } - }, - "nullable": false, - "description": "Reusable components in OpenAPI.\n\nA storage of reusable components in OpenAPI document.\n\nIn other words, it is a storage of named DTO schemas and security schemes." - }, - "RecordstringOpenApi.IJsonSchema": { - "type": "object", - "properties": {}, - "nullable": false, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema" - } - }, - "OpenApi.IJsonSchema": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ], - "description": "Type schema info.\n\n`OpenApi.IJsonSchema` is a type schema info of the OpenAPI.\n\n`OpenApi.IJsonSchema` basically follows the JSON schema definition of\nOpenAPI v3.1, but a little bit shrinked to remove ambiguous and duplicated\nexpressions of OpenAPI v3.1 for the convenience and clarity.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Array type utilizes only single {@link OpenAPI.IJsonSchema.IArray.items}\n- Tuple type utilizes only {@link OpenApi.IJsonSchema.ITuple.prefixItems}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAnyOf} to {@link OpenApi.IJsonSchema.IOneOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link OpenApi.IJsonSchema.IReference}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link OpenApi.IJsonSchema.IObject}" - }, - "OpenApi.IJsonSchema.IConstant": { - "type": "object", - "properties": { - "const": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "The constant value", - "description": "The constant value." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "const" - ], - "description": "Constant value type." - }, - "Recordstringany": { - "type": "object", - "properties": {}, - "nullable": false, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": {} - }, - "OpenApi.IJsonSchema.IBoolean": { - "type": "object", - "properties": { - "default": { - "type": "boolean", - "title": "The default value", - "description": "The default value." - }, - "type": { - "type": "string", - "enum": [ - "boolean" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "Boolean type info." - }, - "OpenApi.IJsonSchema.IInteger": { - "type": "object", - "properties": { - "default": { - "type": "integer", - "title": "Default value", - "description": "Default value." - }, - "minimum": { - "type": "integer", - "title": "Minimum value restriction", - "description": "Minimum value restriction." - }, - "maximum": { - "type": "integer", - "title": "Maximum value restriction", - "description": "Maximum value restriction." - }, - "exclusiveMinimum": { - "type": "boolean", - "title": "Exclusive minimum value restriction", - "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." - }, - "exclusiveMaximum": { - "type": "boolean", - "title": "Exclusive maximum value restriction", - "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." - }, - "multipleOf": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 0, - "title": "Multiple of value restriction", - "description": "Multiple of value restriction." - }, - "type": { - "type": "string", - "enum": [ - "integer" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "Integer type info." - }, - "OpenApi.IJsonSchema.INumber": { - "type": "object", - "properties": { - "default": { - "type": "number", - "title": "Default value", - "description": "Default value." - }, - "minimum": { - "type": "number", - "title": "Minimum value restriction", - "description": "Minimum value restriction." - }, - "maximum": { - "type": "number", - "title": "Maximum value restriction", - "description": "Maximum value restriction." - }, - "exclusiveMinimum": { - "type": "boolean", - "title": "Exclusive minimum value restriction", - "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." - }, - "exclusiveMaximum": { - "type": "boolean", - "title": "Exclusive maximum value restriction", - "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": true, - "minimum": 0, - "title": "Multiple of value restriction", - "description": "Multiple of value restriction." - }, - "type": { - "type": "string", - "enum": [ - "number" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "Number (double) type info." - }, - "OpenApi.IJsonSchema.IString": { - "type": "object", - "properties": { - "default": { - "type": "string", - "title": "Default value", - "description": "Default value." - }, - "format": { - "type": "string", - "title": "Format restriction", - "description": "Format restriction." - }, - "pattern": { - "type": "string", - "title": "Pattern restriction", - "description": "Pattern restriction." - }, - "contentMediaType": { - "type": "string", - "title": "Content media type restriction", - "description": "Content media type restriction." - }, - "minLength": { - "type": "integer", - "title": "Minimum length restriction", - "description": "Minimum length restriction." - }, - "maxLength": { - "type": "integer", - "title": "Maximum length restriction", - "description": "Maximum length restriction." - }, - "type": { - "type": "string", - "enum": [ - "string" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "String type info." - }, - "OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "items": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema", - "title": "Items type info", - "description": "Items type info.\n\nThe `items` means the type of the array elements. In other words, it is\nthe type schema info of the `T` in the TypeScript array type `Array`." - }, - "uniqueItems": { - "type": "boolean", - "title": "Unique items restriction", - "description": "Unique items restriction.\n\nIf this property value is `true`, target array must have unique items." - }, - "minItems": { - "type": "integer", - "title": "Minimum items restriction", - "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the array." - }, - "maxItems": { - "type": "integer", - "title": "Maximum items restriction", - "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the array." - }, - "type": { - "type": "string", - "enum": [ - "array" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "items", - "type" - ], - "description": "Array type info." - }, - "OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "prefixItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema" - }, - "title": "Prefix items", - "description": "Prefix items.\n\nThe `prefixItems` means the type schema info of the prefix items in the\ntuple type. In the TypeScript, it is expressed as `[T1, T2]`.\n\nIf you want to express `[T1, T2, ...TO[]]` type, you can configure the\n`...TO[]` through the {@link additionalItems} property." - }, - "additionalItems": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ], - "title": "Additional items", - "description": "Additional items.\n\nThe `additionalItems` means the type schema info of the additional items\nafter the {@link prefixItems}. In the TypeScript, if there's a type\n`[T1, T2, ...TO[]]`, the `...TO[]` is represented by the `additionalItems`.\n\nBy the way, if you configure the `additionalItems` as `true`, it means\nthe additional items are not restricted. They can be any type, so that\nit is equivalent to the TypeScript type `[T1, T2, ...any[]]`.\n\nOtherwise configure the `additionalItems` as the {@link IJsonSchema},\nit means the additional items must follow the type schema info.\nTherefore, it is equivalent to the TypeScript type `[T1, T2, ...TO[]]`." - }, - "uniqueItems": { - "type": "boolean", - "title": "Unique items restriction", - "description": "Unique items restriction.\n\nIf this property value is `true`, target tuple must have unique items." - }, - "minItems": { - "type": "integer", - "title": "Minimum items restriction", - "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the tuple." - }, - "maxItems": { - "type": "integer", - "title": "Maximum items restriction", - "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the tuple." - }, - "type": { - "type": "string", - "enum": [ - "array" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "prefixItems", - "type" - ], - "description": "Tuple type info." - }, - "OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", - "title": "Properties of the object", - "description": "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's\nregular properties. The key is the name of the regular property,\nand the value is the type schema info.\n\nIf you need additional properties that is represented by dynamic key,\nyou can use the {@link additionalProperties} instead." - }, - "additionalProperties": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ], - "title": "Additional properties' info", - "description": "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nIf the value is `true`, it means that the additional properties are not\nrestricted. They can be any type. Otherwise, if the value is\n{@link IOpenAiSchema} type, it means that the additional properties must\nfollow the type schema info.\n\n- `true`: `Record`\n- `IOpenAiSchema`: `Record`" - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of key values of the required properties", - "description": "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```" - }, - "type": { - "type": "string", - "enum": [ - "object" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "Object type info." - }, - "OpenApi.IJsonSchema.IReferencestring": { - "type": "object", - "properties": { - "$ref": { - "type": "string", - "title": "Reference to the named schema", - "description": "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/components/schemas/` which means the type is stored in\nthe {@link OpenApi.IComponents.schemas} object.\n\n- `#/components/schemas/SomeObject`\n- `#/components/schemas/AnotherObject`" - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "$ref" - ], - "description": "Reference type directing named schema." - }, - "OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ] - }, - "title": "List of the union types", - "description": "List of the union types." - }, - "discriminator": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf.IDiscriminator", - "title": "Discriminator info of the union type", - "description": "Discriminator info of the union type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "oneOf" - ], - "description": "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly\nconverts it to `oneOf` type." - }, - "OpenApi.IJsonSchema.INull": { - "type": "object", - "properties": { - "default": { - "type": "null", - "title": "Default value", - "description": "Default value." - }, - "type": { - "type": "string", - "enum": [ - "null" - ], - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "Null type." - }, - "OpenApi.IJsonSchema.IUnknown": { - "type": "object", - "properties": { - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "nullable": false, - "description": "Unknown, `any` type." - }, - "OpenApi.IJsonSchema.IOneOf.IDiscriminator": { - "type": "object", - "properties": { - "propertyName": { - "type": "string", - "title": "Property name for the discriminator", - "description": "Property name for the discriminator." - }, - "mapping": { - "$ref": "#/components/schemas/Recordstringstring", - "title": "Mapping of the discriminator value to the schema name", - "description": "Mapping of the discriminator value to the schema name.\n\nThis property is valid only for {@link IReference} typed\n{@link IOneOf.oneof} elements. Therefore, `key` of `mapping` is\nthe discriminator value, and `value` of `mapping` is the\nschema name like `#/components/schemas/SomeObject`." - } - }, - "nullable": false, - "required": [ - "propertyName" - ], - "description": "Discriminator info of the union type." - }, - "Recordstringstring": { - "type": "object", - "properties": {}, - "nullable": false, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "type": "string" - } - }, - "RecordstringOpenApi.ISecurityScheme": { - "type": "object", - "properties": {}, - "nullable": false, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme" - } - }, - "OpenApi.ISecurityScheme": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IApiKey" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBasic" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBearer" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOpenId" - } - ], - "description": "Security scheme of Swagger Documents.\n\n`OpenApi.ISecurityScheme` is a data structure representing content of\n`securitySchemes` in `swagger.json` file. It is composed with 5 types of\nsecurity schemes as an union type like below." - }, - "OpenApi.ISecurityScheme.IApiKey": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "in": { - "type": "string", - "enum": [ - "cookie", - "header", - "query" - ] - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "type" - ], - "description": "Normal API key type." - }, - "OpenApi.ISecurityScheme.IHttpBasic": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "scheme": { - "type": "string", - "enum": [ - "basic" - ] - }, - "description": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "type", - "scheme" - ], - "description": "HTTP basic authentication type." - }, - "OpenApi.ISecurityScheme.IHttpBearer": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "http" - ] - }, - "scheme": { - "type": "string", - "enum": [ - "bearer" - ] - }, - "bearerFormat": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "type", - "scheme" - ], - "description": "HTTP bearer authentication type." - }, - "OpenApi.ISecurityScheme.IOAuth2": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flows": { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlowSet" - }, - "description": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "type", - "flows" - ], - "description": "OAuth2 authentication type." - }, - "OpenApi.ISecurityScheme.IOAuth2.IFlowSet": { - "type": "object", - "properties": { - "authorizationCode": { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlow" - }, - "implicit": { - "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl" - }, - "password": { - "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" - }, - "clientCredentials": { - "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" - } - }, - "nullable": false - }, - "OpenApi.ISecurityScheme.IOAuth2.IFlow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/components/schemas/Recordstringstring" - } - }, - "nullable": false - }, - "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/components/schemas/Recordstringstring" - } - }, - "nullable": false, - "description": "Construct a type with the properties of T except for those in type K." - }, - "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/components/schemas/Recordstringstring" - } - }, - "nullable": false, - "description": "Construct a type with the properties of T except for those in type K." - }, - "OpenApi.ISecurityScheme.IOpenId": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] - }, - "openIdConnectUrl": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "nullable": false, - "required": [ - "type", - "openIdConnectUrl" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/UltimateUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ArrayUnion.json b/test/schemas/json/v3_1/ArrayUnion.json deleted file mode 100644 index 6932a19a9e..0000000000 --- a/test/schemas/json/v3_1/ArrayUnion.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "ArrayUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArrayUnion.IUnion" - } - }, - "ArrayUnion.IUnion": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - } - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ArrayUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicArray.json b/test/schemas/json/v3_1/DynamicArray.json deleted file mode 100644 index d88dffc28b..0000000000 --- a/test/schemas/json/v3_1/DynamicArray.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicArray": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {}, - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicArray" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicEnumeration.json b/test/schemas/json/v3_1/DynamicEnumeration.json deleted file mode 100644 index 94e5e3636c..0000000000 --- a/test/schemas/json/v3_1/DynamicEnumeration.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicEnumeration": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "ar": { - "type": "string" - }, - "zh-Hans": { - "type": "string" - }, - "zh-Hant": { - "type": "string" - }, - "en": { - "type": "string" - }, - "fr": { - "type": "string" - }, - "de": { - "type": "string" - }, - "ja": { - "type": "string" - }, - "ko": { - "type": "string" - }, - "pt": { - "type": "string" - }, - "ru": { - "type": "string" - } - } - } - }, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicEnumeration" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicNever.json b/test/schemas/json/v3_1/DynamicNever.json deleted file mode 100644 index bf22651306..0000000000 --- a/test/schemas/json/v3_1/DynamicNever.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicNever": { - "type": "object", - "properties": {} - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicNever" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicSimple.json b/test/schemas/json/v3_1/DynamicSimple.json deleted file mode 100644 index a0ba40a255..0000000000 --- a/test/schemas/json/v3_1/DynamicSimple.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicSimple": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {}, - "additionalProperties": { - "type": "number" - } - } - }, - "required": [ - "value" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicSimple" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicTemplate.json b/test/schemas/json/v3_1/DynamicTemplate.json deleted file mode 100644 index c1576770d6..0000000000 --- a/test/schemas/json/v3_1/DynamicTemplate.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicTemplate": { - "type": "object", - "properties": {}, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicTemplate" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicTree.json b/test/schemas/json/v3_1/DynamicTree.json deleted file mode 100644 index 41150eca10..0000000000 --- a/test/schemas/json/v3_1/DynamicTree.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicTree": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "children": { - "$ref": "#/components/schemas/RecordstringDynamicTree" - } - }, - "required": [ - "id", - "sequence", - "children" - ] - }, - "RecordstringDynamicTree": { - "type": "object", - "properties": {}, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "$ref": "#/components/schemas/DynamicTree" - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicTree" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicUndefined.json b/test/schemas/json/v3_1/DynamicUndefined.json deleted file mode 100644 index 65a824d917..0000000000 --- a/test/schemas/json/v3_1/DynamicUndefined.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicUndefined": { - "type": "object", - "properties": {} - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicUndefined" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/DynamicUnion.json b/test/schemas/json/v3_1/DynamicUnion.json deleted file mode 100644 index 9536354173..0000000000 --- a/test/schemas/json/v3_1/DynamicUnion.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "DynamicUnion": { - "type": "object", - "properties": {}, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/DynamicUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectDynamic.json b/test/schemas/json/v3_1/ObjectDynamic.json deleted file mode 100644 index 5ee5bb4e47..0000000000 --- a/test/schemas/json/v3_1/ObjectDynamic.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "ObjectDynamic": { - "type": "object", - "properties": {}, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectDynamic" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectOptional.json b/test/schemas/json/v3_1/ObjectOptional.json deleted file mode 100644 index e3405f8b50..0000000000 --- a/test/schemas/json/v3_1/ObjectOptional.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "ObjectOptional": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sequence": { - "type": "number" - } - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/ObjectOptional" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectPartial.json b/test/schemas/json/v3_1/ObjectPartial.json deleted file mode 100644 index 5f5264e7da..0000000000 --- a/test/schemas/json/v3_1/ObjectPartial.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "PartialObjectPartial.IBase": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ObjectPartial.IBase" - } - ] - } - }, - "description": "Make all properties in T optional" - }, - "ObjectPartial.IBase": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ObjectPartial.IBase" - } - ] - } - }, - "required": [ - "boolean", - "number", - "string", - "array", - "object" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/PartialObjectPartial.IBase" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/ObjectRequired.json b/test/schemas/json/v3_1/ObjectRequired.json deleted file mode 100644 index 2b09234d0a..0000000000 --- a/test/schemas/json/v3_1/ObjectRequired.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "RequiredObjectRequired.IBase": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ObjectRequired.IBase" - } - ] - } - }, - "required": [ - "boolean", - "number", - "string", - "array", - "object" - ], - "description": "Make all properties in T required" - }, - "ObjectRequired.IBase": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "string": { - "type": "string" - }, - "array": { - "type": "array", - "items": { - "type": "number" - } - }, - "object": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/ObjectRequired.IBase" - } - ] - } - } - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/RequiredObjectRequired.IBase" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/TypeTagDefault.json b/test/schemas/json/v3_1/TypeTagDefault.json deleted file mode 100644 index f3685eaf5b..0000000000 --- a/test/schemas/json/v3_1/TypeTagDefault.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "TypeTagDefault": { - "type": "object", - "properties": { - "boolean": { - "type": "boolean", - "default": false - }, - "number": { - "type": "number", - "default": 1 - }, - "string": { - "type": "string", - "default": "two" - }, - "text": { - "type": "string", - "default": "Very long text, can you understand it?" - }, - "boolean_and_number_and_string": { - "oneOf": [ - { - "type": "number", - "default": 1 - }, - { - "type": "string", - "default": "two" - }, - { - "type": "boolean", - "default": false - } - ] - }, - "union_but_boolean": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean", - "default": false - } - ] - }, - "union_but_number": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number", - "default": 1 - }, - { - "type": "boolean" - } - ] - }, - "union_but_string": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string", - "default": "two" - }, - { - "type": "boolean" - } - ] - }, - "boolean_and_number_and_template": { - "oneOf": [ - { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - { - "type": "number", - "default": 2 - }, - { - "type": "boolean", - "default": false - } - ] - } - }, - "required": [ - "boolean", - "number", - "string", - "text", - "boolean_and_number_and_string", - "union_but_boolean", - "union_but_number", - "union_but_string", - "boolean_and_number_and_template" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/TypeTagDefault" - } - ] -} \ No newline at end of file diff --git a/test/schemas/json/v3_1/UltimateUnion.json b/test/schemas/json/v3_1/UltimateUnion.json deleted file mode 100644 index 852f99cef9..0000000000 --- a/test/schemas/json/v3_1/UltimateUnion.json +++ /dev/null @@ -1,1097 +0,0 @@ -{ - "version": "3.1", - "components": { - "schemas": { - "UltimateUnion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IJsonApplication.IV3_1Arrayunknown" - } - }, - "IJsonApplication.IV3_1Arrayunknown": { - "type": "object", - "properties": { - "version": { - "const": "3.1" - }, - "components": { - "$ref": "#/components/schemas/OpenApi.IComponentsOpenApi.IJsonSchema" - }, - "schemas": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema" - } - }, - "__types": { - "type": "array", - "items": {} - } - }, - "required": [ - "version", - "components", - "schemas" - ] - }, - "OpenApi.IComponentsOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "schemas": { - "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", - "title": "An object to hold reusable DTO schemas", - "description": "An object to hold reusable DTO schemas.\n\nIn other words, a collection of named JSON schemas." - }, - "securitySchemes": { - "$ref": "#/components/schemas/RecordstringOpenApi.ISecurityScheme", - "title": "An object to hold reusable security schemes", - "description": "An object to hold reusable security schemes.\n\nIn other words, a collection of named security schemes." - } - }, - "description": "Reusable components in OpenAPI.\n\nA storage of reusable components in OpenAPI document.\n\nIn other words, it is a storage of named DTO schemas and security schemes." - }, - "RecordstringOpenApi.IJsonSchema": { - "type": "object", - "properties": {}, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema" - } - }, - "OpenApi.IJsonSchema": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ], - "title": "Type schema info", - "description": "Type schema info.\n\n`OpenApi.IJsonSchema` is a type schema info of the OpenAPI.\n\n`OpenApi.IJsonSchema` basically follows the JSON schema definition of\nOpenAPI v3.1, but a little bit shrinked to remove ambiguous and duplicated\nexpressions of OpenAPI v3.1 for the convenience and clarity.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Array type utilizes only single {@link OpenAPI.IJsonSchema.IArray.items}\n- Tuple type utilizes only {@link OpenApi.IJsonSchema.ITuple.prefixItems}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAnyOf} to {@link OpenApi.IJsonSchema.IOneOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link OpenApi.IJsonSchema.IReference}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link OpenApi.IJsonSchema.IObject}" - }, - "OpenApi.IJsonSchema.IConstant": { - "type": "object", - "properties": { - "const": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "The constant value", - "description": "The constant value." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "const" - ], - "description": "Constant value type." - }, - "Recordstringany": { - "type": "object", - "properties": {}, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": {} - }, - "OpenApi.IJsonSchema.IBoolean": { - "type": "object", - "properties": { - "default": { - "type": "boolean", - "title": "The default value", - "description": "The default value." - }, - "type": { - "const": "boolean", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "type" - ], - "description": "Boolean type info." - }, - "OpenApi.IJsonSchema.IInteger": { - "type": "object", - "properties": { - "default": { - "type": "integer", - "title": "Default value", - "description": "Default value." - }, - "minimum": { - "type": "integer", - "title": "Minimum value restriction", - "description": "Minimum value restriction." - }, - "maximum": { - "type": "integer", - "title": "Maximum value restriction", - "description": "Maximum value restriction." - }, - "exclusiveMinimum": { - "type": "boolean", - "title": "Exclusive minimum value restriction", - "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." - }, - "exclusiveMaximum": { - "type": "boolean", - "title": "Exclusive maximum value restriction", - "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." - }, - "multipleOf": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 0, - "title": "Multiple of value restriction", - "description": "Multiple of value restriction." - }, - "type": { - "const": "integer", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "type" - ], - "description": "Integer type info." - }, - "OpenApi.IJsonSchema.INumber": { - "type": "object", - "properties": { - "default": { - "type": "number", - "title": "Default value", - "description": "Default value." - }, - "minimum": { - "type": "number", - "title": "Minimum value restriction", - "description": "Minimum value restriction." - }, - "maximum": { - "type": "number", - "title": "Maximum value restriction", - "description": "Maximum value restriction." - }, - "exclusiveMinimum": { - "type": "boolean", - "title": "Exclusive minimum value restriction", - "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property." - }, - "exclusiveMaximum": { - "type": "boolean", - "title": "Exclusive maximum value restriction", - "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property." - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": true, - "minimum": 0, - "title": "Multiple of value restriction", - "description": "Multiple of value restriction." - }, - "type": { - "const": "number", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "type" - ], - "description": "Number (double) type info." - }, - "OpenApi.IJsonSchema.IString": { - "type": "object", - "properties": { - "default": { - "type": "string", - "title": "Default value", - "description": "Default value." - }, - "format": { - "type": "string", - "title": "Format restriction", - "description": "Format restriction." - }, - "pattern": { - "type": "string", - "title": "Pattern restriction", - "description": "Pattern restriction." - }, - "contentMediaType": { - "type": "string", - "title": "Content media type restriction", - "description": "Content media type restriction." - }, - "minLength": { - "type": "integer", - "title": "Minimum length restriction", - "description": "Minimum length restriction." - }, - "maxLength": { - "type": "integer", - "title": "Maximum length restriction", - "description": "Maximum length restriction." - }, - "type": { - "const": "string", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "type" - ], - "description": "String type info." - }, - "OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "items": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema", - "title": "Items type info", - "description": "Items type info.\n\nThe `items` means the type of the array elements. In other words, it is\nthe type schema info of the `T` in the TypeScript array type `Array`." - }, - "uniqueItems": { - "type": "boolean", - "title": "Unique items restriction", - "description": "Unique items restriction.\n\nIf this property value is `true`, target array must have unique items." - }, - "minItems": { - "type": "integer", - "title": "Minimum items restriction", - "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the array." - }, - "maxItems": { - "type": "integer", - "title": "Maximum items restriction", - "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the array." - }, - "type": { - "const": "array", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "items", - "type" - ], - "description": "Array type info." - }, - "OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "prefixItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema" - }, - "title": "Prefix items", - "description": "Prefix items.\n\nThe `prefixItems` means the type schema info of the prefix items in the\ntuple type. In the TypeScript, it is expressed as `[T1, T2]`.\n\nIf you want to express `[T1, T2, ...TO[]]` type, you can configure the\n`...TO[]` through the {@link additionalItems} property." - }, - "additionalItems": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ], - "title": "Additional items", - "description": "Additional items.\n\nThe `additionalItems` means the type schema info of the additional items\nafter the {@link prefixItems}. In the TypeScript, if there's a type\n`[T1, T2, ...TO[]]`, the `...TO[]` is represented by the `additionalItems`.\n\nBy the way, if you configure the `additionalItems` as `true`, it means\nthe additional items are not restricted. They can be any type, so that\nit is equivalent to the TypeScript type `[T1, T2, ...any[]]`.\n\nOtherwise configure the `additionalItems` as the {@link IJsonSchema},\nit means the additional items must follow the type schema info.\nTherefore, it is equivalent to the TypeScript type `[T1, T2, ...TO[]]`." - }, - "uniqueItems": { - "type": "boolean", - "title": "Unique items restriction", - "description": "Unique items restriction.\n\nIf this property value is `true`, target tuple must have unique items." - }, - "minItems": { - "type": "integer", - "title": "Minimum items restriction", - "description": "Minimum items restriction.\n\nRestriction of minumum number of items in the tuple." - }, - "maxItems": { - "type": "integer", - "title": "Maximum items restriction", - "description": "Maximum items restriction.\n\nRestriction of maximum number of items in the tuple." - }, - "type": { - "const": "array", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "prefixItems", - "type" - ], - "description": "Tuple type info." - }, - "OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/components/schemas/RecordstringOpenApi.IJsonSchema", - "title": "Properties of the object", - "description": "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's\nregular properties. The key is the name of the regular property,\nand the value is the type schema info.\n\nIf you need additional properties that is represented by dynamic key,\nyou can use the {@link additionalProperties} instead." - }, - "additionalProperties": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ], - "title": "Additional properties' info", - "description": "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nIf the value is `true`, it means that the additional properties are not\nrestricted. They can be any type. Otherwise, if the value is\n{@link IOpenAiSchema} type, it means that the additional properties must\nfollow the type schema info.\n\n- `true`: `Record`\n- `IOpenAiSchema`: `Record`" - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of key values of the required properties", - "description": "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```" - }, - "type": { - "const": "object", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "type" - ], - "description": "Object type info." - }, - "OpenApi.IJsonSchema.IReferencestring": { - "type": "object", - "properties": { - "$ref": { - "type": "string", - "title": "Reference to the named schema", - "description": "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/components/schemas/` which means the type is stored in\nthe {@link OpenApi.IComponents.schemas} object.\n\n- `#/components/schemas/SomeObject`\n- `#/components/schemas/AnotherObject`" - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "$ref" - ], - "description": "Reference type directing named schema." - }, - "OpenApi.IJsonSchema.IOneOfOpenApi.IJsonSchema": { - "type": "object", - "properties": { - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IConstant" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IBoolean" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INumber" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IInteger" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IString" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IArrayOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.ITupleOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IObjectOpenApi.IJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IReferencestring" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.INull" - }, - { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IUnknown" - } - ] - }, - "title": "List of the union types", - "description": "List of the union types." - }, - "discriminator": { - "$ref": "#/components/schemas/OpenApi.IJsonSchema.IOneOf.IDiscriminator", - "title": "Discriminator info of the union type", - "description": "Discriminator info of the union type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "oneOf" - ], - "description": "Union type.\n\nIOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly\nconverts it to `oneOf` type." - }, - "OpenApi.IJsonSchema.INull": { - "type": "object", - "properties": { - "default": { - "type": "null", - "title": "Default value", - "description": "Default value." - }, - "type": { - "const": "null", - "title": "Discriminator value of the type", - "description": "Discriminator value of the type." - }, - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "required": [ - "type" - ], - "description": "Null type." - }, - "OpenApi.IJsonSchema.IUnknown": { - "type": "object", - "properties": { - "title": { - "type": "string", - "title": "Title of the schema", - "description": "Title of the schema." - }, - "description": { - "type": "string", - "title": "Detailed description of the schema", - "description": "Detailed description of the schema." - }, - "deprecated": { - "type": "boolean", - "title": "Whether the type is deprecated or not", - "description": "Whether the type is deprecated or not." - }, - "example": { - "title": "Example value", - "description": "Example value." - }, - "examples": { - "$ref": "#/components/schemas/Recordstringany", - "title": "List of example values as key-value pairs", - "description": "List of example values as key-value pairs." - } - }, - "description": "Unknown, `any` type." - }, - "OpenApi.IJsonSchema.IOneOf.IDiscriminator": { - "type": "object", - "properties": { - "propertyName": { - "type": "string", - "title": "Property name for the discriminator", - "description": "Property name for the discriminator." - }, - "mapping": { - "$ref": "#/components/schemas/Recordstringstring", - "title": "Mapping of the discriminator value to the schema name", - "description": "Mapping of the discriminator value to the schema name.\n\nThis property is valid only for {@link IReference} typed\n{@link IOneOf.oneof} elements. Therefore, `key` of `mapping` is\nthe discriminator value, and `value` of `mapping` is the\nschema name like `#/components/schemas/SomeObject`." - } - }, - "required": [ - "propertyName" - ], - "description": "Discriminator info of the union type." - }, - "Recordstringstring": { - "type": "object", - "properties": {}, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "type": "string" - } - }, - "RecordstringOpenApi.ISecurityScheme": { - "type": "object", - "properties": {}, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme" - } - }, - "OpenApi.ISecurityScheme": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IApiKey" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBasic" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IHttpBearer" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2" - }, - { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOpenId" - } - ], - "title": "Security scheme of Swagger Documents", - "description": "Security scheme of Swagger Documents.\n\n`OpenApi.ISecurityScheme` is a data structure representing content of\n`securitySchemes` in `swagger.json` file. It is composed with 5 types of\nsecurity schemes as an union type like below." - }, - "OpenApi.ISecurityScheme.IApiKey": { - "type": "object", - "properties": { - "type": { - "const": "apiKey" - }, - "in": { - "oneOf": [ - { - "const": "cookie" - }, - { - "const": "header" - }, - { - "const": "query" - } - ] - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "description": "Normal API key type." - }, - "OpenApi.ISecurityScheme.IHttpBasic": { - "type": "object", - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "const": "basic" - }, - "description": { - "type": "string" - } - }, - "required": [ - "type", - "scheme" - ], - "description": "HTTP basic authentication type." - }, - "OpenApi.ISecurityScheme.IHttpBearer": { - "type": "object", - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "const": "bearer" - }, - "bearerFormat": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "type", - "scheme" - ], - "description": "HTTP bearer authentication type." - }, - "OpenApi.ISecurityScheme.IOAuth2": { - "type": "object", - "properties": { - "type": { - "const": "oauth2" - }, - "flows": { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlowSet" - }, - "description": { - "type": "string" - } - }, - "required": [ - "type", - "flows" - ], - "description": "OAuth2 authentication type." - }, - "OpenApi.ISecurityScheme.IOAuth2.IFlowSet": { - "type": "object", - "properties": { - "authorizationCode": { - "$ref": "#/components/schemas/OpenApi.ISecurityScheme.IOAuth2.IFlow" - }, - "implicit": { - "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl" - }, - "password": { - "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" - }, - "clientCredentials": { - "$ref": "#/components/schemas/OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl" - } - } - }, - "OpenApi.ISecurityScheme.IOAuth2.IFlow": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/components/schemas/Recordstringstring" - } - } - }, - "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowtokenUrl": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/components/schemas/Recordstringstring" - } - }, - "description": "Construct a type with the properties of T except for those in type K." - }, - "OmitOpenApi.ISecurityScheme.IOAuth2.IFlowauthorizationUrl": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/components/schemas/Recordstringstring" - } - }, - "description": "Construct a type with the properties of T except for those in type K." - }, - "OpenApi.ISecurityScheme.IOpenId": { - "type": "object", - "properties": { - "type": { - "const": "openIdConnect" - }, - "openIdConnectUrl": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "type", - "openIdConnectUrl" - ] - } - } - }, - "schemas": [ - { - "$ref": "#/components/schemas/UltimateUnion" - } - ] -} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayAny.json b/test/schemas/llm.application/3.0/ArrayAny.json new file mode 100644 index 0000000000..0abd60640e --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayAny.json @@ -0,0 +1,480 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayHierarchical.json b/test/schemas/llm.application/3.0/ArrayHierarchical.json new file mode 100644 index 0000000000..3bbc2f99ce --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayHierarchical.json @@ -0,0 +1,1064 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayHierarchicalPointer.json b/test/schemas/llm.application/3.0/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..08c76db952 --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayHierarchicalPointer.json @@ -0,0 +1,1136 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayMatrix.json b/test/schemas/llm.application/3.0/ArrayMatrix.json new file mode 100644 index 0000000000..e7a9c4568e --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayMatrix.json @@ -0,0 +1,152 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "second": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRecursive.json b/test/schemas/llm.application/3.0/ArrayRecursive.json new file mode 100644 index 0000000000..0772871ade --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRecursive.json @@ -0,0 +1,1384 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + }, + "second": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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, + "nullable": true + }, + "second": { + "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, + "nullable": true + }, + "third": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.application/3.0/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..bee8df629e --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,14504 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + }, + "second": { + "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 + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + }, + "nullable": true + }, + "second": { + "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 + } + ] + }, + "nullable": true + }, + "third": { + "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 + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.application/3.0/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..d39f7632ea --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,15296 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + }, + "second": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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, + "nullable": true + }, + "second": { + "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, + "nullable": true + }, + "third": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.application/3.0/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..f22c2dda87 --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,25288 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + }, + "second": { + "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 + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + }, + "nullable": true + }, + "second": { + "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 + } + ] + }, + "nullable": true + }, + "third": { + "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 + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRepeatedNullable.json b/test/schemas/llm.application/3.0/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..01eaf7f333 --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRepeatedNullable.json @@ -0,0 +1,579 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + }, + "second": { + "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 + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + }, + "second": { + "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 + } + ] + }, + "third": { + "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 + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRepeatedRequired.json b/test/schemas/llm.application/3.0/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..58ae97c23c --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRepeatedRequired.json @@ -0,0 +1,538 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + }, + "second": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + }, + "third": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayRepeatedUnion.json b/test/schemas/llm.application/3.0/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..053c845529 --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayRepeatedUnion.json @@ -0,0 +1,4285 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + } + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + } + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + }, + "second": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + }, + "third": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArraySimple.json b/test/schemas/llm.application/3.0/ArraySimple.json new file mode 100644 index 0000000000..f133e46706 --- /dev/null +++ b/test/schemas/llm.application/3.0/ArraySimple.json @@ -0,0 +1,400 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ArrayUnion.json b/test/schemas/llm.application/3.0/ArrayUnion.json new file mode 100644 index 0000000000..0b7bef995b --- /dev/null +++ b/test/schemas/llm.application/3.0/ArrayUnion.json @@ -0,0 +1,256 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/AtomicUnion.json b/test/schemas/llm.application/3.0/AtomicUnion.json new file mode 100644 index 0000000000..3c1c02cf44 --- /dev/null +++ b/test/schemas/llm.application/3.0/AtomicUnion.json @@ -0,0 +1,208 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ClassGetter.json b/test/schemas/llm.application/3.0/ClassGetter.json new file mode 100644 index 0000000000..1d74bbc155 --- /dev/null +++ b/test/schemas/llm.application/3.0/ClassGetter.json @@ -0,0 +1,224 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ClassMethod.json b/test/schemas/llm.application/3.0/ClassMethod.json new file mode 100644 index 0000000000..dbc0d93812 --- /dev/null +++ b/test/schemas/llm.application/3.0/ClassMethod.json @@ -0,0 +1,184 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ClassPropertyAssignment.json b/test/schemas/llm.application/3.0/ClassPropertyAssignment.json new file mode 100644 index 0000000000..8df7469cf8 --- /dev/null +++ b/test/schemas/llm.application/3.0/ClassPropertyAssignment.json @@ -0,0 +1,328 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagArray.json b/test/schemas/llm.application/3.0/CommentTagArray.json new file mode 100644 index 0000000000..0ad3a70379 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagArray.json @@ -0,0 +1,560 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagArrayUnion.json b/test/schemas/llm.application/3.0/CommentTagArrayUnion.json new file mode 100644 index 0000000000..614e4c77a1 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagArrayUnion.json @@ -0,0 +1,472 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagAtomicUnion.json b/test/schemas/llm.application/3.0/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..32976d025b --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagAtomicUnion.json @@ -0,0 +1,320 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagDefault.json b/test/schemas/llm.application/3.0/CommentTagDefault.json new file mode 100644 index 0000000000..dfbe716401 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagDefault.json @@ -0,0 +1,928 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagFormat.json b/test/schemas/llm.application/3.0/CommentTagFormat.json new file mode 100644 index 0000000000..fee215d8f6 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagFormat.json @@ -0,0 +1,1000 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagLength.json b/test/schemas/llm.application/3.0/CommentTagLength.json new file mode 100644 index 0000000000..eb4ddabc87 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagLength.json @@ -0,0 +1,416 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagObjectUnion.json b/test/schemas/llm.application/3.0/CommentTagObjectUnion.json new file mode 100644 index 0000000000..dc16c07fec --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagObjectUnion.json @@ -0,0 +1,320 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagPattern.json b/test/schemas/llm.application/3.0/CommentTagPattern.json new file mode 100644 index 0000000000..136429e24a --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagPattern.json @@ -0,0 +1,280 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagRange.json b/test/schemas/llm.application/3.0/CommentTagRange.json new file mode 100644 index 0000000000..f044c21f74 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagRange.json @@ -0,0 +1,576 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/CommentTagType.json b/test/schemas/llm.application/3.0/CommentTagType.json new file mode 100644 index 0000000000..6c59938ff6 --- /dev/null +++ b/test/schemas/llm.application/3.0/CommentTagType.json @@ -0,0 +1,472 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ConstantAtomicAbsorbed.json b/test/schemas/llm.application/3.0/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..fa3bf1c0d2 --- /dev/null +++ b/test/schemas/llm.application/3.0/ConstantAtomicAbsorbed.json @@ -0,0 +1,200 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ConstantAtomicTagged.json b/test/schemas/llm.application/3.0/ConstantAtomicTagged.json new file mode 100644 index 0000000000..15fe9c27b3 --- /dev/null +++ b/test/schemas/llm.application/3.0/ConstantAtomicTagged.json @@ -0,0 +1,304 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ConstantAtomicUnion.json b/test/schemas/llm.application/3.0/ConstantAtomicUnion.json new file mode 100644 index 0000000000..0a8f844f4f --- /dev/null +++ b/test/schemas/llm.application/3.0/ConstantAtomicUnion.json @@ -0,0 +1,392 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ConstantConstEnumeration.json b/test/schemas/llm.application/3.0/ConstantConstEnumeration.json new file mode 100644 index 0000000000..b9fe845014 --- /dev/null +++ b/test/schemas/llm.application/3.0/ConstantConstEnumeration.json @@ -0,0 +1,232 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ConstantEnumeration.json b/test/schemas/llm.application/3.0/ConstantEnumeration.json new file mode 100644 index 0000000000..b9fe845014 --- /dev/null +++ b/test/schemas/llm.application/3.0/ConstantEnumeration.json @@ -0,0 +1,232 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicArray.json b/test/schemas/llm.application/3.0/DynamicArray.json new file mode 100644 index 0000000000..af9518858b --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicArray.json @@ -0,0 +1,216 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicComposite.json b/test/schemas/llm.application/3.0/DynamicComposite.json new file mode 100644 index 0000000000..c0e4c76ea9 --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicComposite.json @@ -0,0 +1,280 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicConstant.json b/test/schemas/llm.application/3.0/DynamicConstant.json new file mode 100644 index 0000000000..61fa7b7ade --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicConstant.json @@ -0,0 +1,320 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicEnumeration.json b/test/schemas/llm.application/3.0/DynamicEnumeration.json new file mode 100644 index 0000000000..a584a51341 --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicEnumeration.json @@ -0,0 +1,424 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicNever.json b/test/schemas/llm.application/3.0/DynamicNever.json new file mode 100644 index 0000000000..54d77aaf30 --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicNever.json @@ -0,0 +1,104 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicSimple.json b/test/schemas/llm.application/3.0/DynamicSimple.json new file mode 100644 index 0000000000..9e6faa6fcb --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicSimple.json @@ -0,0 +1,192 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicTemplate.json b/test/schemas/llm.application/3.0/DynamicTemplate.json new file mode 100644 index 0000000000..bf47c2ec0a --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicTemplate.json @@ -0,0 +1,200 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicTree.json b/test/schemas/llm.application/3.0/DynamicTree.json new file mode 100644 index 0000000000..eecf2283c8 --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicTree.json @@ -0,0 +1,800 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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 + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicUndefined.json b/test/schemas/llm.application/3.0/DynamicUndefined.json new file mode 100644 index 0000000000..54d77aaf30 --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicUndefined.json @@ -0,0 +1,104 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/DynamicUnion.json b/test/schemas/llm.application/3.0/DynamicUnion.json new file mode 100644 index 0000000000..050e4e5e86 --- /dev/null +++ b/test/schemas/llm.application/3.0/DynamicUnion.json @@ -0,0 +1,176 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectAlias.json b/test/schemas/llm.application/3.0/ObjectAlias.json new file mode 100644 index 0000000000..3d89503e9f --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectAlias.json @@ -0,0 +1,496 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectDate.json b/test/schemas/llm.application/3.0/ObjectDate.json new file mode 100644 index 0000000000..db404cafca --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectDate.json @@ -0,0 +1,352 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectDescription.json b/test/schemas/llm.application/3.0/ObjectDescription.json new file mode 100644 index 0000000000..a9427c2206 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectDescription.json @@ -0,0 +1,382 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectDynamic.json b/test/schemas/llm.application/3.0/ObjectDynamic.json new file mode 100644 index 0000000000..bf47c2ec0a --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectDynamic.json @@ -0,0 +1,200 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectGenericAlias.json b/test/schemas/llm.application/3.0/ObjectGenericAlias.json new file mode 100644 index 0000000000..a1db1b4b19 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectGenericAlias.json @@ -0,0 +1,152 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectGenericArray.json b/test/schemas/llm.application/3.0/ObjectGenericArray.json new file mode 100644 index 0000000000..e5368564ec --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectGenericArray.json @@ -0,0 +1,480 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectGenericUnion.json b/test/schemas/llm.application/3.0/ObjectGenericUnion.json new file mode 100644 index 0000000000..5c27587b45 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectGenericUnion.json @@ -0,0 +1,2624 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectInternal.json b/test/schemas/llm.application/3.0/ObjectInternal.json new file mode 100644 index 0000000000..b630025071 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectInternal.json @@ -0,0 +1,184 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectIntersection.json b/test/schemas/llm.application/3.0/ObjectIntersection.json new file mode 100644 index 0000000000..063a36ac3e --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectIntersection.json @@ -0,0 +1,216 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectJsonTag.json b/test/schemas/llm.application/3.0/ObjectJsonTag.json new file mode 100644 index 0000000000..2440f378f2 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectJsonTag.json @@ -0,0 +1,304 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectLiteralProperty.json b/test/schemas/llm.application/3.0/ObjectLiteralProperty.json new file mode 100644 index 0000000000..d331b8e3e1 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectLiteralProperty.json @@ -0,0 +1,184 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectLiteralType.json b/test/schemas/llm.application/3.0/ObjectLiteralType.json new file mode 100644 index 0000000000..3ed2da42d2 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectLiteralType.json @@ -0,0 +1,216 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectNullable.json b/test/schemas/llm.application/3.0/ObjectNullable.json new file mode 100644 index 0000000000..a0963c95ba --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectNullable.json @@ -0,0 +1,936 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectOptional.json b/test/schemas/llm.application/3.0/ObjectOptional.json new file mode 100644 index 0000000000..08670737e8 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectOptional.json @@ -0,0 +1,208 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectPartial.json b/test/schemas/llm.application/3.0/ObjectPartial.json new file mode 100644 index 0000000000..b028a7aa79 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectPartial.json @@ -0,0 +1,1187 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + }, + "second": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "second": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "third": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectPartialAndRequired.json b/test/schemas/llm.application/3.0/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..dd4434d470 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectPartialAndRequired.json @@ -0,0 +1,904 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + }, + "second": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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, + "nullable": true + }, + "second": { + "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, + "nullable": true + }, + "third": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectPrimitive.json b/test/schemas/llm.application/3.0/ObjectPrimitive.json new file mode 100644 index 0000000000..f1fb560ff0 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectPrimitive.json @@ -0,0 +1,608 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectRecursive.json b/test/schemas/llm.application/3.0/ObjectRecursive.json new file mode 100644 index 0000000000..019d7bd368 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectRecursive.json @@ -0,0 +1,1448 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + }, + "second": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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, + "nullable": true + }, + "second": { + "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, + "nullable": true + }, + "third": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectRequired.json b/test/schemas/llm.application/3.0/ObjectRequired.json new file mode 100644 index 0000000000..48776ad81d --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectRequired.json @@ -0,0 +1,1043 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + }, + "second": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectSimple.json b/test/schemas/llm.application/3.0/ObjectSimple.json new file mode 100644 index 0000000000..035060f1b0 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectSimple.json @@ -0,0 +1,792 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + }, + "second": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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, + "nullable": true + }, + "second": { + "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, + "nullable": true + }, + "third": { + "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, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "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, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUndefined.json b/test/schemas/llm.application/3.0/ObjectUndefined.json new file mode 100644 index 0000000000..b934a9b268 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUndefined.json @@ -0,0 +1,424 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionComposite.json b/test/schemas/llm.application/3.0/ObjectUnionComposite.json new file mode 100644 index 0000000000..3b56bb6c40 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionComposite.json @@ -0,0 +1,3024 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionCompositePointer.json b/test/schemas/llm.application/3.0/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..e764b47170 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionCompositePointer.json @@ -0,0 +1,3168 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionDouble.json b/test/schemas/llm.application/3.0/ObjectUnionDouble.json new file mode 100644 index 0000000000..caf0e21d00 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionDouble.json @@ -0,0 +1,1224 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionExplicit.json b/test/schemas/llm.application/3.0/ObjectUnionExplicit.json new file mode 100644 index 0000000000..0f78b90d4d --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionExplicit.json @@ -0,0 +1,3056 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionExplicitPointer.json b/test/schemas/llm.application/3.0/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..97f0946633 --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionExplicitPointer.json @@ -0,0 +1,3200 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionImplicit.json b/test/schemas/llm.application/3.0/ObjectUnionImplicit.json new file mode 100644 index 0000000000..eb1528253a --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionImplicit.json @@ -0,0 +1,3512 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ObjectUnionNonPredictable.json b/test/schemas/llm.application/3.0/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..54d74b9ecb --- /dev/null +++ b/test/schemas/llm.application/3.0/ObjectUnionNonPredictable.json @@ -0,0 +1,832 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TemplateAtomic.json b/test/schemas/llm.application/3.0/TemplateAtomic.json new file mode 100644 index 0000000000..24b8ac4ee9 --- /dev/null +++ b/test/schemas/llm.application/3.0/TemplateAtomic.json @@ -0,0 +1,464 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TemplateConstant.json b/test/schemas/llm.application/3.0/TemplateConstant.json new file mode 100644 index 0000000000..4ffaeb4691 --- /dev/null +++ b/test/schemas/llm.application/3.0/TemplateConstant.json @@ -0,0 +1,480 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TemplateUnion.json b/test/schemas/llm.application/3.0/TemplateUnion.json new file mode 100644 index 0000000000..340ce8ac6f --- /dev/null +++ b/test/schemas/llm.application/3.0/TemplateUnion.json @@ -0,0 +1,616 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ToJsonAtomicUnion.json b/test/schemas/llm.application/3.0/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..3c1c02cf44 --- /dev/null +++ b/test/schemas/llm.application/3.0/ToJsonAtomicUnion.json @@ -0,0 +1,208 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ToJsonDouble.json b/test/schemas/llm.application/3.0/ToJsonDouble.json new file mode 100644 index 0000000000..17cda0ed5f --- /dev/null +++ b/test/schemas/llm.application/3.0/ToJsonDouble.json @@ -0,0 +1,184 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ToJsonNull.json b/test/schemas/llm.application/3.0/ToJsonNull.json new file mode 100644 index 0000000000..14813c6575 --- /dev/null +++ b/test/schemas/llm.application/3.0/ToJsonNull.json @@ -0,0 +1,75 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "type": "null" + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "null" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "type": "null" + }, + "third": { + "type": "null" + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "null" + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/ToJsonUnion.json b/test/schemas/llm.application/3.0/ToJsonUnion.json new file mode 100644 index 0000000000..829c9d907e --- /dev/null +++ b/test/schemas/llm.application/3.0/ToJsonUnion.json @@ -0,0 +1,664 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagArray.json b/test/schemas/llm.application/3.0/TypeTagArray.json new file mode 100644 index 0000000000..d2b95186d1 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagArray.json @@ -0,0 +1,592 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagArrayUnion.json b/test/schemas/llm.application/3.0/TypeTagArrayUnion.json new file mode 100644 index 0000000000..2bdf720eac --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagArrayUnion.json @@ -0,0 +1,512 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagAtomicUnion.json b/test/schemas/llm.application/3.0/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..32976d025b --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagAtomicUnion.json @@ -0,0 +1,320 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagCustom.json b/test/schemas/llm.application/3.0/TypeTagCustom.json new file mode 100644 index 0000000000..6765c906f6 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagCustom.json @@ -0,0 +1,280 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagDefault.json b/test/schemas/llm.application/3.0/TypeTagDefault.json new file mode 100644 index 0000000000..18b0a361d3 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagDefault.json @@ -0,0 +1,880 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagFormat.json b/test/schemas/llm.application/3.0/TypeTagFormat.json new file mode 100644 index 0000000000..fee215d8f6 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagFormat.json @@ -0,0 +1,1000 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagLength.json b/test/schemas/llm.application/3.0/TypeTagLength.json new file mode 100644 index 0000000000..eb4ddabc87 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagLength.json @@ -0,0 +1,416 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagMatrix.json b/test/schemas/llm.application/3.0/TypeTagMatrix.json new file mode 100644 index 0000000000..7785928298 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagMatrix.json @@ -0,0 +1,240 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagObjectUnion.json b/test/schemas/llm.application/3.0/TypeTagObjectUnion.json new file mode 100644 index 0000000000..dc16c07fec --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagObjectUnion.json @@ -0,0 +1,320 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagPattern.json b/test/schemas/llm.application/3.0/TypeTagPattern.json new file mode 100644 index 0000000000..671313baee --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagPattern.json @@ -0,0 +1,280 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagRange.json b/test/schemas/llm.application/3.0/TypeTagRange.json new file mode 100644 index 0000000000..f044c21f74 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagRange.json @@ -0,0 +1,576 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.0/TypeTagType.json b/test/schemas/llm.application/3.0/TypeTagType.json new file mode 100644 index 0000000000..f462599bd1 --- /dev/null +++ b/test/schemas/llm.application/3.0/TypeTagType.json @@ -0,0 +1,440 @@ +{ + "model": "3.0", + "options": { + "constraint": false, + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayAny.json b/test/schemas/llm.application/3.1/ArrayAny.json new file mode 100644 index 0000000000..042461a804 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayAny.json @@ -0,0 +1,786 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayHierarchical.json b/test/schemas/llm.application/3.1/ArrayHierarchical.json new file mode 100644 index 0000000000..be2439ca16 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayHierarchical.json @@ -0,0 +1,1050 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayHierarchicalPointer.json b/test/schemas/llm.application/3.1/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..316c9fdfac --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayHierarchicalPointer.json @@ -0,0 +1,1114 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayMatrix.json b/test/schemas/llm.application/3.1/ArrayMatrix.json new file mode 100644 index 0000000000..8fb21ec0f5 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayMatrix.json @@ -0,0 +1,186 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRecursive.json b/test/schemas/llm.application/3.1/ArrayRecursive.json new file mode 100644 index 0000000000..ebdb001d6d --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRecursive.json @@ -0,0 +1,243 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.application/3.1/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..c36809c8bd --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,693 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.application/3.1/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..9fb5df965a --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,781 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.application/3.1/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..88406d31a5 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,705 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRepeatedNullable.json b/test/schemas/llm.application/3.1/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..daee4673a8 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRepeatedNullable.json @@ -0,0 +1,148 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "third": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRepeatedRequired.json b/test/schemas/llm.application/3.1/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..75482fb680 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRepeatedRequired.json @@ -0,0 +1,204 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayRepeatedUnion.json b/test/schemas/llm.application/3.1/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..f563d70e25 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayRepeatedUnion.json @@ -0,0 +1,972 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArraySimple.json b/test/schemas/llm.application/3.1/ArraySimple.json new file mode 100644 index 0000000000..3056f83357 --- /dev/null +++ b/test/schemas/llm.application/3.1/ArraySimple.json @@ -0,0 +1,418 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ArrayUnion.json b/test/schemas/llm.application/3.1/ArrayUnion.json new file mode 100644 index 0000000000..855b8f647a --- /dev/null +++ b/test/schemas/llm.application/3.1/ArrayUnion.json @@ -0,0 +1,290 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/AtomicUnion.json b/test/schemas/llm.application/3.1/AtomicUnion.json new file mode 100644 index 0000000000..e45e8116e6 --- /dev/null +++ b/test/schemas/llm.application/3.1/AtomicUnion.json @@ -0,0 +1,242 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ClassGetter.json b/test/schemas/llm.application/3.1/ClassGetter.json new file mode 100644 index 0000000000..5d8aee3ee0 --- /dev/null +++ b/test/schemas/llm.application/3.1/ClassGetter.json @@ -0,0 +1,298 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ClassMethod.json b/test/schemas/llm.application/3.1/ClassMethod.json new file mode 100644 index 0000000000..8652fb94a5 --- /dev/null +++ b/test/schemas/llm.application/3.1/ClassMethod.json @@ -0,0 +1,210 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ClassPropertyAssignment.json b/test/schemas/llm.application/3.1/ClassPropertyAssignment.json new file mode 100644 index 0000000000..c1218148c3 --- /dev/null +++ b/test/schemas/llm.application/3.1/ClassPropertyAssignment.json @@ -0,0 +1,306 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagArray.json b/test/schemas/llm.application/3.1/CommentTagArray.json new file mode 100644 index 0000000000..5af058e000 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagArray.json @@ -0,0 +1,554 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagArrayUnion.json b/test/schemas/llm.application/3.1/CommentTagArrayUnion.json new file mode 100644 index 0000000000..31f5770c23 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagArrayUnion.json @@ -0,0 +1,482 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagAtomicUnion.json b/test/schemas/llm.application/3.1/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..3a635dbbad --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagAtomicUnion.json @@ -0,0 +1,338 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagDefault.json b/test/schemas/llm.application/3.1/CommentTagDefault.json new file mode 100644 index 0000000000..e41855cdb3 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagDefault.json @@ -0,0 +1,1034 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagFormat.json b/test/schemas/llm.application/3.1/CommentTagFormat.json new file mode 100644 index 0000000000..e98008ec4d --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagFormat.json @@ -0,0 +1,1026 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagLength.json b/test/schemas/llm.application/3.1/CommentTagLength.json new file mode 100644 index 0000000000..6bcc38d08f --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagLength.json @@ -0,0 +1,434 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagObjectUnion.json b/test/schemas/llm.application/3.1/CommentTagObjectUnion.json new file mode 100644 index 0000000000..ec625d5e24 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagObjectUnion.json @@ -0,0 +1,338 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagPattern.json b/test/schemas/llm.application/3.1/CommentTagPattern.json new file mode 100644 index 0000000000..deb2611c46 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagPattern.json @@ -0,0 +1,306 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagRange.json b/test/schemas/llm.application/3.1/CommentTagRange.json new file mode 100644 index 0000000000..7ad5bb1d51 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagRange.json @@ -0,0 +1,594 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/CommentTagType.json b/test/schemas/llm.application/3.1/CommentTagType.json new file mode 100644 index 0000000000..f45dfe6561 --- /dev/null +++ b/test/schemas/llm.application/3.1/CommentTagType.json @@ -0,0 +1,490 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ConstantAtomicAbsorbed.json b/test/schemas/llm.application/3.1/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..c7b58f5a06 --- /dev/null +++ b/test/schemas/llm.application/3.1/ConstantAtomicAbsorbed.json @@ -0,0 +1,226 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ConstantAtomicTagged.json b/test/schemas/llm.application/3.1/ConstantAtomicTagged.json new file mode 100644 index 0000000000..1ffbd52aa6 --- /dev/null +++ b/test/schemas/llm.application/3.1/ConstantAtomicTagged.json @@ -0,0 +1,338 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ConstantAtomicUnion.json b/test/schemas/llm.application/3.1/ConstantAtomicUnion.json new file mode 100644 index 0000000000..65afaffae4 --- /dev/null +++ b/test/schemas/llm.application/3.1/ConstantAtomicUnion.json @@ -0,0 +1,354 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ConstantConstEnumeration.json b/test/schemas/llm.application/3.1/ConstantConstEnumeration.json new file mode 100644 index 0000000000..c19b55a6af --- /dev/null +++ b/test/schemas/llm.application/3.1/ConstantConstEnumeration.json @@ -0,0 +1,266 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ConstantEnumeration.json b/test/schemas/llm.application/3.1/ConstantEnumeration.json new file mode 100644 index 0000000000..c19b55a6af --- /dev/null +++ b/test/schemas/llm.application/3.1/ConstantEnumeration.json @@ -0,0 +1,266 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicArray.json b/test/schemas/llm.application/3.1/DynamicArray.json new file mode 100644 index 0000000000..36e9a60618 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicArray.json @@ -0,0 +1,242 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicComposite.json b/test/schemas/llm.application/3.1/DynamicComposite.json new file mode 100644 index 0000000000..30bc656774 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicComposite.json @@ -0,0 +1,314 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicConstant.json b/test/schemas/llm.application/3.1/DynamicConstant.json new file mode 100644 index 0000000000..bce4f00aa9 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicConstant.json @@ -0,0 +1,338 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicEnumeration.json b/test/schemas/llm.application/3.1/DynamicEnumeration.json new file mode 100644 index 0000000000..4f5ae74ef1 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicEnumeration.json @@ -0,0 +1,530 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicNever.json b/test/schemas/llm.application/3.1/DynamicNever.json new file mode 100644 index 0000000000..b48ebb4830 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicNever.json @@ -0,0 +1,130 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicSimple.json b/test/schemas/llm.application/3.1/DynamicSimple.json new file mode 100644 index 0000000000..fa9870a204 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicSimple.json @@ -0,0 +1,218 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicTemplate.json b/test/schemas/llm.application/3.1/DynamicTemplate.json new file mode 100644 index 0000000000..a4b1250b7f --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicTemplate.json @@ -0,0 +1,234 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicTree.json b/test/schemas/llm.application/3.1/DynamicTree.json new file mode 100644 index 0000000000..a19310dd32 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicTree.json @@ -0,0 +1,201 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/DynamicTree" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/DynamicTree" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "output": { + "$ref": "#/$defs/DynamicTree" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicUndefined.json b/test/schemas/llm.application/3.1/DynamicUndefined.json new file mode 100644 index 0000000000..b48ebb4830 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicUndefined.json @@ -0,0 +1,130 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/DynamicUnion.json b/test/schemas/llm.application/3.1/DynamicUnion.json new file mode 100644 index 0000000000..aeac5deb73 --- /dev/null +++ b/test/schemas/llm.application/3.1/DynamicUnion.json @@ -0,0 +1,210 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectAlias.json b/test/schemas/llm.application/3.1/ObjectAlias.json new file mode 100644 index 0000000000..740b86d649 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectAlias.json @@ -0,0 +1,658 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectDate.json b/test/schemas/llm.application/3.1/ObjectDate.json new file mode 100644 index 0000000000..6c363078d9 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectDate.json @@ -0,0 +1,626 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectDescription.json b/test/schemas/llm.application/3.1/ObjectDescription.json new file mode 100644 index 0000000000..d7a3ea1182 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectDescription.json @@ -0,0 +1,426 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectDynamic.json b/test/schemas/llm.application/3.1/ObjectDynamic.json new file mode 100644 index 0000000000..a4b1250b7f --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectDynamic.json @@ -0,0 +1,234 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectGenericAlias.json b/test/schemas/llm.application/3.1/ObjectGenericAlias.json new file mode 100644 index 0000000000..0c85731dbd --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectGenericAlias.json @@ -0,0 +1,178 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectGenericArray.json b/test/schemas/llm.application/3.1/ObjectGenericArray.json new file mode 100644 index 0000000000..d8b8d490ae --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectGenericArray.json @@ -0,0 +1,490 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectGenericUnion.json b/test/schemas/llm.application/3.1/ObjectGenericUnion.json new file mode 100644 index 0000000000..25c401df0d --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectGenericUnion.json @@ -0,0 +1,2842 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectInternal.json b/test/schemas/llm.application/3.1/ObjectInternal.json new file mode 100644 index 0000000000..900e0c7c83 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectInternal.json @@ -0,0 +1,210 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectIntersection.json b/test/schemas/llm.application/3.1/ObjectIntersection.json new file mode 100644 index 0000000000..b4923ae173 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectIntersection.json @@ -0,0 +1,242 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectJsonTag.json b/test/schemas/llm.application/3.1/ObjectJsonTag.json new file mode 100644 index 0000000000..f63e124388 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectJsonTag.json @@ -0,0 +1,330 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectLiteralProperty.json b/test/schemas/llm.application/3.1/ObjectLiteralProperty.json new file mode 100644 index 0000000000..105a0998b8 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectLiteralProperty.json @@ -0,0 +1,210 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectLiteralType.json b/test/schemas/llm.application/3.1/ObjectLiteralType.json new file mode 100644 index 0000000000..9d0db43cf3 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectLiteralType.json @@ -0,0 +1,242 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectNullable.json b/test/schemas/llm.application/3.1/ObjectNullable.json new file mode 100644 index 0000000000..007d40b321 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectNullable.json @@ -0,0 +1,882 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectOptional.json b/test/schemas/llm.application/3.1/ObjectOptional.json new file mode 100644 index 0000000000..0d8b1c5375 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectOptional.json @@ -0,0 +1,274 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectPartial.json b/test/schemas/llm.application/3.1/ObjectPartial.json new file mode 100644 index 0000000000..87d090da7f --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectPartial.json @@ -0,0 +1,508 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectPartialAndRequired.json b/test/schemas/llm.application/3.1/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..72def0741b --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectPartialAndRequired.json @@ -0,0 +1,228 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectPrimitive.json b/test/schemas/llm.application/3.1/ObjectPrimitive.json new file mode 100644 index 0000000000..b6c1e46bdb --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectPrimitive.json @@ -0,0 +1,666 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectRecursive.json b/test/schemas/llm.application/3.1/ObjectRecursive.json new file mode 100644 index 0000000000..a42286a2db --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectRecursive.json @@ -0,0 +1,267 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectRequired.json b/test/schemas/llm.application/3.1/ObjectRequired.json new file mode 100644 index 0000000000..7f6a941944 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectRequired.json @@ -0,0 +1,508 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectSimple.json b/test/schemas/llm.application/3.1/ObjectSimple.json new file mode 100644 index 0000000000..1b80caa68c --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectSimple.json @@ -0,0 +1,786 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUndefined.json b/test/schemas/llm.application/3.1/ObjectUndefined.json new file mode 100644 index 0000000000..3d19fb458c --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUndefined.json @@ -0,0 +1,466 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionComposite.json b/test/schemas/llm.application/3.1/ObjectUnionComposite.json new file mode 100644 index 0000000000..8e3c5db14b --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionComposite.json @@ -0,0 +1,2858 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionCompositePointer.json b/test/schemas/llm.application/3.1/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..fc1fdfe25d --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionCompositePointer.json @@ -0,0 +1,2986 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionDouble.json b/test/schemas/llm.application/3.1/ObjectUnionDouble.json new file mode 100644 index 0000000000..f8d733da21 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionDouble.json @@ -0,0 +1,1162 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionExplicit.json b/test/schemas/llm.application/3.1/ObjectUnionExplicit.json new file mode 100644 index 0000000000..82b48d5a90 --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionExplicit.json @@ -0,0 +1,2746 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionExplicitPointer.json b/test/schemas/llm.application/3.1/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..f3242ae35a --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionExplicitPointer.json @@ -0,0 +1,2874 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionImplicit.json b/test/schemas/llm.application/3.1/ObjectUnionImplicit.json new file mode 100644 index 0000000000..79d9df4ffd --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionImplicit.json @@ -0,0 +1,4898 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ObjectUnionNonPredictable.json b/test/schemas/llm.application/3.1/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..7bb120a04b --- /dev/null +++ b/test/schemas/llm.application/3.1/ObjectUnionNonPredictable.json @@ -0,0 +1,794 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TemplateAtomic.json b/test/schemas/llm.application/3.1/TemplateAtomic.json new file mode 100644 index 0000000000..e9bc5f3b57 --- /dev/null +++ b/test/schemas/llm.application/3.1/TemplateAtomic.json @@ -0,0 +1,514 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TemplateConstant.json b/test/schemas/llm.application/3.1/TemplateConstant.json new file mode 100644 index 0000000000..28e9bc9760 --- /dev/null +++ b/test/schemas/llm.application/3.1/TemplateConstant.json @@ -0,0 +1,714 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TemplateUnion.json b/test/schemas/llm.application/3.1/TemplateUnion.json new file mode 100644 index 0000000000..fbca3d1d90 --- /dev/null +++ b/test/schemas/llm.application/3.1/TemplateUnion.json @@ -0,0 +1,690 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ToJsonAtomicUnion.json b/test/schemas/llm.application/3.1/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..e45e8116e6 --- /dev/null +++ b/test/schemas/llm.application/3.1/ToJsonAtomicUnion.json @@ -0,0 +1,242 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ToJsonDouble.json b/test/schemas/llm.application/3.1/ToJsonDouble.json new file mode 100644 index 0000000000..1cf7662fff --- /dev/null +++ b/test/schemas/llm.application/3.1/ToJsonDouble.json @@ -0,0 +1,210 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ToJsonNull.json b/test/schemas/llm.application/3.1/ToJsonNull.json new file mode 100644 index 0000000000..302b602f07 --- /dev/null +++ b/test/schemas/llm.application/3.1/ToJsonNull.json @@ -0,0 +1,114 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "null" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/ToJsonUnion.json b/test/schemas/llm.application/3.1/ToJsonUnion.json new file mode 100644 index 0000000000..d9ddf0a80c --- /dev/null +++ b/test/schemas/llm.application/3.1/ToJsonUnion.json @@ -0,0 +1,674 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagArray.json b/test/schemas/llm.application/3.1/TypeTagArray.json new file mode 100644 index 0000000000..47fd0c0edf --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagArray.json @@ -0,0 +1,586 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagArrayUnion.json b/test/schemas/llm.application/3.1/TypeTagArrayUnion.json new file mode 100644 index 0000000000..c90f2bffe4 --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagArrayUnion.json @@ -0,0 +1,522 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagAtomicUnion.json b/test/schemas/llm.application/3.1/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..3a635dbbad --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagAtomicUnion.json @@ -0,0 +1,338 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagCustom.json b/test/schemas/llm.application/3.1/TypeTagCustom.json new file mode 100644 index 0000000000..9aec713bba --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagCustom.json @@ -0,0 +1,306 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagDefault.json b/test/schemas/llm.application/3.1/TypeTagDefault.json new file mode 100644 index 0000000000..7b0623b0ee --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagDefault.json @@ -0,0 +1,906 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagFormat.json b/test/schemas/llm.application/3.1/TypeTagFormat.json new file mode 100644 index 0000000000..e98008ec4d --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagFormat.json @@ -0,0 +1,1026 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagLength.json b/test/schemas/llm.application/3.1/TypeTagLength.json new file mode 100644 index 0000000000..6bcc38d08f --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagLength.json @@ -0,0 +1,434 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagMatrix.json b/test/schemas/llm.application/3.1/TypeTagMatrix.json new file mode 100644 index 0000000000..8a808c9434 --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagMatrix.json @@ -0,0 +1,250 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagObjectUnion.json b/test/schemas/llm.application/3.1/TypeTagObjectUnion.json new file mode 100644 index 0000000000..ec625d5e24 --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagObjectUnion.json @@ -0,0 +1,338 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagPattern.json b/test/schemas/llm.application/3.1/TypeTagPattern.json new file mode 100644 index 0000000000..6392332816 --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagPattern.json @@ -0,0 +1,306 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagRange.json b/test/schemas/llm.application/3.1/TypeTagRange.json new file mode 100644 index 0000000000..7ad5bb1d51 --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagRange.json @@ -0,0 +1,594 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/3.1/TypeTagType.json b/test/schemas/llm.application/3.1/TypeTagType.json new file mode 100644 index 0000000000..8444bda183 --- /dev/null +++ b/test/schemas/llm.application/3.1/TypeTagType.json @@ -0,0 +1,458 @@ +{ + "model": "3.1", + "options": { + "constraint": false, + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayAny.json b/test/schemas/llm.application/chatgpt/ArrayAny.json new file mode 100644 index 0000000000..81f5023c3e --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayAny.json @@ -0,0 +1,793 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayHierarchical.json b/test/schemas/llm.application/chatgpt/ArrayHierarchical.json new file mode 100644 index 0000000000..2377bdec67 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayHierarchical.json @@ -0,0 +1,1097 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayHierarchicalPointer.json b/test/schemas/llm.application/chatgpt/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..0ccf1737fc --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayHierarchicalPointer.json @@ -0,0 +1,1169 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayMatrix.json b/test/schemas/llm.application/chatgpt/ArrayMatrix.json new file mode 100644 index 0000000000..9d5117e238 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayMatrix.json @@ -0,0 +1,185 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRecursive.json b/test/schemas/llm.application/chatgpt/ArrayRecursive.json new file mode 100644 index 0000000000..1efbba35b4 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRecursive.json @@ -0,0 +1,248 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "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 + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "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 + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "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 + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..b9eeb86061 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,788 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..33436e129c --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,887 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + } + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "extension": { + "type": "string", + "enum": [ + "lnk" + ] + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ], + "additionalProperties": false + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..94f6387e0d --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,713 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRepeatedNullable.json b/test/schemas/llm.application/chatgpt/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..d0a67cff91 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRepeatedNullable.json @@ -0,0 +1,147 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "third": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRepeatedRequired.json b/test/schemas/llm.application/chatgpt/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..335443fd49 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRepeatedRequired.json @@ -0,0 +1,203 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "ArrayRepeatedRequired": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayRepeatedUnion.json b/test/schemas/llm.application/chatgpt/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..fa14ab0435 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayRepeatedUnion.json @@ -0,0 +1,1011 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "ArrayRepeatedUnion": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArraySimple.json b/test/schemas/llm.application/chatgpt/ArraySimple.json new file mode 100644 index 0000000000..32c3f29e72 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArraySimple.json @@ -0,0 +1,433 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ArrayUnion.json b/test/schemas/llm.application/chatgpt/ArrayUnion.json new file mode 100644 index 0000000000..db79352091 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ArrayUnion.json @@ -0,0 +1,289 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/AtomicUnion.json b/test/schemas/llm.application/chatgpt/AtomicUnion.json new file mode 100644 index 0000000000..45f61002f3 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/AtomicUnion.json @@ -0,0 +1,241 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ClassGetter.json b/test/schemas/llm.application/chatgpt/ClassGetter.json new file mode 100644 index 0000000000..b7f99c9583 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ClassGetter.json @@ -0,0 +1,305 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ClassMethod.json b/test/schemas/llm.application/chatgpt/ClassMethod.json new file mode 100644 index 0000000000..1e7d88e29f --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ClassMethod.json @@ -0,0 +1,217 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ClassPropertyAssignment.json b/test/schemas/llm.application/chatgpt/ClassPropertyAssignment.json new file mode 100644 index 0000000000..4adeca13e3 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ClassPropertyAssignment.json @@ -0,0 +1,361 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagArray.json b/test/schemas/llm.application/chatgpt/CommentTagArray.json new file mode 100644 index 0000000000..401bdcae61 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagArray.json @@ -0,0 +1,569 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagArrayUnion.json b/test/schemas/llm.application/chatgpt/CommentTagArrayUnion.json new file mode 100644 index 0000000000..93659ea7f6 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagArrayUnion.json @@ -0,0 +1,489 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagAtomicUnion.json b/test/schemas/llm.application/chatgpt/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..183c7e7aa4 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagAtomicUnion.json @@ -0,0 +1,353 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagDefault.json b/test/schemas/llm.application/chatgpt/CommentTagDefault.json new file mode 100644 index 0000000000..6073ba1f88 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagDefault.json @@ -0,0 +1,1041 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagFormat.json b/test/schemas/llm.application/chatgpt/CommentTagFormat.json new file mode 100644 index 0000000000..ab46e8123d --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagFormat.json @@ -0,0 +1,1033 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagLength.json b/test/schemas/llm.application/chatgpt/CommentTagLength.json new file mode 100644 index 0000000000..a20061fdc2 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagLength.json @@ -0,0 +1,449 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagObjectUnion.json b/test/schemas/llm.application/chatgpt/CommentTagObjectUnion.json new file mode 100644 index 0000000000..aa839a8d77 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagObjectUnion.json @@ -0,0 +1,353 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagPattern.json b/test/schemas/llm.application/chatgpt/CommentTagPattern.json new file mode 100644 index 0000000000..9ca87f6db3 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagPattern.json @@ -0,0 +1,313 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagRange.json b/test/schemas/llm.application/chatgpt/CommentTagRange.json new file mode 100644 index 0000000000..ec0dddb62e --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagRange.json @@ -0,0 +1,609 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/CommentTagType.json b/test/schemas/llm.application/chatgpt/CommentTagType.json new file mode 100644 index 0000000000..656c733160 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/CommentTagType.json @@ -0,0 +1,505 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ConstantAtomicAbsorbed.json b/test/schemas/llm.application/chatgpt/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..434d697bf8 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ConstantAtomicAbsorbed.json @@ -0,0 +1,233 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ConstantAtomicTagged.json b/test/schemas/llm.application/chatgpt/ConstantAtomicTagged.json new file mode 100644 index 0000000000..fd7b561735 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ConstantAtomicTagged.json @@ -0,0 +1,337 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ConstantAtomicUnion.json b/test/schemas/llm.application/chatgpt/ConstantAtomicUnion.json new file mode 100644 index 0000000000..1ca5472e0b --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ConstantAtomicUnion.json @@ -0,0 +1,425 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ConstantConstEnumeration.json b/test/schemas/llm.application/chatgpt/ConstantConstEnumeration.json new file mode 100644 index 0000000000..ac495f9d98 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ConstantConstEnumeration.json @@ -0,0 +1,265 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ConstantEnumeration.json b/test/schemas/llm.application/chatgpt/ConstantEnumeration.json new file mode 100644 index 0000000000..ac495f9d98 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ConstantEnumeration.json @@ -0,0 +1,265 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/DynamicConstant.json b/test/schemas/llm.application/chatgpt/DynamicConstant.json new file mode 100644 index 0000000000..87fcbbfb03 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/DynamicConstant.json @@ -0,0 +1,353 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/DynamicEnumeration.json b/test/schemas/llm.application/chatgpt/DynamicEnumeration.json new file mode 100644 index 0000000000..9d8211826b --- /dev/null +++ b/test/schemas/llm.application/chatgpt/DynamicEnumeration.json @@ -0,0 +1,545 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/DynamicNever.json b/test/schemas/llm.application/chatgpt/DynamicNever.json new file mode 100644 index 0000000000..5f53d00626 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/DynamicNever.json @@ -0,0 +1,137 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/DynamicUndefined.json b/test/schemas/llm.application/chatgpt/DynamicUndefined.json new file mode 100644 index 0000000000..5f53d00626 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/DynamicUndefined.json @@ -0,0 +1,137 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectAlias.json b/test/schemas/llm.application/chatgpt/ObjectAlias.json new file mode 100644 index 0000000000..efbe5b8a48 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectAlias.json @@ -0,0 +1,681 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectDate.json b/test/schemas/llm.application/chatgpt/ObjectDate.json new file mode 100644 index 0000000000..d48bb7cf42 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectDate.json @@ -0,0 +1,633 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectDescription.json b/test/schemas/llm.application/chatgpt/ObjectDescription.json new file mode 100644 index 0000000000..6fe1f02117 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectDescription.json @@ -0,0 +1,433 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectGenericAlias.json b/test/schemas/llm.application/chatgpt/ObjectGenericAlias.json new file mode 100644 index 0000000000..77e3505c8a --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectGenericAlias.json @@ -0,0 +1,185 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectGenericArray.json b/test/schemas/llm.application/chatgpt/ObjectGenericArray.json new file mode 100644 index 0000000000..9771ec4f57 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectGenericArray.json @@ -0,0 +1,513 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectGenericUnion.json b/test/schemas/llm.application/chatgpt/ObjectGenericUnion.json new file mode 100644 index 0000000000..0294443040 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectGenericUnion.json @@ -0,0 +1,2945 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectInternal.json b/test/schemas/llm.application/chatgpt/ObjectInternal.json new file mode 100644 index 0000000000..ea66ed0350 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectInternal.json @@ -0,0 +1,217 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectIntersection.json b/test/schemas/llm.application/chatgpt/ObjectIntersection.json new file mode 100644 index 0000000000..80a61d8c20 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectIntersection.json @@ -0,0 +1,249 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectJsonTag.json b/test/schemas/llm.application/chatgpt/ObjectJsonTag.json new file mode 100644 index 0000000000..ac4155ba70 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectJsonTag.json @@ -0,0 +1,337 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectLiteralProperty.json b/test/schemas/llm.application/chatgpt/ObjectLiteralProperty.json new file mode 100644 index 0000000000..ffbab75795 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectLiteralProperty.json @@ -0,0 +1,217 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectLiteralType.json b/test/schemas/llm.application/chatgpt/ObjectLiteralType.json new file mode 100644 index 0000000000..41ad8c259b --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectLiteralType.json @@ -0,0 +1,249 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectNullable.json b/test/schemas/llm.application/chatgpt/ObjectNullable.json new file mode 100644 index 0000000000..b968a4499f --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectNullable.json @@ -0,0 +1,1025 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectOptional.json b/test/schemas/llm.application/chatgpt/ObjectOptional.json new file mode 100644 index 0000000000..f26ea3231f --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectOptional.json @@ -0,0 +1,281 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectPartial.json b/test/schemas/llm.application/chatgpt/ObjectPartial.json new file mode 100644 index 0000000000..091411ed4e --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectPartial.json @@ -0,0 +1,518 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "output": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectPartialAndRequired.json b/test/schemas/llm.application/chatgpt/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..e52ce925c8 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectPartialAndRequired.json @@ -0,0 +1,230 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ], + "additionalProperties": false + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ], + "additionalProperties": false + } + } + }, + "output": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ], + "additionalProperties": false + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectPrimitive.json b/test/schemas/llm.application/chatgpt/ObjectPrimitive.json new file mode 100644 index 0000000000..43efdcf05e --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectPrimitive.json @@ -0,0 +1,641 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectRecursive.json b/test/schemas/llm.application/chatgpt/ObjectRecursive.json new file mode 100644 index 0000000000..50e79b846c --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectRecursive.json @@ -0,0 +1,272 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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 + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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 + } + } + }, + "output": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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 + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectRequired.json b/test/schemas/llm.application/chatgpt/ObjectRequired.json new file mode 100644 index 0000000000..df7f014976 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectRequired.json @@ -0,0 +1,518 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "output": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectSimple.json b/test/schemas/llm.application/chatgpt/ObjectSimple.json new file mode 100644 index 0000000000..fab1f58902 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectSimple.json @@ -0,0 +1,825 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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 + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "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 + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUndefined.json b/test/schemas/llm.application/chatgpt/ObjectUndefined.json new file mode 100644 index 0000000000..565eb8e0c4 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUndefined.json @@ -0,0 +1,481 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionComposite.json b/test/schemas/llm.application/chatgpt/ObjectUnionComposite.json new file mode 100644 index 0000000000..80181fd215 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionComposite.json @@ -0,0 +1,3057 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionCompositePointer.json b/test/schemas/llm.application/chatgpt/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..f7fbee2519 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionCompositePointer.json @@ -0,0 +1,3201 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionDouble.json b/test/schemas/llm.application/chatgpt/ObjectUnionDouble.json new file mode 100644 index 0000000000..7eddf52275 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionDouble.json @@ -0,0 +1,1257 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionExplicit.json b/test/schemas/llm.application/chatgpt/ObjectUnionExplicit.json new file mode 100644 index 0000000000..b10ce65eb4 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionExplicit.json @@ -0,0 +1,3089 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionExplicitPointer.json b/test/schemas/llm.application/chatgpt/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..e5ea0ac5f4 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionExplicitPointer.json @@ -0,0 +1,3233 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionImplicit.json b/test/schemas/llm.application/chatgpt/ObjectUnionImplicit.json new file mode 100644 index 0000000000..226b159903 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionImplicit.json @@ -0,0 +1,5073 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ObjectUnionNonPredictable.json b/test/schemas/llm.application/chatgpt/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..b2d516316d --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ObjectUnionNonPredictable.json @@ -0,0 +1,865 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TemplateAtomic.json b/test/schemas/llm.application/chatgpt/TemplateAtomic.json new file mode 100644 index 0000000000..b3b3201849 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TemplateAtomic.json @@ -0,0 +1,497 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TemplateConstant.json b/test/schemas/llm.application/chatgpt/TemplateConstant.json new file mode 100644 index 0000000000..6310cab7b9 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TemplateConstant.json @@ -0,0 +1,513 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TemplateUnion.json b/test/schemas/llm.application/chatgpt/TemplateUnion.json new file mode 100644 index 0000000000..034e1a79b3 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TemplateUnion.json @@ -0,0 +1,649 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ToJsonAtomicUnion.json b/test/schemas/llm.application/chatgpt/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..45f61002f3 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ToJsonAtomicUnion.json @@ -0,0 +1,241 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ToJsonDouble.json b/test/schemas/llm.application/chatgpt/ToJsonDouble.json new file mode 100644 index 0000000000..d6b72101a6 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ToJsonDouble.json @@ -0,0 +1,217 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ToJsonNull.json b/test/schemas/llm.application/chatgpt/ToJsonNull.json new file mode 100644 index 0000000000..d4634c4abb --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ToJsonNull.json @@ -0,0 +1,113 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "null" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/ToJsonUnion.json b/test/schemas/llm.application/chatgpt/ToJsonUnion.json new file mode 100644 index 0000000000..48a36bcde5 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/ToJsonUnion.json @@ -0,0 +1,697 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagArray.json b/test/schemas/llm.application/chatgpt/TypeTagArray.json new file mode 100644 index 0000000000..762b0d5036 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagArray.json @@ -0,0 +1,601 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagArrayUnion.json b/test/schemas/llm.application/chatgpt/TypeTagArrayUnion.json new file mode 100644 index 0000000000..8a09299b6d --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagArrayUnion.json @@ -0,0 +1,529 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagAtomicUnion.json b/test/schemas/llm.application/chatgpt/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..183c7e7aa4 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagAtomicUnion.json @@ -0,0 +1,353 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagCustom.json b/test/schemas/llm.application/chatgpt/TypeTagCustom.json new file mode 100644 index 0000000000..ecf60887dd --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagCustom.json @@ -0,0 +1,313 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagDefault.json b/test/schemas/llm.application/chatgpt/TypeTagDefault.json new file mode 100644 index 0000000000..64601fa8b5 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagDefault.json @@ -0,0 +1,913 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagFormat.json b/test/schemas/llm.application/chatgpt/TypeTagFormat.json new file mode 100644 index 0000000000..ab46e8123d --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagFormat.json @@ -0,0 +1,1033 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagLength.json b/test/schemas/llm.application/chatgpt/TypeTagLength.json new file mode 100644 index 0000000000..a20061fdc2 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagLength.json @@ -0,0 +1,449 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagMatrix.json b/test/schemas/llm.application/chatgpt/TypeTagMatrix.json new file mode 100644 index 0000000000..82ffecbf08 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagMatrix.json @@ -0,0 +1,257 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagObjectUnion.json b/test/schemas/llm.application/chatgpt/TypeTagObjectUnion.json new file mode 100644 index 0000000000..aa839a8d77 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagObjectUnion.json @@ -0,0 +1,353 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagPattern.json b/test/schemas/llm.application/chatgpt/TypeTagPattern.json new file mode 100644 index 0000000000..f3c8ef4034 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagPattern.json @@ -0,0 +1,313 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagRange.json b/test/schemas/llm.application/chatgpt/TypeTagRange.json new file mode 100644 index 0000000000..ec0dddb62e --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagRange.json @@ -0,0 +1,609 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/chatgpt/TypeTagType.json b/test/schemas/llm.application/chatgpt/TypeTagType.json new file mode 100644 index 0000000000..3812ff1b11 --- /dev/null +++ b/test/schemas/llm.application/chatgpt/TypeTagType.json @@ -0,0 +1,473 @@ +{ + "model": "chatgpt", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "second": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "third": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayAny.json b/test/schemas/llm.application/claude/ArrayAny.json new file mode 100644 index 0000000000..44cad15654 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayAny.json @@ -0,0 +1,785 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayHierarchical.json b/test/schemas/llm.application/claude/ArrayHierarchical.json new file mode 100644 index 0000000000..f9669758ba --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayHierarchical.json @@ -0,0 +1,1049 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayHierarchicalPointer.json b/test/schemas/llm.application/claude/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..8c996b27ab --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayHierarchicalPointer.json @@ -0,0 +1,1113 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayMatrix.json b/test/schemas/llm.application/claude/ArrayMatrix.json new file mode 100644 index 0000000000..dba4f664c8 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayMatrix.json @@ -0,0 +1,185 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRecursive.json b/test/schemas/llm.application/claude/ArrayRecursive.json new file mode 100644 index 0000000000..eb85ec1392 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRecursive.json @@ -0,0 +1,242 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.application/claude/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..d81a8bbe47 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,692 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.application/claude/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..85ef42bdd3 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,780 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.application/claude/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..0309e1f0c5 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,704 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRepeatedNullable.json b/test/schemas/llm.application/claude/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..59254e6553 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRepeatedNullable.json @@ -0,0 +1,147 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "third": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRepeatedRequired.json b/test/schemas/llm.application/claude/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..569561c2f2 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRepeatedRequired.json @@ -0,0 +1,203 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayRepeatedUnion.json b/test/schemas/llm.application/claude/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..a790c41830 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayRepeatedUnion.json @@ -0,0 +1,971 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArraySimple.json b/test/schemas/llm.application/claude/ArraySimple.json new file mode 100644 index 0000000000..93a5562c3b --- /dev/null +++ b/test/schemas/llm.application/claude/ArraySimple.json @@ -0,0 +1,417 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ArrayUnion.json b/test/schemas/llm.application/claude/ArrayUnion.json new file mode 100644 index 0000000000..ace340cf67 --- /dev/null +++ b/test/schemas/llm.application/claude/ArrayUnion.json @@ -0,0 +1,289 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/AtomicUnion.json b/test/schemas/llm.application/claude/AtomicUnion.json new file mode 100644 index 0000000000..b6816889e7 --- /dev/null +++ b/test/schemas/llm.application/claude/AtomicUnion.json @@ -0,0 +1,241 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ClassGetter.json b/test/schemas/llm.application/claude/ClassGetter.json new file mode 100644 index 0000000000..6e7e1225b7 --- /dev/null +++ b/test/schemas/llm.application/claude/ClassGetter.json @@ -0,0 +1,297 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ClassMethod.json b/test/schemas/llm.application/claude/ClassMethod.json new file mode 100644 index 0000000000..f6eecdfdc5 --- /dev/null +++ b/test/schemas/llm.application/claude/ClassMethod.json @@ -0,0 +1,209 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ClassPropertyAssignment.json b/test/schemas/llm.application/claude/ClassPropertyAssignment.json new file mode 100644 index 0000000000..a8a11c98a1 --- /dev/null +++ b/test/schemas/llm.application/claude/ClassPropertyAssignment.json @@ -0,0 +1,305 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagArray.json b/test/schemas/llm.application/claude/CommentTagArray.json new file mode 100644 index 0000000000..9e491343d9 --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagArray.json @@ -0,0 +1,577 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagArrayUnion.json b/test/schemas/llm.application/claude/CommentTagArrayUnion.json new file mode 100644 index 0000000000..2af815997f --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagArrayUnion.json @@ -0,0 +1,497 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagAtomicUnion.json b/test/schemas/llm.application/claude/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..4764cf9529 --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagAtomicUnion.json @@ -0,0 +1,345 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagDefault.json b/test/schemas/llm.application/claude/CommentTagDefault.json new file mode 100644 index 0000000000..a1cd9743ab --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagDefault.json @@ -0,0 +1,1049 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagFormat.json b/test/schemas/llm.application/claude/CommentTagFormat.json new file mode 100644 index 0000000000..2315d84176 --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagFormat.json @@ -0,0 +1,1025 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagLength.json b/test/schemas/llm.application/claude/CommentTagLength.json new file mode 100644 index 0000000000..e95d2f1e26 --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagLength.json @@ -0,0 +1,457 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagObjectUnion.json b/test/schemas/llm.application/claude/CommentTagObjectUnion.json new file mode 100644 index 0000000000..b0ea8edf86 --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagObjectUnion.json @@ -0,0 +1,345 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagPattern.json b/test/schemas/llm.application/claude/CommentTagPattern.json new file mode 100644 index 0000000000..0a51fba20f --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagPattern.json @@ -0,0 +1,305 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagRange.json b/test/schemas/llm.application/claude/CommentTagRange.json new file mode 100644 index 0000000000..448f05ed50 --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagRange.json @@ -0,0 +1,681 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/CommentTagType.json b/test/schemas/llm.application/claude/CommentTagType.json new file mode 100644 index 0000000000..2ba637593a --- /dev/null +++ b/test/schemas/llm.application/claude/CommentTagType.json @@ -0,0 +1,489 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ConstantAtomicAbsorbed.json b/test/schemas/llm.application/claude/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..eb2203c394 --- /dev/null +++ b/test/schemas/llm.application/claude/ConstantAtomicAbsorbed.json @@ -0,0 +1,225 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ConstantAtomicTagged.json b/test/schemas/llm.application/claude/ConstantAtomicTagged.json new file mode 100644 index 0000000000..9f2b7c28fc --- /dev/null +++ b/test/schemas/llm.application/claude/ConstantAtomicTagged.json @@ -0,0 +1,337 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ConstantAtomicUnion.json b/test/schemas/llm.application/claude/ConstantAtomicUnion.json new file mode 100644 index 0000000000..b7213d66dd --- /dev/null +++ b/test/schemas/llm.application/claude/ConstantAtomicUnion.json @@ -0,0 +1,353 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ConstantConstEnumeration.json b/test/schemas/llm.application/claude/ConstantConstEnumeration.json new file mode 100644 index 0000000000..d41e9926fa --- /dev/null +++ b/test/schemas/llm.application/claude/ConstantConstEnumeration.json @@ -0,0 +1,265 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ConstantEnumeration.json b/test/schemas/llm.application/claude/ConstantEnumeration.json new file mode 100644 index 0000000000..d41e9926fa --- /dev/null +++ b/test/schemas/llm.application/claude/ConstantEnumeration.json @@ -0,0 +1,265 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicArray.json b/test/schemas/llm.application/claude/DynamicArray.json new file mode 100644 index 0000000000..58f95ad297 --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicArray.json @@ -0,0 +1,241 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicComposite.json b/test/schemas/llm.application/claude/DynamicComposite.json new file mode 100644 index 0000000000..fc1d82b757 --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicComposite.json @@ -0,0 +1,313 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicConstant.json b/test/schemas/llm.application/claude/DynamicConstant.json new file mode 100644 index 0000000000..2c3b371371 --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicConstant.json @@ -0,0 +1,337 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicEnumeration.json b/test/schemas/llm.application/claude/DynamicEnumeration.json new file mode 100644 index 0000000000..922631d65d --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicEnumeration.json @@ -0,0 +1,529 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicNever.json b/test/schemas/llm.application/claude/DynamicNever.json new file mode 100644 index 0000000000..fd699da13d --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicNever.json @@ -0,0 +1,129 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicSimple.json b/test/schemas/llm.application/claude/DynamicSimple.json new file mode 100644 index 0000000000..f35400495c --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicSimple.json @@ -0,0 +1,217 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicTemplate.json b/test/schemas/llm.application/claude/DynamicTemplate.json new file mode 100644 index 0000000000..dcc7557ddf --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicTemplate.json @@ -0,0 +1,233 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicTree.json b/test/schemas/llm.application/claude/DynamicTree.json new file mode 100644 index 0000000000..bc43a9e677 --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicTree.json @@ -0,0 +1,200 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/DynamicTree" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/DynamicTree" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "output": { + "$ref": "#/$defs/DynamicTree" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicUndefined.json b/test/schemas/llm.application/claude/DynamicUndefined.json new file mode 100644 index 0000000000..fd699da13d --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicUndefined.json @@ -0,0 +1,129 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/DynamicUnion.json b/test/schemas/llm.application/claude/DynamicUnion.json new file mode 100644 index 0000000000..813549d13c --- /dev/null +++ b/test/schemas/llm.application/claude/DynamicUnion.json @@ -0,0 +1,209 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectAlias.json b/test/schemas/llm.application/claude/ObjectAlias.json new file mode 100644 index 0000000000..d663253c1d --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectAlias.json @@ -0,0 +1,657 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectDate.json b/test/schemas/llm.application/claude/ObjectDate.json new file mode 100644 index 0000000000..7325f167fd --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectDate.json @@ -0,0 +1,625 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectDescription.json b/test/schemas/llm.application/claude/ObjectDescription.json new file mode 100644 index 0000000000..2c49d69ded --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectDescription.json @@ -0,0 +1,433 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectDynamic.json b/test/schemas/llm.application/claude/ObjectDynamic.json new file mode 100644 index 0000000000..dcc7557ddf --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectDynamic.json @@ -0,0 +1,233 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectGenericAlias.json b/test/schemas/llm.application/claude/ObjectGenericAlias.json new file mode 100644 index 0000000000..792bf8f112 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectGenericAlias.json @@ -0,0 +1,177 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectGenericArray.json b/test/schemas/llm.application/claude/ObjectGenericArray.json new file mode 100644 index 0000000000..c98be49fe9 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectGenericArray.json @@ -0,0 +1,489 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectGenericUnion.json b/test/schemas/llm.application/claude/ObjectGenericUnion.json new file mode 100644 index 0000000000..fc0b1d592f --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectGenericUnion.json @@ -0,0 +1,2841 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectInternal.json b/test/schemas/llm.application/claude/ObjectInternal.json new file mode 100644 index 0000000000..2291310623 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectInternal.json @@ -0,0 +1,209 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectIntersection.json b/test/schemas/llm.application/claude/ObjectIntersection.json new file mode 100644 index 0000000000..a5e5bd8c9d --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectIntersection.json @@ -0,0 +1,241 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectJsonTag.json b/test/schemas/llm.application/claude/ObjectJsonTag.json new file mode 100644 index 0000000000..c6a89c79d3 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectJsonTag.json @@ -0,0 +1,329 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectLiteralProperty.json b/test/schemas/llm.application/claude/ObjectLiteralProperty.json new file mode 100644 index 0000000000..9cfe4ed255 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectLiteralProperty.json @@ -0,0 +1,209 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectLiteralType.json b/test/schemas/llm.application/claude/ObjectLiteralType.json new file mode 100644 index 0000000000..c9f5c35266 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectLiteralType.json @@ -0,0 +1,241 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectNullable.json b/test/schemas/llm.application/claude/ObjectNullable.json new file mode 100644 index 0000000000..2ad89aa622 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectNullable.json @@ -0,0 +1,881 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectOptional.json b/test/schemas/llm.application/claude/ObjectOptional.json new file mode 100644 index 0000000000..e1333cdf0e --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectOptional.json @@ -0,0 +1,273 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectPartial.json b/test/schemas/llm.application/claude/ObjectPartial.json new file mode 100644 index 0000000000..12913601b0 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectPartial.json @@ -0,0 +1,507 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectPartialAndRequired.json b/test/schemas/llm.application/claude/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..b1c1879586 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectPartialAndRequired.json @@ -0,0 +1,227 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectPrimitive.json b/test/schemas/llm.application/claude/ObjectPrimitive.json new file mode 100644 index 0000000000..6c8cfbe522 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectPrimitive.json @@ -0,0 +1,665 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectRecursive.json b/test/schemas/llm.application/claude/ObjectRecursive.json new file mode 100644 index 0000000000..fb00292b7e --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectRecursive.json @@ -0,0 +1,266 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectRequired.json b/test/schemas/llm.application/claude/ObjectRequired.json new file mode 100644 index 0000000000..c0df66ce4a --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectRequired.json @@ -0,0 +1,507 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectSimple.json b/test/schemas/llm.application/claude/ObjectSimple.json new file mode 100644 index 0000000000..d6bb660a44 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectSimple.json @@ -0,0 +1,785 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUndefined.json b/test/schemas/llm.application/claude/ObjectUndefined.json new file mode 100644 index 0000000000..5742bbb13e --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUndefined.json @@ -0,0 +1,465 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionComposite.json b/test/schemas/llm.application/claude/ObjectUnionComposite.json new file mode 100644 index 0000000000..1844dd9dbe --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionComposite.json @@ -0,0 +1,2857 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionCompositePointer.json b/test/schemas/llm.application/claude/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..54c72523e5 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionCompositePointer.json @@ -0,0 +1,2985 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionDouble.json b/test/schemas/llm.application/claude/ObjectUnionDouble.json new file mode 100644 index 0000000000..cc6edff911 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionDouble.json @@ -0,0 +1,1161 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionExplicit.json b/test/schemas/llm.application/claude/ObjectUnionExplicit.json new file mode 100644 index 0000000000..b2706a6c3a --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionExplicit.json @@ -0,0 +1,2745 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionExplicitPointer.json b/test/schemas/llm.application/claude/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..61a3ef4d8b --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionExplicitPointer.json @@ -0,0 +1,2873 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionImplicit.json b/test/schemas/llm.application/claude/ObjectUnionImplicit.json new file mode 100644 index 0000000000..b3fc1f58f0 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionImplicit.json @@ -0,0 +1,4897 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ObjectUnionNonPredictable.json b/test/schemas/llm.application/claude/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..fb583dcc98 --- /dev/null +++ b/test/schemas/llm.application/claude/ObjectUnionNonPredictable.json @@ -0,0 +1,793 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TemplateAtomic.json b/test/schemas/llm.application/claude/TemplateAtomic.json new file mode 100644 index 0000000000..58cb775daa --- /dev/null +++ b/test/schemas/llm.application/claude/TemplateAtomic.json @@ -0,0 +1,513 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TemplateConstant.json b/test/schemas/llm.application/claude/TemplateConstant.json new file mode 100644 index 0000000000..ff15a1a298 --- /dev/null +++ b/test/schemas/llm.application/claude/TemplateConstant.json @@ -0,0 +1,713 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TemplateUnion.json b/test/schemas/llm.application/claude/TemplateUnion.json new file mode 100644 index 0000000000..a4b9c2de72 --- /dev/null +++ b/test/schemas/llm.application/claude/TemplateUnion.json @@ -0,0 +1,689 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ToJsonAtomicUnion.json b/test/schemas/llm.application/claude/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..b6816889e7 --- /dev/null +++ b/test/schemas/llm.application/claude/ToJsonAtomicUnion.json @@ -0,0 +1,241 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ToJsonDouble.json b/test/schemas/llm.application/claude/ToJsonDouble.json new file mode 100644 index 0000000000..51f0fef72c --- /dev/null +++ b/test/schemas/llm.application/claude/ToJsonDouble.json @@ -0,0 +1,209 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ToJsonNull.json b/test/schemas/llm.application/claude/ToJsonNull.json new file mode 100644 index 0000000000..af899c308e --- /dev/null +++ b/test/schemas/llm.application/claude/ToJsonNull.json @@ -0,0 +1,113 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "null" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/ToJsonUnion.json b/test/schemas/llm.application/claude/ToJsonUnion.json new file mode 100644 index 0000000000..d2c89b9699 --- /dev/null +++ b/test/schemas/llm.application/claude/ToJsonUnion.json @@ -0,0 +1,673 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagArray.json b/test/schemas/llm.application/claude/TypeTagArray.json new file mode 100644 index 0000000000..61977f3dd4 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagArray.json @@ -0,0 +1,617 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagArrayUnion.json b/test/schemas/llm.application/claude/TypeTagArrayUnion.json new file mode 100644 index 0000000000..ac93623f43 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagArrayUnion.json @@ -0,0 +1,537 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagAtomicUnion.json b/test/schemas/llm.application/claude/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..4764cf9529 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagAtomicUnion.json @@ -0,0 +1,345 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagCustom.json b/test/schemas/llm.application/claude/TypeTagCustom.json new file mode 100644 index 0000000000..de3a63762d --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagCustom.json @@ -0,0 +1,305 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagDefault.json b/test/schemas/llm.application/claude/TypeTagDefault.json new file mode 100644 index 0000000000..84e84fd725 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagDefault.json @@ -0,0 +1,905 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagFormat.json b/test/schemas/llm.application/claude/TypeTagFormat.json new file mode 100644 index 0000000000..2315d84176 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagFormat.json @@ -0,0 +1,1025 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagLength.json b/test/schemas/llm.application/claude/TypeTagLength.json new file mode 100644 index 0000000000..e95d2f1e26 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagLength.json @@ -0,0 +1,457 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagMatrix.json b/test/schemas/llm.application/claude/TypeTagMatrix.json new file mode 100644 index 0000000000..0488361e99 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagMatrix.json @@ -0,0 +1,265 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagObjectUnion.json b/test/schemas/llm.application/claude/TypeTagObjectUnion.json new file mode 100644 index 0000000000..b0ea8edf86 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagObjectUnion.json @@ -0,0 +1,345 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagPattern.json b/test/schemas/llm.application/claude/TypeTagPattern.json new file mode 100644 index 0000000000..1dbafdd4d1 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagPattern.json @@ -0,0 +1,305 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagRange.json b/test/schemas/llm.application/claude/TypeTagRange.json new file mode 100644 index 0000000000..448f05ed50 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagRange.json @@ -0,0 +1,681 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/claude/TypeTagType.json b/test/schemas/llm.application/claude/TypeTagType.json new file mode 100644 index 0000000000..f473ecd586 --- /dev/null +++ b/test/schemas/llm.application/claude/TypeTagType.json @@ -0,0 +1,457 @@ +{ + "model": "claude", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ArrayAny.json b/test/schemas/llm.application/gemini/ArrayAny.json new file mode 100644 index 0000000000..a599db158c --- /dev/null +++ b/test/schemas/llm.application/gemini/ArrayAny.json @@ -0,0 +1,468 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + }, + "second": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ArrayHierarchical.json b/test/schemas/llm.application/gemini/ArrayHierarchical.json new file mode 100644 index 0000000000..15a6db1d41 --- /dev/null +++ b/test/schemas/llm.application/gemini/ArrayHierarchical.json @@ -0,0 +1,1012 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ArrayHierarchicalPointer.json b/test/schemas/llm.application/gemini/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..5aac703eb3 --- /dev/null +++ b/test/schemas/llm.application/gemini/ArrayHierarchicalPointer.json @@ -0,0 +1,1076 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ArrayMatrix.json b/test/schemas/llm.application/gemini/ArrayMatrix.json new file mode 100644 index 0000000000..aa9df556f3 --- /dev/null +++ b/test/schemas/llm.application/gemini/ArrayMatrix.json @@ -0,0 +1,148 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "second": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ArrayRecursive.json b/test/schemas/llm.application/gemini/ArrayRecursive.json new file mode 100644 index 0000000000..6793126680 --- /dev/null +++ b/test/schemas/llm.application/gemini/ArrayRecursive.json @@ -0,0 +1,1316 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + }, + "second": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + }, + "second": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + }, + "third": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ArraySimple.json b/test/schemas/llm.application/gemini/ArraySimple.json new file mode 100644 index 0000000000..02b0d42c35 --- /dev/null +++ b/test/schemas/llm.application/gemini/ArraySimple.json @@ -0,0 +1,380 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + }, + "second": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + }, + "third": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ClassGetter.json b/test/schemas/llm.application/gemini/ClassGetter.json new file mode 100644 index 0000000000..9860a410bc --- /dev/null +++ b/test/schemas/llm.application/gemini/ClassGetter.json @@ -0,0 +1,212 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ClassMethod.json b/test/schemas/llm.application/gemini/ClassMethod.json new file mode 100644 index 0000000000..32dea94871 --- /dev/null +++ b/test/schemas/llm.application/gemini/ClassMethod.json @@ -0,0 +1,172 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "second": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ClassPropertyAssignment.json b/test/schemas/llm.application/gemini/ClassPropertyAssignment.json new file mode 100644 index 0000000000..75f248db98 --- /dev/null +++ b/test/schemas/llm.application/gemini/ClassPropertyAssignment.json @@ -0,0 +1,316 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/CommentTagArray.json b/test/schemas/llm.application/gemini/CommentTagArray.json new file mode 100644 index 0000000000..fb287b26aa --- /dev/null +++ b/test/schemas/llm.application/gemini/CommentTagArray.json @@ -0,0 +1,540 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/CommentTagFormat.json b/test/schemas/llm.application/gemini/CommentTagFormat.json new file mode 100644 index 0000000000..2a7ae1913c --- /dev/null +++ b/test/schemas/llm.application/gemini/CommentTagFormat.json @@ -0,0 +1,988 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/CommentTagLength.json b/test/schemas/llm.application/gemini/CommentTagLength.json new file mode 100644 index 0000000000..33f51ba9de --- /dev/null +++ b/test/schemas/llm.application/gemini/CommentTagLength.json @@ -0,0 +1,396 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/CommentTagPattern.json b/test/schemas/llm.application/gemini/CommentTagPattern.json new file mode 100644 index 0000000000..1425370e55 --- /dev/null +++ b/test/schemas/llm.application/gemini/CommentTagPattern.json @@ -0,0 +1,268 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/CommentTagRange.json b/test/schemas/llm.application/gemini/CommentTagRange.json new file mode 100644 index 0000000000..738e4fb1dd --- /dev/null +++ b/test/schemas/llm.application/gemini/CommentTagRange.json @@ -0,0 +1,556 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/CommentTagType.json b/test/schemas/llm.application/gemini/CommentTagType.json new file mode 100644 index 0000000000..9a731fea0e --- /dev/null +++ b/test/schemas/llm.application/gemini/CommentTagType.json @@ -0,0 +1,436 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ConstantAtomicAbsorbed.json b/test/schemas/llm.application/gemini/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..7c1e853ecc --- /dev/null +++ b/test/schemas/llm.application/gemini/ConstantAtomicAbsorbed.json @@ -0,0 +1,188 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/DynamicConstant.json b/test/schemas/llm.application/gemini/DynamicConstant.json new file mode 100644 index 0000000000..db53dd0515 --- /dev/null +++ b/test/schemas/llm.application/gemini/DynamicConstant.json @@ -0,0 +1,300 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/DynamicEnumeration.json b/test/schemas/llm.application/gemini/DynamicEnumeration.json new file mode 100644 index 0000000000..43e3dc307b --- /dev/null +++ b/test/schemas/llm.application/gemini/DynamicEnumeration.json @@ -0,0 +1,404 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/DynamicNever.json b/test/schemas/llm.application/gemini/DynamicNever.json new file mode 100644 index 0000000000..77ccb2d54e --- /dev/null +++ b/test/schemas/llm.application/gemini/DynamicNever.json @@ -0,0 +1,92 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/DynamicUndefined.json b/test/schemas/llm.application/gemini/DynamicUndefined.json new file mode 100644 index 0000000000..77ccb2d54e --- /dev/null +++ b/test/schemas/llm.application/gemini/DynamicUndefined.json @@ -0,0 +1,92 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "second": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "third": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectDate.json b/test/schemas/llm.application/gemini/ObjectDate.json new file mode 100644 index 0000000000..ccb13151ef --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectDate.json @@ -0,0 +1,340 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + }, + "second": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectDescription.json b/test/schemas/llm.application/gemini/ObjectDescription.json new file mode 100644 index 0000000000..5b0526d751 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectDescription.json @@ -0,0 +1,335 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectGenericAlias.json b/test/schemas/llm.application/gemini/ObjectGenericAlias.json new file mode 100644 index 0000000000..09fba94efc --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectGenericAlias.json @@ -0,0 +1,140 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectGenericArray.json b/test/schemas/llm.application/gemini/ObjectGenericArray.json new file mode 100644 index 0000000000..42108188c9 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectGenericArray.json @@ -0,0 +1,452 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "second": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectInternal.json b/test/schemas/llm.application/gemini/ObjectInternal.json new file mode 100644 index 0000000000..a87d061828 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectInternal.json @@ -0,0 +1,172 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectIntersection.json b/test/schemas/llm.application/gemini/ObjectIntersection.json new file mode 100644 index 0000000000..4fceb03078 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectIntersection.json @@ -0,0 +1,204 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "second": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectJsonTag.json b/test/schemas/llm.application/gemini/ObjectJsonTag.json new file mode 100644 index 0000000000..a0d63f3ee2 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectJsonTag.json @@ -0,0 +1,268 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "second": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectLiteralProperty.json b/test/schemas/llm.application/gemini/ObjectLiteralProperty.json new file mode 100644 index 0000000000..ac86162414 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectLiteralProperty.json @@ -0,0 +1,172 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "second": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectLiteralType.json b/test/schemas/llm.application/gemini/ObjectLiteralType.json new file mode 100644 index 0000000000..e4a57a4529 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectLiteralType.json @@ -0,0 +1,204 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectOptional.json b/test/schemas/llm.application/gemini/ObjectOptional.json new file mode 100644 index 0000000000..4239faff89 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectOptional.json @@ -0,0 +1,196 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectPartial.json b/test/schemas/llm.application/gemini/ObjectPartial.json new file mode 100644 index 0000000000..d2d0f5a255 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectPartial.json @@ -0,0 +1,1143 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + }, + "second": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "second": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "third": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectPartialAndRequired.json b/test/schemas/llm.application/gemini/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..2322067057 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectPartialAndRequired.json @@ -0,0 +1,868 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + }, + "second": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "second": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "third": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectPrimitive.json b/test/schemas/llm.application/gemini/ObjectPrimitive.json new file mode 100644 index 0000000000..e4eed05979 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectPrimitive.json @@ -0,0 +1,588 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectRecursive.json b/test/schemas/llm.application/gemini/ObjectRecursive.json new file mode 100644 index 0000000000..d276c7ab8c --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectRecursive.json @@ -0,0 +1,1380 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + }, + "second": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + }, + "second": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + }, + "third": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectRequired.json b/test/schemas/llm.application/gemini/ObjectRequired.json new file mode 100644 index 0000000000..1e243b61f0 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectRequired.json @@ -0,0 +1,999 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + }, + "second": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + }, + "second": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + }, + "third": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ObjectSimple.json b/test/schemas/llm.application/gemini/ObjectSimple.json new file mode 100644 index 0000000000..65743481e1 --- /dev/null +++ b/test/schemas/llm.application/gemini/ObjectSimple.json @@ -0,0 +1,748 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "second": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TemplateAtomic.json b/test/schemas/llm.application/gemini/TemplateAtomic.json new file mode 100644 index 0000000000..0392e31d75 --- /dev/null +++ b/test/schemas/llm.application/gemini/TemplateAtomic.json @@ -0,0 +1,452 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "second": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TemplateConstant.json b/test/schemas/llm.application/gemini/TemplateConstant.json new file mode 100644 index 0000000000..d6666af811 --- /dev/null +++ b/test/schemas/llm.application/gemini/TemplateConstant.json @@ -0,0 +1,460 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ToJsonDouble.json b/test/schemas/llm.application/gemini/ToJsonDouble.json new file mode 100644 index 0000000000..ccebd7e459 --- /dev/null +++ b/test/schemas/llm.application/gemini/ToJsonDouble.json @@ -0,0 +1,172 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/ToJsonNull.json b/test/schemas/llm.application/gemini/ToJsonNull.json new file mode 100644 index 0000000000..165e2d9df8 --- /dev/null +++ b/test/schemas/llm.application/gemini/ToJsonNull.json @@ -0,0 +1,71 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "type": "null" + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "null" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "type": "null" + }, + "third": { + "type": "null" + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "null" + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagArray.json b/test/schemas/llm.application/gemini/TypeTagArray.json new file mode 100644 index 0000000000..420b4d3535 --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagArray.json @@ -0,0 +1,572 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagCustom.json b/test/schemas/llm.application/gemini/TypeTagCustom.json new file mode 100644 index 0000000000..bd0002385d --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagCustom.json @@ -0,0 +1,268 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagFormat.json b/test/schemas/llm.application/gemini/TypeTagFormat.json new file mode 100644 index 0000000000..2a7ae1913c --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagFormat.json @@ -0,0 +1,988 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagLength.json b/test/schemas/llm.application/gemini/TypeTagLength.json new file mode 100644 index 0000000000..33f51ba9de --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagLength.json @@ -0,0 +1,396 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagMatrix.json b/test/schemas/llm.application/gemini/TypeTagMatrix.json new file mode 100644 index 0000000000..7553fb7acc --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagMatrix.json @@ -0,0 +1,228 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "second": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagPattern.json b/test/schemas/llm.application/gemini/TypeTagPattern.json new file mode 100644 index 0000000000..618e7abfd2 --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagPattern.json @@ -0,0 +1,268 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagRange.json b/test/schemas/llm.application/gemini/TypeTagRange.json new file mode 100644 index 0000000000..738e4fb1dd --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagRange.json @@ -0,0 +1,556 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/gemini/TypeTagType.json b/test/schemas/llm.application/gemini/TypeTagType.json new file mode 100644 index 0000000000..5edde19365 --- /dev/null +++ b/test/schemas/llm.application/gemini/TypeTagType.json @@ -0,0 +1,420 @@ +{ + "model": "gemini", + "options": { + "recursive": 3, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ] + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "second": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "third": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + } + }, + "required": [ + "first", + "second" + ] + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayAny.json b/test/schemas/llm.application/llama/ArrayAny.json new file mode 100644 index 0000000000..ed15200849 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayAny.json @@ -0,0 +1,785 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayHierarchical.json b/test/schemas/llm.application/llama/ArrayHierarchical.json new file mode 100644 index 0000000000..5c6e44ac2a --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayHierarchical.json @@ -0,0 +1,1049 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayHierarchicalPointer.json b/test/schemas/llm.application/llama/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..19cbba0eaf --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayHierarchicalPointer.json @@ -0,0 +1,1113 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayMatrix.json b/test/schemas/llm.application/llama/ArrayMatrix.json new file mode 100644 index 0000000000..f409fb6b48 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayMatrix.json @@ -0,0 +1,185 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRecursive.json b/test/schemas/llm.application/llama/ArrayRecursive.json new file mode 100644 index 0000000000..1a4c70dc35 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRecursive.json @@ -0,0 +1,242 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.application/llama/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..7c0b4e6a39 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,692 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.application/llama/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..6be23a4ce1 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,780 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.application/llama/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..76e7192a9d --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,704 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRepeatedNullable.json b/test/schemas/llm.application/llama/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..2a0dd9d974 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRepeatedNullable.json @@ -0,0 +1,147 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "second": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "third": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRepeatedRequired.json b/test/schemas/llm.application/llama/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..409758ccb6 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRepeatedRequired.json @@ -0,0 +1,203 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + }, + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayRepeatedUnion.json b/test/schemas/llm.application/llama/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..f84520b91d --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayRepeatedUnion.json @@ -0,0 +1,971 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } + }, + "output": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + }, + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArraySimple.json b/test/schemas/llm.application/llama/ArraySimple.json new file mode 100644 index 0000000000..fb37045652 --- /dev/null +++ b/test/schemas/llm.application/llama/ArraySimple.json @@ -0,0 +1,417 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ArrayUnion.json b/test/schemas/llm.application/llama/ArrayUnion.json new file mode 100644 index 0000000000..918ef58dd0 --- /dev/null +++ b/test/schemas/llm.application/llama/ArrayUnion.json @@ -0,0 +1,289 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/AtomicUnion.json b/test/schemas/llm.application/llama/AtomicUnion.json new file mode 100644 index 0000000000..4bfd398481 --- /dev/null +++ b/test/schemas/llm.application/llama/AtomicUnion.json @@ -0,0 +1,241 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ClassGetter.json b/test/schemas/llm.application/llama/ClassGetter.json new file mode 100644 index 0000000000..b8c1347140 --- /dev/null +++ b/test/schemas/llm.application/llama/ClassGetter.json @@ -0,0 +1,297 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ClassMethod.json b/test/schemas/llm.application/llama/ClassMethod.json new file mode 100644 index 0000000000..526f644e33 --- /dev/null +++ b/test/schemas/llm.application/llama/ClassMethod.json @@ -0,0 +1,209 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ClassPropertyAssignment.json b/test/schemas/llm.application/llama/ClassPropertyAssignment.json new file mode 100644 index 0000000000..fab4a5690f --- /dev/null +++ b/test/schemas/llm.application/llama/ClassPropertyAssignment.json @@ -0,0 +1,305 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagArray.json b/test/schemas/llm.application/llama/CommentTagArray.json new file mode 100644 index 0000000000..51b2ba322d --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagArray.json @@ -0,0 +1,577 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagArrayUnion.json b/test/schemas/llm.application/llama/CommentTagArrayUnion.json new file mode 100644 index 0000000000..b6d4d301a8 --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagArrayUnion.json @@ -0,0 +1,497 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagAtomicUnion.json b/test/schemas/llm.application/llama/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..b074987c2e --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagAtomicUnion.json @@ -0,0 +1,345 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagDefault.json b/test/schemas/llm.application/llama/CommentTagDefault.json new file mode 100644 index 0000000000..e16806acda --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagDefault.json @@ -0,0 +1,1049 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagFormat.json b/test/schemas/llm.application/llama/CommentTagFormat.json new file mode 100644 index 0000000000..b9d02dc864 --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagFormat.json @@ -0,0 +1,1025 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagLength.json b/test/schemas/llm.application/llama/CommentTagLength.json new file mode 100644 index 0000000000..46aeb948bc --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagLength.json @@ -0,0 +1,457 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagObjectUnion.json b/test/schemas/llm.application/llama/CommentTagObjectUnion.json new file mode 100644 index 0000000000..a913545e7b --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagObjectUnion.json @@ -0,0 +1,345 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagPattern.json b/test/schemas/llm.application/llama/CommentTagPattern.json new file mode 100644 index 0000000000..541d99b1da --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagPattern.json @@ -0,0 +1,305 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagRange.json b/test/schemas/llm.application/llama/CommentTagRange.json new file mode 100644 index 0000000000..86f6046294 --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagRange.json @@ -0,0 +1,681 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/CommentTagType.json b/test/schemas/llm.application/llama/CommentTagType.json new file mode 100644 index 0000000000..71dd1a84dc --- /dev/null +++ b/test/schemas/llm.application/llama/CommentTagType.json @@ -0,0 +1,489 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ConstantAtomicAbsorbed.json b/test/schemas/llm.application/llama/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..bbc9b1c123 --- /dev/null +++ b/test/schemas/llm.application/llama/ConstantAtomicAbsorbed.json @@ -0,0 +1,225 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ConstantAtomicTagged.json b/test/schemas/llm.application/llama/ConstantAtomicTagged.json new file mode 100644 index 0000000000..df9e7ad39d --- /dev/null +++ b/test/schemas/llm.application/llama/ConstantAtomicTagged.json @@ -0,0 +1,337 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ConstantAtomicUnion.json b/test/schemas/llm.application/llama/ConstantAtomicUnion.json new file mode 100644 index 0000000000..2149865745 --- /dev/null +++ b/test/schemas/llm.application/llama/ConstantAtomicUnion.json @@ -0,0 +1,353 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ConstantConstEnumeration.json b/test/schemas/llm.application/llama/ConstantConstEnumeration.json new file mode 100644 index 0000000000..092255af5b --- /dev/null +++ b/test/schemas/llm.application/llama/ConstantConstEnumeration.json @@ -0,0 +1,265 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ConstantEnumeration.json b/test/schemas/llm.application/llama/ConstantEnumeration.json new file mode 100644 index 0000000000..092255af5b --- /dev/null +++ b/test/schemas/llm.application/llama/ConstantEnumeration.json @@ -0,0 +1,265 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicArray.json b/test/schemas/llm.application/llama/DynamicArray.json new file mode 100644 index 0000000000..ae34674077 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicArray.json @@ -0,0 +1,241 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicComposite.json b/test/schemas/llm.application/llama/DynamicComposite.json new file mode 100644 index 0000000000..27d4afa511 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicComposite.json @@ -0,0 +1,313 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicConstant.json b/test/schemas/llm.application/llama/DynamicConstant.json new file mode 100644 index 0000000000..15afc9a30c --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicConstant.json @@ -0,0 +1,337 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicEnumeration.json b/test/schemas/llm.application/llama/DynamicEnumeration.json new file mode 100644 index 0000000000..31dd8b46a5 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicEnumeration.json @@ -0,0 +1,529 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicNever.json b/test/schemas/llm.application/llama/DynamicNever.json new file mode 100644 index 0000000000..e05974d057 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicNever.json @@ -0,0 +1,129 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicSimple.json b/test/schemas/llm.application/llama/DynamicSimple.json new file mode 100644 index 0000000000..6437b8f7e3 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicSimple.json @@ -0,0 +1,217 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicTemplate.json b/test/schemas/llm.application/llama/DynamicTemplate.json new file mode 100644 index 0000000000..ee85e05bb4 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicTemplate.json @@ -0,0 +1,233 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicTree.json b/test/schemas/llm.application/llama/DynamicTree.json new file mode 100644 index 0000000000..f4c558c6bf --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicTree.json @@ -0,0 +1,200 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/DynamicTree" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/DynamicTree" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "output": { + "$ref": "#/$defs/DynamicTree" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicUndefined.json b/test/schemas/llm.application/llama/DynamicUndefined.json new file mode 100644 index 0000000000..e05974d057 --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicUndefined.json @@ -0,0 +1,129 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/DynamicUnion.json b/test/schemas/llm.application/llama/DynamicUnion.json new file mode 100644 index 0000000000..2df218341d --- /dev/null +++ b/test/schemas/llm.application/llama/DynamicUnion.json @@ -0,0 +1,209 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectAlias.json b/test/schemas/llm.application/llama/ObjectAlias.json new file mode 100644 index 0000000000..493fd730ba --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectAlias.json @@ -0,0 +1,657 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectDate.json b/test/schemas/llm.application/llama/ObjectDate.json new file mode 100644 index 0000000000..c94359ad9d --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectDate.json @@ -0,0 +1,625 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectDescription.json b/test/schemas/llm.application/llama/ObjectDescription.json new file mode 100644 index 0000000000..a964502493 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectDescription.json @@ -0,0 +1,433 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectDynamic.json b/test/schemas/llm.application/llama/ObjectDynamic.json new file mode 100644 index 0000000000..ee85e05bb4 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectDynamic.json @@ -0,0 +1,233 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectGenericAlias.json b/test/schemas/llm.application/llama/ObjectGenericAlias.json new file mode 100644 index 0000000000..d40f935402 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectGenericAlias.json @@ -0,0 +1,177 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectGenericArray.json b/test/schemas/llm.application/llama/ObjectGenericArray.json new file mode 100644 index 0000000000..08e1887c42 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectGenericArray.json @@ -0,0 +1,489 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectGenericUnion.json b/test/schemas/llm.application/llama/ObjectGenericUnion.json new file mode 100644 index 0000000000..8f6439c7aa --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectGenericUnion.json @@ -0,0 +1,2841 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectInternal.json b/test/schemas/llm.application/llama/ObjectInternal.json new file mode 100644 index 0000000000..e031a8f97d --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectInternal.json @@ -0,0 +1,209 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectIntersection.json b/test/schemas/llm.application/llama/ObjectIntersection.json new file mode 100644 index 0000000000..31bc73e267 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectIntersection.json @@ -0,0 +1,241 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectJsonTag.json b/test/schemas/llm.application/llama/ObjectJsonTag.json new file mode 100644 index 0000000000..182fa7fbd2 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectJsonTag.json @@ -0,0 +1,329 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectLiteralProperty.json b/test/schemas/llm.application/llama/ObjectLiteralProperty.json new file mode 100644 index 0000000000..91168acfc4 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectLiteralProperty.json @@ -0,0 +1,209 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectLiteralType.json b/test/schemas/llm.application/llama/ObjectLiteralType.json new file mode 100644 index 0000000000..0664cc85a6 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectLiteralType.json @@ -0,0 +1,241 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectNullable.json b/test/schemas/llm.application/llama/ObjectNullable.json new file mode 100644 index 0000000000..1b481a9edf --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectNullable.json @@ -0,0 +1,881 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectOptional.json b/test/schemas/llm.application/llama/ObjectOptional.json new file mode 100644 index 0000000000..73165251b4 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectOptional.json @@ -0,0 +1,273 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectPartial.json b/test/schemas/llm.application/llama/ObjectPartial.json new file mode 100644 index 0000000000..ac623900dd --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectPartial.json @@ -0,0 +1,507 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectPartialAndRequired.json b/test/schemas/llm.application/llama/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..a3ae6193b1 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectPartialAndRequired.json @@ -0,0 +1,227 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectPrimitive.json b/test/schemas/llm.application/llama/ObjectPrimitive.json new file mode 100644 index 0000000000..7b1bc2cabb --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectPrimitive.json @@ -0,0 +1,665 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectRecursive.json b/test/schemas/llm.application/llama/ObjectRecursive.json new file mode 100644 index 0000000000..c8531f887b --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectRecursive.json @@ -0,0 +1,266 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectRequired.json b/test/schemas/llm.application/llama/ObjectRequired.json new file mode 100644 index 0000000000..3c0edfe911 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectRequired.json @@ -0,0 +1,507 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectSimple.json b/test/schemas/llm.application/llama/ObjectSimple.json new file mode 100644 index 0000000000..c4b513da31 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectSimple.json @@ -0,0 +1,785 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUndefined.json b/test/schemas/llm.application/llama/ObjectUndefined.json new file mode 100644 index 0000000000..d9052f486b --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUndefined.json @@ -0,0 +1,465 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionComposite.json b/test/schemas/llm.application/llama/ObjectUnionComposite.json new file mode 100644 index 0000000000..75cf7224a7 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionComposite.json @@ -0,0 +1,2857 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionCompositePointer.json b/test/schemas/llm.application/llama/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..17db476f2b --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionCompositePointer.json @@ -0,0 +1,2985 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionDouble.json b/test/schemas/llm.application/llama/ObjectUnionDouble.json new file mode 100644 index 0000000000..a00212081c --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionDouble.json @@ -0,0 +1,1161 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionExplicit.json b/test/schemas/llm.application/llama/ObjectUnionExplicit.json new file mode 100644 index 0000000000..1bbb8248e6 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionExplicit.json @@ -0,0 +1,2745 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionExplicitPointer.json b/test/schemas/llm.application/llama/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..67d1e78206 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionExplicitPointer.json @@ -0,0 +1,2873 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionImplicit.json b/test/schemas/llm.application/llama/ObjectUnionImplicit.json new file mode 100644 index 0000000000..74f28160a7 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionImplicit.json @@ -0,0 +1,4897 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ObjectUnionNonPredictable.json b/test/schemas/llm.application/llama/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..7bb48871e9 --- /dev/null +++ b/test/schemas/llm.application/llama/ObjectUnionNonPredictable.json @@ -0,0 +1,793 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TemplateAtomic.json b/test/schemas/llm.application/llama/TemplateAtomic.json new file mode 100644 index 0000000000..e4e9848bfa --- /dev/null +++ b/test/schemas/llm.application/llama/TemplateAtomic.json @@ -0,0 +1,513 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TemplateConstant.json b/test/schemas/llm.application/llama/TemplateConstant.json new file mode 100644 index 0000000000..7ec1e193cd --- /dev/null +++ b/test/schemas/llm.application/llama/TemplateConstant.json @@ -0,0 +1,713 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TemplateUnion.json b/test/schemas/llm.application/llama/TemplateUnion.json new file mode 100644 index 0000000000..6ef0bdfaaf --- /dev/null +++ b/test/schemas/llm.application/llama/TemplateUnion.json @@ -0,0 +1,689 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ToJsonAtomicUnion.json b/test/schemas/llm.application/llama/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..4bfd398481 --- /dev/null +++ b/test/schemas/llm.application/llama/ToJsonAtomicUnion.json @@ -0,0 +1,241 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ToJsonDouble.json b/test/schemas/llm.application/llama/ToJsonDouble.json new file mode 100644 index 0000000000..5db9c26563 --- /dev/null +++ b/test/schemas/llm.application/llama/ToJsonDouble.json @@ -0,0 +1,209 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ToJsonNull.json b/test/schemas/llm.application/llama/ToJsonNull.json new file mode 100644 index 0000000000..4c0f5f7a1d --- /dev/null +++ b/test/schemas/llm.application/llama/ToJsonNull.json @@ -0,0 +1,113 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "null" + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "null" + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/ToJsonUnion.json b/test/schemas/llm.application/llama/ToJsonUnion.json new file mode 100644 index 0000000000..cd11a9ea24 --- /dev/null +++ b/test/schemas/llm.application/llama/ToJsonUnion.json @@ -0,0 +1,673 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagArray.json b/test/schemas/llm.application/llama/TypeTagArray.json new file mode 100644 index 0000000000..a52be79ffd --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagArray.json @@ -0,0 +1,617 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagArrayUnion.json b/test/schemas/llm.application/llama/TypeTagArrayUnion.json new file mode 100644 index 0000000000..05ede02e24 --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagArrayUnion.json @@ -0,0 +1,537 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagAtomicUnion.json b/test/schemas/llm.application/llama/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..b074987c2e --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagAtomicUnion.json @@ -0,0 +1,345 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagCustom.json b/test/schemas/llm.application/llama/TypeTagCustom.json new file mode 100644 index 0000000000..2b137882ac --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagCustom.json @@ -0,0 +1,305 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagDefault.json b/test/schemas/llm.application/llama/TypeTagDefault.json new file mode 100644 index 0000000000..427c34515f --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagDefault.json @@ -0,0 +1,905 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagFormat.json b/test/schemas/llm.application/llama/TypeTagFormat.json new file mode 100644 index 0000000000..b9d02dc864 --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagFormat.json @@ -0,0 +1,1025 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagLength.json b/test/schemas/llm.application/llama/TypeTagLength.json new file mode 100644 index 0000000000..46aeb948bc --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagLength.json @@ -0,0 +1,457 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagMatrix.json b/test/schemas/llm.application/llama/TypeTagMatrix.json new file mode 100644 index 0000000000..922396094d --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagMatrix.json @@ -0,0 +1,265 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagObjectUnion.json b/test/schemas/llm.application/llama/TypeTagObjectUnion.json new file mode 100644 index 0000000000..a913545e7b --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagObjectUnion.json @@ -0,0 +1,345 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagPattern.json b/test/schemas/llm.application/llama/TypeTagPattern.json new file mode 100644 index 0000000000..b12a9e6773 --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagPattern.json @@ -0,0 +1,305 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagRange.json b/test/schemas/llm.application/llama/TypeTagRange.json new file mode 100644 index 0000000000..86f6046294 --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagRange.json @@ -0,0 +1,681 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.application/llama/TypeTagType.json b/test/schemas/llm.application/llama/TypeTagType.json new file mode 100644 index 0000000000..53e4d6221e --- /dev/null +++ b/test/schemas/llm.application/llama/TypeTagType.json @@ -0,0 +1,457 @@ +{ + "model": "llama", + "options": { + "reference": false, + "separate": null + }, + "functions": [ + { + "name": "insert", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "first" + ], + "additionalProperties": false, + "$defs": {} + }, + "strict": true + }, + { + "name": "reduce", + "parameters": { + "type": "object", + "properties": { + "first": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "strict": true + }, + { + "name": "coalesce", + "parameters": { + "type": "object", + "properties": { + "first": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "second": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "third": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "first", + "second", + "third" + ], + "additionalProperties": false, + "$defs": {} + }, + "output": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "strict": true + } + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayAny.json b/test/schemas/llm.parameters/3.0/ArrayAny.json new file mode 100644 index 0000000000..1862ba1d3e --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayAny.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayHierarchical.json b/test/schemas/llm.parameters/3.0/ArrayHierarchical.json new file mode 100644 index 0000000000..19e6bbfdfe --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayHierarchical.json @@ -0,0 +1,646 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayHierarchicalPointer.json b/test/schemas/llm.parameters/3.0/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..564b685a2e --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayHierarchicalPointer.json @@ -0,0 +1,691 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayMatrix.json b/test/schemas/llm.parameters/3.0/ArrayMatrix.json new file mode 100644 index 0000000000..ec00622d0a --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayMatrix.json @@ -0,0 +1,76 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "nullable": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "faint": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRecursive.json b/test/schemas/llm.parameters/3.0/ArrayRecursive.json new file mode 100644 index 0000000000..9f862bcfb9 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRecursive.json @@ -0,0 +1,846 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + }, + "nullable": { + "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, + "nullable": true + }, + "optional": { + "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 + }, + "faint": { + "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, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..3ddaf43452 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,9046 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + } + ] + } + }, + "nullable": { + "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 + } + ] + }, + "nullable": true + }, + "optional": { + "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 + } + ] + } + }, + "faint": { + "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 + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..161d539afe --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,9541 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + }, + "nullable": { + "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, + "nullable": true + }, + "optional": { + "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 + }, + "faint": { + "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, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..099579eabb --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,15786 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + } + ] + } + }, + "nullable": { + "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 + } + ] + }, + "nullable": true + }, + "optional": { + "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 + } + ] + } + }, + "faint": { + "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 + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRepeatedNullable.json b/test/schemas/llm.parameters/3.0/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..304306743d --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRepeatedNullable.json @@ -0,0 +1,364 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + } + ] + }, + "nullable": { + "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 + } + ] + }, + "optional": { + "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": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "faint": { + "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": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "array": { + "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": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "array", + "items": {}, + "maxItems": 0, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + }, + "nullable": true + } + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRepeatedRequired.json b/test/schemas/llm.parameters/3.0/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..aac4a2d069 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRepeatedRequired.json @@ -0,0 +1,314 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + }, + "optional": { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "nullable": true + } + ] + }, + "array": { + "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": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "array", + "items": {}, + "maxItems": 0 + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayRepeatedUnion.json b/test/schemas/llm.parameters/3.0/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..01ed961744 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayRepeatedUnion.json @@ -0,0 +1,2641 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + } + } + ] + }, + "nullable": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + }, + "optional": { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + } + }, + { + "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 + } + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "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": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "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 + } + } + ] + }, + "nullable": true + }, + { + "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 + }, + "nullable": true + } + ] + }, + "array": { + "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": { + "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 + } + } + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArraySimple.json b/test/schemas/llm.parameters/3.0/ArraySimple.json new file mode 100644 index 0000000000..71b145b63c --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArraySimple.json @@ -0,0 +1,231 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ArrayUnion.json b/test/schemas/llm.parameters/3.0/ArrayUnion.json new file mode 100644 index 0000000000..fffadc7b93 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ArrayUnion.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/AtomicUnion.json b/test/schemas/llm.parameters/3.0/AtomicUnion.json new file mode 100644 index 0000000000..452d11111d --- /dev/null +++ b/test/schemas/llm.parameters/3.0/AtomicUnion.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ClassGetter.json b/test/schemas/llm.parameters/3.0/ClassGetter.json new file mode 100644 index 0000000000..9df83c8207 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ClassGetter.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ClassMethod.json b/test/schemas/llm.parameters/3.0/ClassMethod.json new file mode 100644 index 0000000000..7a29e34978 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ClassMethod.json @@ -0,0 +1,96 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ClassPropertyAssignment.json b/test/schemas/llm.parameters/3.0/ClassPropertyAssignment.json new file mode 100644 index 0000000000..d0af3fc383 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ClassPropertyAssignment.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagArray.json b/test/schemas/llm.parameters/3.0/CommentTagArray.json new file mode 100644 index 0000000000..7ba7935e58 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagArray.json @@ -0,0 +1,331 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagArrayUnion.json b/test/schemas/llm.parameters/3.0/CommentTagArrayUnion.json new file mode 100644 index 0000000000..c99d9d2826 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagArrayUnion.json @@ -0,0 +1,276 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagAtomicUnion.json b/test/schemas/llm.parameters/3.0/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..ed4d69681d --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagAtomicUnion.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagDefault.json b/test/schemas/llm.parameters/3.0/CommentTagDefault.json new file mode 100644 index 0000000000..c8a1e21040 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagDefault.json @@ -0,0 +1,561 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagFormat.json b/test/schemas/llm.parameters/3.0/CommentTagFormat.json new file mode 100644 index 0000000000..255a496ad6 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagFormat.json @@ -0,0 +1,606 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagLength.json b/test/schemas/llm.parameters/3.0/CommentTagLength.json new file mode 100644 index 0000000000..fd2c20b200 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagLength.json @@ -0,0 +1,241 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagObjectUnion.json b/test/schemas/llm.parameters/3.0/CommentTagObjectUnion.json new file mode 100644 index 0000000000..1f9ad1a7d1 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagObjectUnion.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagPattern.json b/test/schemas/llm.parameters/3.0/CommentTagPattern.json new file mode 100644 index 0000000000..d8b5f0e99e --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagPattern.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagRange.json b/test/schemas/llm.parameters/3.0/CommentTagRange.json new file mode 100644 index 0000000000..2c3b9e522e --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagRange.json @@ -0,0 +1,341 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/CommentTagType.json b/test/schemas/llm.parameters/3.0/CommentTagType.json new file mode 100644 index 0000000000..fc89a32274 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/CommentTagType.json @@ -0,0 +1,276 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "title": "Integer value", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "title": "Unsigned integer value", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ConstantAtomicAbsorbed.json b/test/schemas/llm.parameters/3.0/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..0e2db1a7d1 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ConstantAtomicAbsorbed.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ConstantAtomicTagged.json b/test/schemas/llm.parameters/3.0/ConstantAtomicTagged.json new file mode 100644 index 0000000000..b25b427811 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ConstantAtomicTagged.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ConstantAtomicUnion.json b/test/schemas/llm.parameters/3.0/ConstantAtomicUnion.json new file mode 100644 index 0000000000..fdecab10f7 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ConstantAtomicUnion.json @@ -0,0 +1,226 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ConstantConstEnumeration.json b/test/schemas/llm.parameters/3.0/ConstantConstEnumeration.json new file mode 100644 index 0000000000..46b0babc98 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ConstantConstEnumeration.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ConstantEnumeration.json b/test/schemas/llm.parameters/3.0/ConstantEnumeration.json new file mode 100644 index 0000000000..46b0babc98 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ConstantEnumeration.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicArray.json b/test/schemas/llm.parameters/3.0/DynamicArray.json new file mode 100644 index 0000000000..2dd863af19 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicArray.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicComposite.json b/test/schemas/llm.parameters/3.0/DynamicComposite.json new file mode 100644 index 0000000000..8f25ab9ef5 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicComposite.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicConstant.json b/test/schemas/llm.parameters/3.0/DynamicConstant.json new file mode 100644 index 0000000000..ebc3cef1cf --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicConstant.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicEnumeration.json b/test/schemas/llm.parameters/3.0/DynamicEnumeration.json new file mode 100644 index 0000000000..ae6fa1f48f --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicEnumeration.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicNever.json b/test/schemas/llm.parameters/3.0/DynamicNever.json new file mode 100644 index 0000000000..1ee1d2bf96 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicNever.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicSimple.json b/test/schemas/llm.parameters/3.0/DynamicSimple.json new file mode 100644 index 0000000000..4538a74428 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicSimple.json @@ -0,0 +1,101 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicTemplate.json b/test/schemas/llm.parameters/3.0/DynamicTemplate.json new file mode 100644 index 0000000000..b6f7ae8b1a --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicTemplate.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicTree.json b/test/schemas/llm.parameters/3.0/DynamicTree.json new file mode 100644 index 0000000000..6230f1afb0 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicTree.json @@ -0,0 +1,481 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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 + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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 + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicUndefined.json b/test/schemas/llm.parameters/3.0/DynamicUndefined.json new file mode 100644 index 0000000000..1ee1d2bf96 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicUndefined.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/DynamicUnion.json b/test/schemas/llm.parameters/3.0/DynamicUnion.json new file mode 100644 index 0000000000..31fd6c7d06 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/DynamicUnion.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectAlias.json b/test/schemas/llm.parameters/3.0/ObjectAlias.json new file mode 100644 index 0000000000..5af1bf4e22 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectAlias.json @@ -0,0 +1,291 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "number", + "enum": [ + 1, + 2 + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "male", + "female" + ], + "nullable": true + } + ] + }, + "age": { + "type": "number", + "nullable": true + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectDate.json b/test/schemas/llm.parameters/3.0/ObjectDate.json new file mode 100644 index 0000000000..9053940796 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectDate.json @@ -0,0 +1,201 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectDescription.json b/test/schemas/llm.parameters/3.0/ObjectDescription.json new file mode 100644 index 0000000000..6f2a9c8cf3 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectDescription.json @@ -0,0 +1,222 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectDynamic.json b/test/schemas/llm.parameters/3.0/ObjectDynamic.json new file mode 100644 index 0000000000..b6f7ae8b1a --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectDynamic.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectGenericAlias.json b/test/schemas/llm.parameters/3.0/ObjectGenericAlias.json new file mode 100644 index 0000000000..ef03c27a81 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectGenericAlias.json @@ -0,0 +1,76 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectGenericArray.json b/test/schemas/llm.parameters/3.0/ObjectGenericArray.json new file mode 100644 index 0000000000..05c7744fce --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectGenericArray.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectGenericUnion.json b/test/schemas/llm.parameters/3.0/ObjectGenericUnion.json new file mode 100644 index 0000000000..227efafdbd --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectGenericUnion.json @@ -0,0 +1,1621 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectInternal.json b/test/schemas/llm.parameters/3.0/ObjectInternal.json new file mode 100644 index 0000000000..e784c01363 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectInternal.json @@ -0,0 +1,96 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectIntersection.json b/test/schemas/llm.parameters/3.0/ObjectIntersection.json new file mode 100644 index 0000000000..97cfcdab2b --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectIntersection.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectJsonTag.json b/test/schemas/llm.parameters/3.0/ObjectJsonTag.json new file mode 100644 index 0000000000..d8516f24a1 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectJsonTag.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "title": "Descripted property", + "description": "Descripted property." + }, + "title": { + "type": "string", + "title": "something", + "description": "Titled property." + }, + "complicate_title": { + "type": "string", + "title": "something weirdo with {@link something } tag", + "description": "Complicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectLiteralProperty.json b/test/schemas/llm.parameters/3.0/ObjectLiteralProperty.json new file mode 100644 index 0000000000..fcaaa99b59 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectLiteralProperty.json @@ -0,0 +1,96 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectLiteralType.json b/test/schemas/llm.parameters/3.0/ObjectLiteralType.json new file mode 100644 index 0000000000..1e89870d22 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectLiteralType.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectNullable.json b/test/schemas/llm.parameters/3.0/ObjectNullable.json new file mode 100644 index 0000000000..3ab74709cb --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectNullable.json @@ -0,0 +1,566 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + "similar": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false, + "nullable": true + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectOptional.json b/test/schemas/llm.parameters/3.0/ObjectOptional.json new file mode 100644 index 0000000000..171b9a7cae --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectOptional.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectPartial.json b/test/schemas/llm.parameters/3.0/ObjectPartial.json new file mode 100644 index 0000000000..61d74170d8 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectPartial.json @@ -0,0 +1,724 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + }, + "nullable": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + }, + "faint": { + "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 + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectPartialAndRequired.json b/test/schemas/llm.parameters/3.0/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..231365e945 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectPartialAndRequired.json @@ -0,0 +1,546 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + }, + "nullable": { + "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, + "nullable": true + }, + "optional": { + "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 + }, + "faint": { + "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, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectPrimitive.json b/test/schemas/llm.parameters/3.0/ObjectPrimitive.json new file mode 100644 index 0000000000..27886a66b3 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectPrimitive.json @@ -0,0 +1,361 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectRecursive.json b/test/schemas/llm.parameters/3.0/ObjectRecursive.json new file mode 100644 index 0000000000..8b9f2f4f6a --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectRecursive.json @@ -0,0 +1,886 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + }, + "nullable": { + "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, + "nullable": true + }, + "optional": { + "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 + }, + "faint": { + "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, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectRequired.json b/test/schemas/llm.parameters/3.0/ObjectRequired.json new file mode 100644 index 0000000000..96e7f32f9e --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectRequired.json @@ -0,0 +1,634 @@ +{ + "type": "object", + "properties": { + "regular": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + }, + "nullable": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + }, + "faint": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectSimple.json b/test/schemas/llm.parameters/3.0/ObjectSimple.json new file mode 100644 index 0000000000..337c664151 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectSimple.json @@ -0,0 +1,476 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + }, + "nullable": { + "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, + "nullable": true + }, + "optional": { + "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 + }, + "faint": { + "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, + "nullable": true + }, + "array": { + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUndefined.json b/test/schemas/llm.parameters/3.0/ObjectUndefined.json new file mode 100644 index 0000000000..535ac43039 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUndefined.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "unknown" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionComposite.json b/test/schemas/llm.parameters/3.0/ObjectUnionComposite.json new file mode 100644 index 0000000000..65a1276cb5 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionComposite.json @@ -0,0 +1,1871 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionCompositePointer.json b/test/schemas/llm.parameters/3.0/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..dc1d850338 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionCompositePointer.json @@ -0,0 +1,1961 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionDouble.json b/test/schemas/llm.parameters/3.0/ObjectUnionDouble.json new file mode 100644 index 0000000000..957a77fae6 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionDouble.json @@ -0,0 +1,746 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionExplicit.json b/test/schemas/llm.parameters/3.0/ObjectUnionExplicit.json new file mode 100644 index 0000000000..07aef44715 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionExplicit.json @@ -0,0 +1,1891 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionExplicitPointer.json b/test/schemas/llm.parameters/3.0/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..d01dac47d4 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionExplicitPointer.json @@ -0,0 +1,1981 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionImplicit.json b/test/schemas/llm.parameters/3.0/ObjectUnionImplicit.json new file mode 100644 index 0000000000..0d16d0c9af --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionImplicit.json @@ -0,0 +1,2176 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "distance": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "width": { + "type": "number", + "nullable": true + }, + "height": { + "type": "number", + "nullable": true + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "length": { + "type": "number", + "nullable": true + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "outer" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "type": "number", + "nullable": true + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "area": { + "type": "number", + "nullable": true + } + }, + "required": [ + "radius" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ObjectUnionNonPredictable.json b/test/schemas/llm.parameters/3.0/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..e9869a65f2 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ObjectUnionNonPredictable.json @@ -0,0 +1,501 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TemplateAtomic.json b/test/schemas/llm.parameters/3.0/TemplateAtomic.json new file mode 100644 index 0000000000..e4dce98b47 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TemplateAtomic.json @@ -0,0 +1,271 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TemplateConstant.json b/test/schemas/llm.parameters/3.0/TemplateConstant.json new file mode 100644 index 0000000000..c11fd2c23c --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TemplateConstant.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TemplateUnion.json b/test/schemas/llm.parameters/3.0/TemplateUnion.json new file mode 100644 index 0000000000..53eaff8cc8 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TemplateUnion.json @@ -0,0 +1,366 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ToJsonAtomicUnion.json b/test/schemas/llm.parameters/3.0/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..452d11111d --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ToJsonAtomicUnion.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number", + "nullable": true + }, + { + "type": "boolean", + "nullable": true + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ToJsonDouble.json b/test/schemas/llm.parameters/3.0/ToJsonDouble.json new file mode 100644 index 0000000000..125a0b69a2 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ToJsonDouble.json @@ -0,0 +1,96 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ToJsonNull.json b/test/schemas/llm.parameters/3.0/ToJsonNull.json new file mode 100644 index 0000000000..027a813c94 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ToJsonNull.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "null" + }, + "nullable": { + "type": "null" + }, + "optional": { + "type": "null" + }, + "faint": { + "type": "null" + }, + "array": { + "type": "array", + "items": { + "type": "null" + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/ToJsonUnion.json b/test/schemas/llm.parameters/3.0/ToJsonUnion.json new file mode 100644 index 0000000000..1a2cec8ccb --- /dev/null +++ b/test/schemas/llm.parameters/3.0/ToJsonUnion.json @@ -0,0 +1,396 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagArray.json b/test/schemas/llm.parameters/3.0/TypeTagArray.json new file mode 100644 index 0000000000..1b9be0fe41 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagArray.json @@ -0,0 +1,351 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagArrayUnion.json b/test/schemas/llm.parameters/3.0/TypeTagArrayUnion.json new file mode 100644 index 0000000000..a4b9959ccd --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagArrayUnion.json @@ -0,0 +1,301 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagAtomicUnion.json b/test/schemas/llm.parameters/3.0/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..ed4d69681d --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagAtomicUnion.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagCustom.json b/test/schemas/llm.parameters/3.0/TypeTagCustom.json new file mode 100644 index 0000000000..02613d3443 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagCustom.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagDefault.json b/test/schemas/llm.parameters/3.0/TypeTagDefault.json new file mode 100644 index 0000000000..ba7d85aa79 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagDefault.json @@ -0,0 +1,531 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagFormat.json b/test/schemas/llm.parameters/3.0/TypeTagFormat.json new file mode 100644 index 0000000000..255a496ad6 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagFormat.json @@ -0,0 +1,606 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagLength.json b/test/schemas/llm.parameters/3.0/TypeTagLength.json new file mode 100644 index 0000000000..fd2c20b200 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagLength.json @@ -0,0 +1,241 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagMatrix.json b/test/schemas/llm.parameters/3.0/TypeTagMatrix.json new file mode 100644 index 0000000000..f2b189b7ef --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagMatrix.json @@ -0,0 +1,131 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagObjectUnion.json b/test/schemas/llm.parameters/3.0/TypeTagObjectUnion.json new file mode 100644 index 0000000000..1f9ad1a7d1 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagObjectUnion.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagPattern.json b/test/schemas/llm.parameters/3.0/TypeTagPattern.json new file mode 100644 index 0000000000..f3cbddcb0d --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagPattern.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagRange.json b/test/schemas/llm.parameters/3.0/TypeTagRange.json new file mode 100644 index 0000000000..2c3b9e522e --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagRange.json @@ -0,0 +1,341 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.0/TypeTagType.json b/test/schemas/llm.parameters/3.0/TypeTagType.json new file mode 100644 index 0000000000..d67e8fbb96 --- /dev/null +++ b/test/schemas/llm.parameters/3.0/TypeTagType.json @@ -0,0 +1,256 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayAny.json b/test/schemas/llm.parameters/3.1/ArrayAny.json new file mode 100644 index 0000000000..f6218cd25f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayAny.json @@ -0,0 +1,466 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayHierarchical.json b/test/schemas/llm.parameters/3.1/ArrayHierarchical.json new file mode 100644 index 0000000000..545bd71aae --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayHierarchical.json @@ -0,0 +1,631 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayHierarchicalPointer.json b/test/schemas/llm.parameters/3.1/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..0a05c8dc38 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayHierarchicalPointer.json @@ -0,0 +1,671 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayMatrix.json b/test/schemas/llm.parameters/3.1/ArrayMatrix.json new file mode 100644 index 0000000000..10c0b1a218 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayMatrix.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRecursive.json b/test/schemas/llm.parameters/3.1/ArrayRecursive.json new file mode 100644 index 0000000000..4c4ee75b86 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRecursive.json @@ -0,0 +1,89 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "optional": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..25646a857e --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..61d55645c7 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,294 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..65a9ae9fb0 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,250 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRepeatedNullable.json b/test/schemas/llm.parameters/3.1/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..359a3b9f5d --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRepeatedNullable.json @@ -0,0 +1,81 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "nullable": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "optional": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRepeatedRequired.json b/test/schemas/llm.parameters/3.1/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..ea8e0dbc73 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRepeatedRequired.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "optional": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayRepeatedUnion.json b/test/schemas/llm.parameters/3.1/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..27f9cd98bb --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayRepeatedUnion.json @@ -0,0 +1,472 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "optional": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArraySimple.json b/test/schemas/llm.parameters/3.1/ArraySimple.json new file mode 100644 index 0000000000..b1b1c6c764 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArraySimple.json @@ -0,0 +1,236 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ArrayUnion.json b/test/schemas/llm.parameters/3.1/ArrayUnion.json new file mode 100644 index 0000000000..7d9879b780 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ArrayUnion.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/AtomicUnion.json b/test/schemas/llm.parameters/3.1/AtomicUnion.json new file mode 100644 index 0000000000..8fa8f16801 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/AtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ClassGetter.json b/test/schemas/llm.parameters/3.1/ClassGetter.json new file mode 100644 index 0000000000..035bae3b06 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ClassGetter.json @@ -0,0 +1,161 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ClassMethod.json b/test/schemas/llm.parameters/3.1/ClassMethod.json new file mode 100644 index 0000000000..fab6467691 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ClassMethod.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ClassPropertyAssignment.json b/test/schemas/llm.parameters/3.1/ClassPropertyAssignment.json new file mode 100644 index 0000000000..9c4a899abd --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ClassPropertyAssignment.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagArray.json b/test/schemas/llm.parameters/3.1/CommentTagArray.json new file mode 100644 index 0000000000..0b914681e3 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagArray.json @@ -0,0 +1,321 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagArrayUnion.json b/test/schemas/llm.parameters/3.1/CommentTagArrayUnion.json new file mode 100644 index 0000000000..8ea80463e4 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagArrayUnion.json @@ -0,0 +1,276 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagAtomicUnion.json b/test/schemas/llm.parameters/3.1/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..d5b82550f4 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagAtomicUnion.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagDefault.json b/test/schemas/llm.parameters/3.1/CommentTagDefault.json new file mode 100644 index 0000000000..cb1d8b9598 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagDefault.json @@ -0,0 +1,621 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagFormat.json b/test/schemas/llm.parameters/3.1/CommentTagFormat.json new file mode 100644 index 0000000000..60adb55916 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagFormat.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagLength.json b/test/schemas/llm.parameters/3.1/CommentTagLength.json new file mode 100644 index 0000000000..6fa7663764 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagLength.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagObjectUnion.json b/test/schemas/llm.parameters/3.1/CommentTagObjectUnion.json new file mode 100644 index 0000000000..2d784c2f1b --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagObjectUnion.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagPattern.json b/test/schemas/llm.parameters/3.1/CommentTagPattern.json new file mode 100644 index 0000000000..49856afee6 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagPattern.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagRange.json b/test/schemas/llm.parameters/3.1/CommentTagRange.json new file mode 100644 index 0000000000..555e09d002 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagRange.json @@ -0,0 +1,346 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/CommentTagType.json b/test/schemas/llm.parameters/3.1/CommentTagType.json new file mode 100644 index 0000000000..9488cfb86b --- /dev/null +++ b/test/schemas/llm.parameters/3.1/CommentTagType.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ConstantAtomicAbsorbed.json b/test/schemas/llm.parameters/3.1/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..dba622a641 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ConstantAtomicAbsorbed.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ConstantAtomicTagged.json b/test/schemas/llm.parameters/3.1/ConstantAtomicTagged.json new file mode 100644 index 0000000000..6c1b3512ca --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ConstantAtomicTagged.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ConstantAtomicUnion.json b/test/schemas/llm.parameters/3.1/ConstantAtomicUnion.json new file mode 100644 index 0000000000..e56344e27f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ConstantAtomicUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ConstantConstEnumeration.json b/test/schemas/llm.parameters/3.1/ConstantConstEnumeration.json new file mode 100644 index 0000000000..2f54301e86 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ConstantConstEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ConstantEnumeration.json b/test/schemas/llm.parameters/3.1/ConstantEnumeration.json new file mode 100644 index 0000000000..2f54301e86 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ConstantEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicArray.json b/test/schemas/llm.parameters/3.1/DynamicArray.json new file mode 100644 index 0000000000..76efb13115 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicArray.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicComposite.json b/test/schemas/llm.parameters/3.1/DynamicComposite.json new file mode 100644 index 0000000000..254e867fd1 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicComposite.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicConstant.json b/test/schemas/llm.parameters/3.1/DynamicConstant.json new file mode 100644 index 0000000000..5a37363a00 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicConstant.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicEnumeration.json b/test/schemas/llm.parameters/3.1/DynamicEnumeration.json new file mode 100644 index 0000000000..ea70ec04a2 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicEnumeration.json @@ -0,0 +1,306 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicNever.json b/test/schemas/llm.parameters/3.1/DynamicNever.json new file mode 100644 index 0000000000..b855a4cf8f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicNever.json @@ -0,0 +1,56 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicSimple.json b/test/schemas/llm.parameters/3.1/DynamicSimple.json new file mode 100644 index 0000000000..f1128f8d08 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicSimple.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicTemplate.json b/test/schemas/llm.parameters/3.1/DynamicTemplate.json new file mode 100644 index 0000000000..93ebed96a0 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicTemplate.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicTree.json b/test/schemas/llm.parameters/3.1/DynamicTree.json new file mode 100644 index 0000000000..bd0eedd745 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicTree.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/DynamicTree" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "optional": { + "$ref": "#/$defs/DynamicTree" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/DynamicTree" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicUndefined.json b/test/schemas/llm.parameters/3.1/DynamicUndefined.json new file mode 100644 index 0000000000..b855a4cf8f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicUndefined.json @@ -0,0 +1,56 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/DynamicUnion.json b/test/schemas/llm.parameters/3.1/DynamicUnion.json new file mode 100644 index 0000000000..0e059972c2 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/DynamicUnion.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectAlias.json b/test/schemas/llm.parameters/3.1/ObjectAlias.json new file mode 100644 index 0000000000..9867c714a6 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectAlias.json @@ -0,0 +1,386 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectDate.json b/test/schemas/llm.parameters/3.1/ObjectDate.json new file mode 100644 index 0000000000..9b6e9e845e --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectDate.json @@ -0,0 +1,366 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectDescription.json b/test/schemas/llm.parameters/3.1/ObjectDescription.json new file mode 100644 index 0000000000..ec8052ced8 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectDescription.json @@ -0,0 +1,241 @@ +{ + "type": "object", + "properties": { + "regular": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "optional": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "array": { + "type": "array", + "items": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectDynamic.json b/test/schemas/llm.parameters/3.1/ObjectDynamic.json new file mode 100644 index 0000000000..93ebed96a0 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectDynamic.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectGenericAlias.json b/test/schemas/llm.parameters/3.1/ObjectGenericAlias.json new file mode 100644 index 0000000000..50bd75ec59 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectGenericAlias.json @@ -0,0 +1,86 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectGenericArray.json b/test/schemas/llm.parameters/3.1/ObjectGenericArray.json new file mode 100644 index 0000000000..0ddad008fc --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectGenericArray.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectGenericUnion.json b/test/schemas/llm.parameters/3.1/ObjectGenericUnion.json new file mode 100644 index 0000000000..b0565ea251 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectGenericUnion.json @@ -0,0 +1,1751 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectInternal.json b/test/schemas/llm.parameters/3.1/ObjectInternal.json new file mode 100644 index 0000000000..77226bc39f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectInternal.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectIntersection.json b/test/schemas/llm.parameters/3.1/ObjectIntersection.json new file mode 100644 index 0000000000..60d20d58c6 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectIntersection.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectJsonTag.json b/test/schemas/llm.parameters/3.1/ObjectJsonTag.json new file mode 100644 index 0000000000..d4a58cd596 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectJsonTag.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectLiteralProperty.json b/test/schemas/llm.parameters/3.1/ObjectLiteralProperty.json new file mode 100644 index 0000000000..11033f898f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectLiteralProperty.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectLiteralType.json b/test/schemas/llm.parameters/3.1/ObjectLiteralType.json new file mode 100644 index 0000000000..995ed73c6c --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectLiteralType.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectNullable.json b/test/schemas/llm.parameters/3.1/ObjectNullable.json new file mode 100644 index 0000000000..3d1d7dc2cc --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectNullable.json @@ -0,0 +1,526 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectOptional.json b/test/schemas/llm.parameters/3.1/ObjectOptional.json new file mode 100644 index 0000000000..5bef2cb072 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectOptional.json @@ -0,0 +1,146 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectPartial.json b/test/schemas/llm.parameters/3.1/ObjectPartial.json new file mode 100644 index 0000000000..4d500de08f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectPartial.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "optional": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectPartialAndRequired.json b/test/schemas/llm.parameters/3.1/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..0b7591af71 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectPartialAndRequired.json @@ -0,0 +1,84 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectPrimitive.json b/test/schemas/llm.parameters/3.1/ObjectPrimitive.json new file mode 100644 index 0000000000..127bc9c60c --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectPrimitive.json @@ -0,0 +1,391 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectRecursive.json b/test/schemas/llm.parameters/3.1/ObjectRecursive.json new file mode 100644 index 0000000000..35143a74cc --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectRecursive.json @@ -0,0 +1,97 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectRequired.json b/test/schemas/llm.parameters/3.1/ObjectRequired.json new file mode 100644 index 0000000000..9e6ad110d3 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectRequired.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "optional": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectSimple.json b/test/schemas/llm.parameters/3.1/ObjectSimple.json new file mode 100644 index 0000000000..fd80131a95 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectSimple.json @@ -0,0 +1,466 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUndefined.json b/test/schemas/llm.parameters/3.1/ObjectUndefined.json new file mode 100644 index 0000000000..f6fc570fb6 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUndefined.json @@ -0,0 +1,266 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionComposite.json b/test/schemas/llm.parameters/3.1/ObjectUnionComposite.json new file mode 100644 index 0000000000..003cb860f1 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionComposite.json @@ -0,0 +1,1761 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionCompositePointer.json b/test/schemas/llm.parameters/3.1/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..827af7a3de --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionCompositePointer.json @@ -0,0 +1,1841 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionDouble.json b/test/schemas/llm.parameters/3.1/ObjectUnionDouble.json new file mode 100644 index 0000000000..7437489051 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionDouble.json @@ -0,0 +1,701 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionExplicit.json b/test/schemas/llm.parameters/3.1/ObjectUnionExplicit.json new file mode 100644 index 0000000000..3135c2443d --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionExplicit.json @@ -0,0 +1,1691 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionExplicitPointer.json b/test/schemas/llm.parameters/3.1/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..4e9f4178ea --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionExplicitPointer.json @@ -0,0 +1,1771 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionImplicit.json b/test/schemas/llm.parameters/3.1/ObjectUnionImplicit.json new file mode 100644 index 0000000000..6edc1a52ac --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionImplicit.json @@ -0,0 +1,3036 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ObjectUnionNonPredictable.json b/test/schemas/llm.parameters/3.1/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..898a29a8e1 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ObjectUnionNonPredictable.json @@ -0,0 +1,471 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TemplateAtomic.json b/test/schemas/llm.parameters/3.1/TemplateAtomic.json new file mode 100644 index 0000000000..bcbf0bff64 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TemplateAtomic.json @@ -0,0 +1,296 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TemplateConstant.json b/test/schemas/llm.parameters/3.1/TemplateConstant.json new file mode 100644 index 0000000000..5765a752b2 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TemplateConstant.json @@ -0,0 +1,421 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TemplateUnion.json b/test/schemas/llm.parameters/3.1/TemplateUnion.json new file mode 100644 index 0000000000..aa497d5ef2 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TemplateUnion.json @@ -0,0 +1,406 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ToJsonAtomicUnion.json b/test/schemas/llm.parameters/3.1/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..8fa8f16801 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ToJsonAtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ToJsonDouble.json b/test/schemas/llm.parameters/3.1/ToJsonDouble.json new file mode 100644 index 0000000000..96a657cf76 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ToJsonDouble.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ToJsonNull.json b/test/schemas/llm.parameters/3.1/ToJsonNull.json new file mode 100644 index 0000000000..8bc2070cb5 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ToJsonNull.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "null" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "optional": { + "type": "null" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "null" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/ToJsonUnion.json b/test/schemas/llm.parameters/3.1/ToJsonUnion.json new file mode 100644 index 0000000000..ffc640a4e1 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/ToJsonUnion.json @@ -0,0 +1,396 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagArray.json b/test/schemas/llm.parameters/3.1/TypeTagArray.json new file mode 100644 index 0000000000..60ca2ba318 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagArray.json @@ -0,0 +1,341 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagArrayUnion.json b/test/schemas/llm.parameters/3.1/TypeTagArrayUnion.json new file mode 100644 index 0000000000..d5c2712226 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagArrayUnion.json @@ -0,0 +1,301 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagAtomicUnion.json b/test/schemas/llm.parameters/3.1/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..d5b82550f4 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagAtomicUnion.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagCustom.json b/test/schemas/llm.parameters/3.1/TypeTagCustom.json new file mode 100644 index 0000000000..f572c753b6 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagCustom.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagDefault.json b/test/schemas/llm.parameters/3.1/TypeTagDefault.json new file mode 100644 index 0000000000..0564804c30 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagDefault.json @@ -0,0 +1,541 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagFormat.json b/test/schemas/llm.parameters/3.1/TypeTagFormat.json new file mode 100644 index 0000000000..60adb55916 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagFormat.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagLength.json b/test/schemas/llm.parameters/3.1/TypeTagLength.json new file mode 100644 index 0000000000..6fa7663764 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagLength.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagMatrix.json b/test/schemas/llm.parameters/3.1/TypeTagMatrix.json new file mode 100644 index 0000000000..c409be6362 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagMatrix.json @@ -0,0 +1,131 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagObjectUnion.json b/test/schemas/llm.parameters/3.1/TypeTagObjectUnion.json new file mode 100644 index 0000000000..2d784c2f1b --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagObjectUnion.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagPattern.json b/test/schemas/llm.parameters/3.1/TypeTagPattern.json new file mode 100644 index 0000000000..7843966a39 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagPattern.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagRange.json b/test/schemas/llm.parameters/3.1/TypeTagRange.json new file mode 100644 index 0000000000..555e09d002 --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagRange.json @@ -0,0 +1,346 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/3.1/TypeTagType.json b/test/schemas/llm.parameters/3.1/TypeTagType.json new file mode 100644 index 0000000000..7be5bbc41f --- /dev/null +++ b/test/schemas/llm.parameters/3.1/TypeTagType.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayAny.json b/test/schemas/llm.parameters/chatgpt/ArrayAny.json new file mode 100644 index 0000000000..b446e27158 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayAny.json @@ -0,0 +1,471 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayHierarchical.json b/test/schemas/llm.parameters/chatgpt/ArrayHierarchical.json new file mode 100644 index 0000000000..0c6cf95cf1 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayHierarchical.json @@ -0,0 +1,661 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayHierarchicalPointer.json b/test/schemas/llm.parameters/chatgpt/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..4362d24a0d --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayHierarchicalPointer.json @@ -0,0 +1,706 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayMatrix.json b/test/schemas/llm.parameters/chatgpt/ArrayMatrix.json new file mode 100644 index 0000000000..ed184915ca --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayMatrix.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayRecursive.json b/test/schemas/llm.parameters/chatgpt/ArrayRecursive.json new file mode 100644 index 0000000000..ad1b762d71 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRecursive.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "optional": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "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.parameters/chatgpt/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.parameters/chatgpt/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..1670a0d02d --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,278 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "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.parameters/chatgpt/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.parameters/chatgpt/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..f35b3db467 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,332 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "type": "string", + "enum": [ + "directory" + ] + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "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.parameters/chatgpt/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.parameters/chatgpt/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..aed549c895 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,253 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "anyOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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 + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ], + "additionalProperties": false + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayRepeatedNullable.json b/test/schemas/llm.parameters/chatgpt/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..0ffb2b5e7c --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRepeatedNullable.json @@ -0,0 +1,81 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "nullable": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "optional": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayRepeatedRequired.json b/test/schemas/llm.parameters/chatgpt/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..08fd8472dc --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRepeatedRequired.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "optional": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayRepeatedUnion.json b/test/schemas/llm.parameters/chatgpt/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..fe533f018a --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayRepeatedUnion.json @@ -0,0 +1,492 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "optional": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "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 + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArraySimple.json b/test/schemas/llm.parameters/chatgpt/ArraySimple.json new file mode 100644 index 0000000000..86fc3d86ce --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArraySimple.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ArrayUnion.json b/test/schemas/llm.parameters/chatgpt/ArrayUnion.json new file mode 100644 index 0000000000..9a06874fdf --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ArrayUnion.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/AtomicUnion.json b/test/schemas/llm.parameters/chatgpt/AtomicUnion.json new file mode 100644 index 0000000000..5ee40bca9a --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/AtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ClassGetter.json b/test/schemas/llm.parameters/chatgpt/ClassGetter.json new file mode 100644 index 0000000000..54dffc7105 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ClassGetter.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ClassMethod.json b/test/schemas/llm.parameters/chatgpt/ClassMethod.json new file mode 100644 index 0000000000..fad5cb3bf7 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ClassMethod.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ClassPropertyAssignment.json b/test/schemas/llm.parameters/chatgpt/ClassPropertyAssignment.json new file mode 100644 index 0000000000..74e370290d --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ClassPropertyAssignment.json @@ -0,0 +1,201 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagArray.json b/test/schemas/llm.parameters/chatgpt/CommentTagArray.json new file mode 100644 index 0000000000..dfee0ed8f9 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagArray.json @@ -0,0 +1,331 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagArrayUnion.json b/test/schemas/llm.parameters/chatgpt/CommentTagArrayUnion.json new file mode 100644 index 0000000000..12f3d08580 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagArrayUnion.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagAtomicUnion.json b/test/schemas/llm.parameters/chatgpt/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..b3e8817f9a --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagAtomicUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagDefault.json b/test/schemas/llm.parameters/chatgpt/CommentTagDefault.json new file mode 100644 index 0000000000..42ee13bdae --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagDefault.json @@ -0,0 +1,626 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagFormat.json b/test/schemas/llm.parameters/chatgpt/CommentTagFormat.json new file mode 100644 index 0000000000..ee9edaf36c --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagFormat.json @@ -0,0 +1,621 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagLength.json b/test/schemas/llm.parameters/chatgpt/CommentTagLength.json new file mode 100644 index 0000000000..626a90bb3f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagLength.json @@ -0,0 +1,256 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagObjectUnion.json b/test/schemas/llm.parameters/chatgpt/CommentTagObjectUnion.json new file mode 100644 index 0000000000..c4591c54d8 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagObjectUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagPattern.json b/test/schemas/llm.parameters/chatgpt/CommentTagPattern.json new file mode 100644 index 0000000000..74276951d2 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagPattern.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagRange.json b/test/schemas/llm.parameters/chatgpt/CommentTagRange.json new file mode 100644 index 0000000000..fbe469e33f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagRange.json @@ -0,0 +1,356 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/CommentTagType.json b/test/schemas/llm.parameters/chatgpt/CommentTagType.json new file mode 100644 index 0000000000..35cfc474ce --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/CommentTagType.json @@ -0,0 +1,291 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ConstantAtomicAbsorbed.json b/test/schemas/llm.parameters/chatgpt/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..6abc594f4e --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ConstantAtomicAbsorbed.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ConstantAtomicTagged.json b/test/schemas/llm.parameters/chatgpt/ConstantAtomicTagged.json new file mode 100644 index 0000000000..d15238cfc2 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ConstantAtomicTagged.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ConstantAtomicUnion.json b/test/schemas/llm.parameters/chatgpt/ConstantAtomicUnion.json new file mode 100644 index 0000000000..3f8673e576 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ConstantAtomicUnion.json @@ -0,0 +1,241 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ConstantConstEnumeration.json b/test/schemas/llm.parameters/chatgpt/ConstantConstEnumeration.json new file mode 100644 index 0000000000..9980f27ebc --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ConstantConstEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ConstantEnumeration.json b/test/schemas/llm.parameters/chatgpt/ConstantEnumeration.json new file mode 100644 index 0000000000..9980f27ebc --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ConstantEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/DynamicConstant.json b/test/schemas/llm.parameters/chatgpt/DynamicConstant.json new file mode 100644 index 0000000000..d9efe5a623 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/DynamicConstant.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/DynamicEnumeration.json b/test/schemas/llm.parameters/chatgpt/DynamicEnumeration.json new file mode 100644 index 0000000000..8dca056602 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/DynamicEnumeration.json @@ -0,0 +1,316 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/DynamicNever.json b/test/schemas/llm.parameters/chatgpt/DynamicNever.json new file mode 100644 index 0000000000..2de055804c --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/DynamicNever.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/DynamicUndefined.json b/test/schemas/llm.parameters/chatgpt/DynamicUndefined.json new file mode 100644 index 0000000000..2de055804c --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/DynamicUndefined.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectAlias.json b/test/schemas/llm.parameters/chatgpt/ObjectAlias.json new file mode 100644 index 0000000000..e45999dac7 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectAlias.json @@ -0,0 +1,401 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectDate.json b/test/schemas/llm.parameters/chatgpt/ObjectDate.json new file mode 100644 index 0000000000..1932b48758 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectDate.json @@ -0,0 +1,371 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectDescription.json b/test/schemas/llm.parameters/chatgpt/ObjectDescription.json new file mode 100644 index 0000000000..c848833416 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectDescription.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + }, + "optional": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectGenericAlias.json b/test/schemas/llm.parameters/chatgpt/ObjectGenericAlias.json new file mode 100644 index 0000000000..e68fad0459 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectGenericAlias.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectGenericArray.json b/test/schemas/llm.parameters/chatgpt/ObjectGenericArray.json new file mode 100644 index 0000000000..c936f40641 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectGenericArray.json @@ -0,0 +1,296 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectGenericUnion.json b/test/schemas/llm.parameters/chatgpt/ObjectGenericUnion.json new file mode 100644 index 0000000000..b3b20fe9f6 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectGenericUnion.json @@ -0,0 +1,1816 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectInternal.json b/test/schemas/llm.parameters/chatgpt/ObjectInternal.json new file mode 100644 index 0000000000..d224b1c06c --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectInternal.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectIntersection.json b/test/schemas/llm.parameters/chatgpt/ObjectIntersection.json new file mode 100644 index 0000000000..e10fbacf2b --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectIntersection.json @@ -0,0 +1,131 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectJsonTag.json b/test/schemas/llm.parameters/chatgpt/ObjectJsonTag.json new file mode 100644 index 0000000000..534422a826 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectJsonTag.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectLiteralProperty.json b/test/schemas/llm.parameters/chatgpt/ObjectLiteralProperty.json new file mode 100644 index 0000000000..2794aad0b9 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectLiteralProperty.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectLiteralType.json b/test/schemas/llm.parameters/chatgpt/ObjectLiteralType.json new file mode 100644 index 0000000000..e7efdf7295 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectLiteralType.json @@ -0,0 +1,131 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectNullable.json b/test/schemas/llm.parameters/chatgpt/ObjectNullable.json new file mode 100644 index 0000000000..7d2deb4fff --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectNullable.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectOptional.json b/test/schemas/llm.parameters/chatgpt/ObjectOptional.json new file mode 100644 index 0000000000..8c45df35a4 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectOptional.json @@ -0,0 +1,151 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectPartial.json b/test/schemas/llm.parameters/chatgpt/ObjectPartial.json new file mode 100644 index 0000000000..dd8e654398 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectPartial.json @@ -0,0 +1,265 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + }, + "optional": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectPartialAndRequired.json b/test/schemas/llm.parameters/chatgpt/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..4fe2c2ae6e --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectPartialAndRequired.json @@ -0,0 +1,85 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectPrimitive.json b/test/schemas/llm.parameters/chatgpt/ObjectPrimitive.json new file mode 100644 index 0000000000..dc8f32c3d7 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectPrimitive.json @@ -0,0 +1,376 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectRecursive.json b/test/schemas/llm.parameters/chatgpt/ObjectRecursive.json new file mode 100644 index 0000000000..953e3ebf36 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectRecursive.json @@ -0,0 +1,99 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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.parameters/chatgpt/ObjectRequired.json b/test/schemas/llm.parameters/chatgpt/ObjectRequired.json new file mode 100644 index 0000000000..abaebbeb4f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectRequired.json @@ -0,0 +1,265 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + }, + "optional": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectSimple.json b/test/schemas/llm.parameters/chatgpt/ObjectSimple.json new file mode 100644 index 0000000000..146e0ab8b8 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectSimple.json @@ -0,0 +1,491 @@ +{ + "type": "object", + "properties": { + "regular": { + "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 + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + }, + "optional": { + "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 + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "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 + } + ] + }, + "array": { + "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 + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUndefined.json b/test/schemas/llm.parameters/chatgpt/ObjectUndefined.json new file mode 100644 index 0000000000..7067385c46 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUndefined.json @@ -0,0 +1,276 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionComposite.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionComposite.json new file mode 100644 index 0000000000..b2c4e61da9 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionComposite.json @@ -0,0 +1,1886 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionCompositePointer.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..edcbacf5b4 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionCompositePointer.json @@ -0,0 +1,1976 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionDouble.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionDouble.json new file mode 100644 index 0000000000..47774ee955 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionDouble.json @@ -0,0 +1,761 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionExplicit.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionExplicit.json new file mode 100644 index 0000000000..0e6d53b133 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionExplicit.json @@ -0,0 +1,1906 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionExplicitPointer.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..b6e269357f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionExplicitPointer.json @@ -0,0 +1,1996 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionImplicit.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionImplicit.json new file mode 100644 index 0000000000..f83136a559 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionImplicit.json @@ -0,0 +1,3146 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ObjectUnionNonPredictable.json b/test/schemas/llm.parameters/chatgpt/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..2c34a73ece --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ObjectUnionNonPredictable.json @@ -0,0 +1,516 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TemplateAtomic.json b/test/schemas/llm.parameters/chatgpt/TemplateAtomic.json new file mode 100644 index 0000000000..ccb3789c84 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TemplateAtomic.json @@ -0,0 +1,286 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TemplateConstant.json b/test/schemas/llm.parameters/chatgpt/TemplateConstant.json new file mode 100644 index 0000000000..3fbae22bca --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TemplateConstant.json @@ -0,0 +1,296 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TemplateUnion.json b/test/schemas/llm.parameters/chatgpt/TemplateUnion.json new file mode 100644 index 0000000000..ff600641a7 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TemplateUnion.json @@ -0,0 +1,381 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ToJsonAtomicUnion.json b/test/schemas/llm.parameters/chatgpt/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..5ee40bca9a --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ToJsonAtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ToJsonDouble.json b/test/schemas/llm.parameters/chatgpt/ToJsonDouble.json new file mode 100644 index 0000000000..a4c650537e --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ToJsonDouble.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ToJsonNull.json b/test/schemas/llm.parameters/chatgpt/ToJsonNull.json new file mode 100644 index 0000000000..ba392b33a5 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ToJsonNull.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "null" + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "optional": { + "type": "null" + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "null" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/ToJsonUnion.json b/test/schemas/llm.parameters/chatgpt/ToJsonUnion.json new file mode 100644 index 0000000000..1bbfc8567f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/ToJsonUnion.json @@ -0,0 +1,411 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagArray.json b/test/schemas/llm.parameters/chatgpt/TypeTagArray.json new file mode 100644 index 0000000000..5c240fd7ba --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagArray.json @@ -0,0 +1,351 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagArrayUnion.json b/test/schemas/llm.parameters/chatgpt/TypeTagArrayUnion.json new file mode 100644 index 0000000000..8533837a85 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagArrayUnion.json @@ -0,0 +1,306 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagAtomicUnion.json b/test/schemas/llm.parameters/chatgpt/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..b3e8817f9a --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagAtomicUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagCustom.json b/test/schemas/llm.parameters/chatgpt/TypeTagCustom.json new file mode 100644 index 0000000000..168b7bdebb --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagCustom.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagDefault.json b/test/schemas/llm.parameters/chatgpt/TypeTagDefault.json new file mode 100644 index 0000000000..818ad0fe00 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagDefault.json @@ -0,0 +1,546 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagFormat.json b/test/schemas/llm.parameters/chatgpt/TypeTagFormat.json new file mode 100644 index 0000000000..ee9edaf36c --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagFormat.json @@ -0,0 +1,621 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagLength.json b/test/schemas/llm.parameters/chatgpt/TypeTagLength.json new file mode 100644 index 0000000000..626a90bb3f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagLength.json @@ -0,0 +1,256 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagMatrix.json b/test/schemas/llm.parameters/chatgpt/TypeTagMatrix.json new file mode 100644 index 0000000000..babe1e6fb9 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagMatrix.json @@ -0,0 +1,136 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagObjectUnion.json b/test/schemas/llm.parameters/chatgpt/TypeTagObjectUnion.json new file mode 100644 index 0000000000..c4591c54d8 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagObjectUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagPattern.json b/test/schemas/llm.parameters/chatgpt/TypeTagPattern.json new file mode 100644 index 0000000000..9af74027b9 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagPattern.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagRange.json b/test/schemas/llm.parameters/chatgpt/TypeTagRange.json new file mode 100644 index 0000000000..fbe469e33f --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagRange.json @@ -0,0 +1,356 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/chatgpt/TypeTagType.json b/test/schemas/llm.parameters/chatgpt/TypeTagType.json new file mode 100644 index 0000000000..be64744406 --- /dev/null +++ b/test/schemas/llm.parameters/chatgpt/TypeTagType.json @@ -0,0 +1,271 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "nullable": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + "faint": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayAny.json b/test/schemas/llm.parameters/claude/ArrayAny.json new file mode 100644 index 0000000000..f6218cd25f --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayAny.json @@ -0,0 +1,466 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayHierarchical.json b/test/schemas/llm.parameters/claude/ArrayHierarchical.json new file mode 100644 index 0000000000..545bd71aae --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayHierarchical.json @@ -0,0 +1,631 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayHierarchicalPointer.json b/test/schemas/llm.parameters/claude/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..0a05c8dc38 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayHierarchicalPointer.json @@ -0,0 +1,671 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayMatrix.json b/test/schemas/llm.parameters/claude/ArrayMatrix.json new file mode 100644 index 0000000000..10c0b1a218 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayMatrix.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRecursive.json b/test/schemas/llm.parameters/claude/ArrayRecursive.json new file mode 100644 index 0000000000..4c4ee75b86 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRecursive.json @@ -0,0 +1,89 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "optional": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.parameters/claude/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..25646a857e --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.parameters/claude/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..61d55645c7 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,294 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.parameters/claude/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..65a9ae9fb0 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,250 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRepeatedNullable.json b/test/schemas/llm.parameters/claude/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..359a3b9f5d --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRepeatedNullable.json @@ -0,0 +1,81 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "nullable": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "optional": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRepeatedRequired.json b/test/schemas/llm.parameters/claude/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..ea8e0dbc73 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRepeatedRequired.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "optional": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayRepeatedUnion.json b/test/schemas/llm.parameters/claude/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..27f9cd98bb --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayRepeatedUnion.json @@ -0,0 +1,472 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "optional": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArraySimple.json b/test/schemas/llm.parameters/claude/ArraySimple.json new file mode 100644 index 0000000000..b1b1c6c764 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArraySimple.json @@ -0,0 +1,236 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ArrayUnion.json b/test/schemas/llm.parameters/claude/ArrayUnion.json new file mode 100644 index 0000000000..7d9879b780 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ArrayUnion.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/AtomicUnion.json b/test/schemas/llm.parameters/claude/AtomicUnion.json new file mode 100644 index 0000000000..8fa8f16801 --- /dev/null +++ b/test/schemas/llm.parameters/claude/AtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ClassGetter.json b/test/schemas/llm.parameters/claude/ClassGetter.json new file mode 100644 index 0000000000..035bae3b06 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ClassGetter.json @@ -0,0 +1,161 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ClassMethod.json b/test/schemas/llm.parameters/claude/ClassMethod.json new file mode 100644 index 0000000000..fab6467691 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ClassMethod.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ClassPropertyAssignment.json b/test/schemas/llm.parameters/claude/ClassPropertyAssignment.json new file mode 100644 index 0000000000..9c4a899abd --- /dev/null +++ b/test/schemas/llm.parameters/claude/ClassPropertyAssignment.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagArray.json b/test/schemas/llm.parameters/claude/CommentTagArray.json new file mode 100644 index 0000000000..b4ed344ce5 --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagArray.json @@ -0,0 +1,336 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagArrayUnion.json b/test/schemas/llm.parameters/claude/CommentTagArrayUnion.json new file mode 100644 index 0000000000..b81d7c7661 --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagArrayUnion.json @@ -0,0 +1,286 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagAtomicUnion.json b/test/schemas/llm.parameters/claude/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..815ffb6595 --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagAtomicUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagDefault.json b/test/schemas/llm.parameters/claude/CommentTagDefault.json new file mode 100644 index 0000000000..831abbc3ad --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagDefault.json @@ -0,0 +1,631 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagFormat.json b/test/schemas/llm.parameters/claude/CommentTagFormat.json new file mode 100644 index 0000000000..08a29afb7b --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagFormat.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagLength.json b/test/schemas/llm.parameters/claude/CommentTagLength.json new file mode 100644 index 0000000000..aba9d7b88b --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagLength.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagObjectUnion.json b/test/schemas/llm.parameters/claude/CommentTagObjectUnion.json new file mode 100644 index 0000000000..b747bb8c47 --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagObjectUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagPattern.json b/test/schemas/llm.parameters/claude/CommentTagPattern.json new file mode 100644 index 0000000000..4b79c8cfb0 --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagPattern.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagRange.json b/test/schemas/llm.parameters/claude/CommentTagRange.json new file mode 100644 index 0000000000..6fa59a1bb2 --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagRange.json @@ -0,0 +1,401 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/CommentTagType.json b/test/schemas/llm.parameters/claude/CommentTagType.json new file mode 100644 index 0000000000..9488cfb86b --- /dev/null +++ b/test/schemas/llm.parameters/claude/CommentTagType.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ConstantAtomicAbsorbed.json b/test/schemas/llm.parameters/claude/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..4578a192dd --- /dev/null +++ b/test/schemas/llm.parameters/claude/ConstantAtomicAbsorbed.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ConstantAtomicTagged.json b/test/schemas/llm.parameters/claude/ConstantAtomicTagged.json new file mode 100644 index 0000000000..b947bae2d8 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ConstantAtomicTagged.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ConstantAtomicUnion.json b/test/schemas/llm.parameters/claude/ConstantAtomicUnion.json new file mode 100644 index 0000000000..e56344e27f --- /dev/null +++ b/test/schemas/llm.parameters/claude/ConstantAtomicUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ConstantConstEnumeration.json b/test/schemas/llm.parameters/claude/ConstantConstEnumeration.json new file mode 100644 index 0000000000..2f54301e86 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ConstantConstEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ConstantEnumeration.json b/test/schemas/llm.parameters/claude/ConstantEnumeration.json new file mode 100644 index 0000000000..2f54301e86 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ConstantEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicArray.json b/test/schemas/llm.parameters/claude/DynamicArray.json new file mode 100644 index 0000000000..76efb13115 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicArray.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicComposite.json b/test/schemas/llm.parameters/claude/DynamicComposite.json new file mode 100644 index 0000000000..254e867fd1 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicComposite.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicConstant.json b/test/schemas/llm.parameters/claude/DynamicConstant.json new file mode 100644 index 0000000000..5a37363a00 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicConstant.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicEnumeration.json b/test/schemas/llm.parameters/claude/DynamicEnumeration.json new file mode 100644 index 0000000000..ea70ec04a2 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicEnumeration.json @@ -0,0 +1,306 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicNever.json b/test/schemas/llm.parameters/claude/DynamicNever.json new file mode 100644 index 0000000000..b855a4cf8f --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicNever.json @@ -0,0 +1,56 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicSimple.json b/test/schemas/llm.parameters/claude/DynamicSimple.json new file mode 100644 index 0000000000..f1128f8d08 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicSimple.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicTemplate.json b/test/schemas/llm.parameters/claude/DynamicTemplate.json new file mode 100644 index 0000000000..93ebed96a0 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicTemplate.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicTree.json b/test/schemas/llm.parameters/claude/DynamicTree.json new file mode 100644 index 0000000000..bd0eedd745 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicTree.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/DynamicTree" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "optional": { + "$ref": "#/$defs/DynamicTree" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/DynamicTree" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicUndefined.json b/test/schemas/llm.parameters/claude/DynamicUndefined.json new file mode 100644 index 0000000000..b855a4cf8f --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicUndefined.json @@ -0,0 +1,56 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/DynamicUnion.json b/test/schemas/llm.parameters/claude/DynamicUnion.json new file mode 100644 index 0000000000..0e059972c2 --- /dev/null +++ b/test/schemas/llm.parameters/claude/DynamicUnion.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectAlias.json b/test/schemas/llm.parameters/claude/ObjectAlias.json new file mode 100644 index 0000000000..9867c714a6 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectAlias.json @@ -0,0 +1,386 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectDate.json b/test/schemas/llm.parameters/claude/ObjectDate.json new file mode 100644 index 0000000000..20be22a50e --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectDate.json @@ -0,0 +1,366 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectDescription.json b/test/schemas/llm.parameters/claude/ObjectDescription.json new file mode 100644 index 0000000000..52da819973 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectDescription.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "optional": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "array": { + "type": "array", + "items": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectDynamic.json b/test/schemas/llm.parameters/claude/ObjectDynamic.json new file mode 100644 index 0000000000..93ebed96a0 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectDynamic.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectGenericAlias.json b/test/schemas/llm.parameters/claude/ObjectGenericAlias.json new file mode 100644 index 0000000000..50bd75ec59 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectGenericAlias.json @@ -0,0 +1,86 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectGenericArray.json b/test/schemas/llm.parameters/claude/ObjectGenericArray.json new file mode 100644 index 0000000000..0ddad008fc --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectGenericArray.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectGenericUnion.json b/test/schemas/llm.parameters/claude/ObjectGenericUnion.json new file mode 100644 index 0000000000..b0565ea251 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectGenericUnion.json @@ -0,0 +1,1751 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectInternal.json b/test/schemas/llm.parameters/claude/ObjectInternal.json new file mode 100644 index 0000000000..77226bc39f --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectInternal.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectIntersection.json b/test/schemas/llm.parameters/claude/ObjectIntersection.json new file mode 100644 index 0000000000..60d20d58c6 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectIntersection.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectJsonTag.json b/test/schemas/llm.parameters/claude/ObjectJsonTag.json new file mode 100644 index 0000000000..d4a58cd596 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectJsonTag.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectLiteralProperty.json b/test/schemas/llm.parameters/claude/ObjectLiteralProperty.json new file mode 100644 index 0000000000..11033f898f --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectLiteralProperty.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectLiteralType.json b/test/schemas/llm.parameters/claude/ObjectLiteralType.json new file mode 100644 index 0000000000..995ed73c6c --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectLiteralType.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectNullable.json b/test/schemas/llm.parameters/claude/ObjectNullable.json new file mode 100644 index 0000000000..3d1d7dc2cc --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectNullable.json @@ -0,0 +1,526 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectOptional.json b/test/schemas/llm.parameters/claude/ObjectOptional.json new file mode 100644 index 0000000000..5bef2cb072 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectOptional.json @@ -0,0 +1,146 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectPartial.json b/test/schemas/llm.parameters/claude/ObjectPartial.json new file mode 100644 index 0000000000..4d500de08f --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectPartial.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "optional": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectPartialAndRequired.json b/test/schemas/llm.parameters/claude/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..0b7591af71 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectPartialAndRequired.json @@ -0,0 +1,84 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectPrimitive.json b/test/schemas/llm.parameters/claude/ObjectPrimitive.json new file mode 100644 index 0000000000..127bc9c60c --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectPrimitive.json @@ -0,0 +1,391 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectRecursive.json b/test/schemas/llm.parameters/claude/ObjectRecursive.json new file mode 100644 index 0000000000..35143a74cc --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectRecursive.json @@ -0,0 +1,97 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectRequired.json b/test/schemas/llm.parameters/claude/ObjectRequired.json new file mode 100644 index 0000000000..9e6ad110d3 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectRequired.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "optional": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectSimple.json b/test/schemas/llm.parameters/claude/ObjectSimple.json new file mode 100644 index 0000000000..fd80131a95 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectSimple.json @@ -0,0 +1,466 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUndefined.json b/test/schemas/llm.parameters/claude/ObjectUndefined.json new file mode 100644 index 0000000000..f6fc570fb6 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUndefined.json @@ -0,0 +1,266 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionComposite.json b/test/schemas/llm.parameters/claude/ObjectUnionComposite.json new file mode 100644 index 0000000000..003cb860f1 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionComposite.json @@ -0,0 +1,1761 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionCompositePointer.json b/test/schemas/llm.parameters/claude/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..827af7a3de --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionCompositePointer.json @@ -0,0 +1,1841 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionDouble.json b/test/schemas/llm.parameters/claude/ObjectUnionDouble.json new file mode 100644 index 0000000000..7437489051 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionDouble.json @@ -0,0 +1,701 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionExplicit.json b/test/schemas/llm.parameters/claude/ObjectUnionExplicit.json new file mode 100644 index 0000000000..3135c2443d --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionExplicit.json @@ -0,0 +1,1691 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionExplicitPointer.json b/test/schemas/llm.parameters/claude/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..4e9f4178ea --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionExplicitPointer.json @@ -0,0 +1,1771 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionImplicit.json b/test/schemas/llm.parameters/claude/ObjectUnionImplicit.json new file mode 100644 index 0000000000..6edc1a52ac --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionImplicit.json @@ -0,0 +1,3036 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ObjectUnionNonPredictable.json b/test/schemas/llm.parameters/claude/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..898a29a8e1 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ObjectUnionNonPredictable.json @@ -0,0 +1,471 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TemplateAtomic.json b/test/schemas/llm.parameters/claude/TemplateAtomic.json new file mode 100644 index 0000000000..dd5fee90df --- /dev/null +++ b/test/schemas/llm.parameters/claude/TemplateAtomic.json @@ -0,0 +1,296 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TemplateConstant.json b/test/schemas/llm.parameters/claude/TemplateConstant.json new file mode 100644 index 0000000000..5765a752b2 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TemplateConstant.json @@ -0,0 +1,421 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TemplateUnion.json b/test/schemas/llm.parameters/claude/TemplateUnion.json new file mode 100644 index 0000000000..11e31b131e --- /dev/null +++ b/test/schemas/llm.parameters/claude/TemplateUnion.json @@ -0,0 +1,406 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ToJsonAtomicUnion.json b/test/schemas/llm.parameters/claude/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..8fa8f16801 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ToJsonAtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ToJsonDouble.json b/test/schemas/llm.parameters/claude/ToJsonDouble.json new file mode 100644 index 0000000000..96a657cf76 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ToJsonDouble.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ToJsonNull.json b/test/schemas/llm.parameters/claude/ToJsonNull.json new file mode 100644 index 0000000000..8bc2070cb5 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ToJsonNull.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "null" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "optional": { + "type": "null" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "null" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/ToJsonUnion.json b/test/schemas/llm.parameters/claude/ToJsonUnion.json new file mode 100644 index 0000000000..ffc640a4e1 --- /dev/null +++ b/test/schemas/llm.parameters/claude/ToJsonUnion.json @@ -0,0 +1,396 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagArray.json b/test/schemas/llm.parameters/claude/TypeTagArray.json new file mode 100644 index 0000000000..6959d7d48f --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagArray.json @@ -0,0 +1,361 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagArrayUnion.json b/test/schemas/llm.parameters/claude/TypeTagArrayUnion.json new file mode 100644 index 0000000000..6fabeae36a --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagArrayUnion.json @@ -0,0 +1,311 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagAtomicUnion.json b/test/schemas/llm.parameters/claude/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..815ffb6595 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagAtomicUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagCustom.json b/test/schemas/llm.parameters/claude/TypeTagCustom.json new file mode 100644 index 0000000000..5e2584807b --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagCustom.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagDefault.json b/test/schemas/llm.parameters/claude/TypeTagDefault.json new file mode 100644 index 0000000000..c3aab96ab6 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagDefault.json @@ -0,0 +1,541 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagFormat.json b/test/schemas/llm.parameters/claude/TypeTagFormat.json new file mode 100644 index 0000000000..08a29afb7b --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagFormat.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagLength.json b/test/schemas/llm.parameters/claude/TypeTagLength.json new file mode 100644 index 0000000000..aba9d7b88b --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagLength.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagMatrix.json b/test/schemas/llm.parameters/claude/TypeTagMatrix.json new file mode 100644 index 0000000000..3f464ab252 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagMatrix.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagObjectUnion.json b/test/schemas/llm.parameters/claude/TypeTagObjectUnion.json new file mode 100644 index 0000000000..b747bb8c47 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagObjectUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagPattern.json b/test/schemas/llm.parameters/claude/TypeTagPattern.json new file mode 100644 index 0000000000..08ecb36f35 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagPattern.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagRange.json b/test/schemas/llm.parameters/claude/TypeTagRange.json new file mode 100644 index 0000000000..6fa59a1bb2 --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagRange.json @@ -0,0 +1,401 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/claude/TypeTagType.json b/test/schemas/llm.parameters/claude/TypeTagType.json new file mode 100644 index 0000000000..7be5bbc41f --- /dev/null +++ b/test/schemas/llm.parameters/claude/TypeTagType.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ArrayAny.json b/test/schemas/llm.parameters/gemini/ArrayAny.json new file mode 100644 index 0000000000..eb385ea776 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ArrayAny.json @@ -0,0 +1,275 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + }, + "nullable": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + }, + "faint": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ArrayHierarchical.json b/test/schemas/llm.parameters/gemini/ArrayHierarchical.json new file mode 100644 index 0000000000..8cd34aef4e --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ArrayHierarchical.json @@ -0,0 +1,615 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ArrayHierarchicalPointer.json b/test/schemas/llm.parameters/gemini/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..5b8b99dd9b --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ArrayHierarchicalPointer.json @@ -0,0 +1,655 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ArrayMatrix.json b/test/schemas/llm.parameters/gemini/ArrayMatrix.json new file mode 100644 index 0000000000..f23e0a75a1 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ArrayMatrix.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "nullable": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "faint": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ArrayRecursive.json b/test/schemas/llm.parameters/gemini/ArrayRecursive.json new file mode 100644 index 0000000000..7b36f843a6 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ArrayRecursive.json @@ -0,0 +1,805 @@ +{ + "type": "object", + "properties": { + "regular": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + }, + "nullable": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + }, + "optional": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + }, + "faint": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ArraySimple.json b/test/schemas/llm.parameters/gemini/ArraySimple.json new file mode 100644 index 0000000000..b9ea742126 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ArraySimple.json @@ -0,0 +1,220 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "nullable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "faint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + }, + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ClassGetter.json b/test/schemas/llm.parameters/gemini/ClassGetter.json new file mode 100644 index 0000000000..1754d389af --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ClassGetter.json @@ -0,0 +1,115 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ClassMethod.json b/test/schemas/llm.parameters/gemini/ClassMethod.json new file mode 100644 index 0000000000..d538a672d1 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ClassMethod.json @@ -0,0 +1,90 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "nullable": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "faint": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ClassPropertyAssignment.json b/test/schemas/llm.parameters/gemini/ClassPropertyAssignment.json new file mode 100644 index 0000000000..f843df9131 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ClassPropertyAssignment.json @@ -0,0 +1,180 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/CommentTagArray.json b/test/schemas/llm.parameters/gemini/CommentTagArray.json new file mode 100644 index 0000000000..1546f8cd36 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/CommentTagArray.json @@ -0,0 +1,320 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/CommentTagFormat.json b/test/schemas/llm.parameters/gemini/CommentTagFormat.json new file mode 100644 index 0000000000..29d821f00e --- /dev/null +++ b/test/schemas/llm.parameters/gemini/CommentTagFormat.json @@ -0,0 +1,600 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/CommentTagLength.json b/test/schemas/llm.parameters/gemini/CommentTagLength.json new file mode 100644 index 0000000000..0209a894f9 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/CommentTagLength.json @@ -0,0 +1,230 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/CommentTagPattern.json b/test/schemas/llm.parameters/gemini/CommentTagPattern.json new file mode 100644 index 0000000000..0c5a4cb314 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/CommentTagPattern.json @@ -0,0 +1,150 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/CommentTagRange.json b/test/schemas/llm.parameters/gemini/CommentTagRange.json new file mode 100644 index 0000000000..4ccf22f995 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/CommentTagRange.json @@ -0,0 +1,330 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/CommentTagType.json b/test/schemas/llm.parameters/gemini/CommentTagType.json new file mode 100644 index 0000000000..c6bbdf5ecc --- /dev/null +++ b/test/schemas/llm.parameters/gemini/CommentTagType.json @@ -0,0 +1,255 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ConstantAtomicAbsorbed.json b/test/schemas/llm.parameters/gemini/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..3cad25cb1b --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ConstantAtomicAbsorbed.json @@ -0,0 +1,100 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/DynamicConstant.json b/test/schemas/llm.parameters/gemini/DynamicConstant.json new file mode 100644 index 0000000000..9a646a7730 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/DynamicConstant.json @@ -0,0 +1,170 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/DynamicEnumeration.json b/test/schemas/llm.parameters/gemini/DynamicEnumeration.json new file mode 100644 index 0000000000..18c2d2d0f5 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/DynamicEnumeration.json @@ -0,0 +1,235 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/DynamicNever.json b/test/schemas/llm.parameters/gemini/DynamicNever.json new file mode 100644 index 0000000000..12836c708a --- /dev/null +++ b/test/schemas/llm.parameters/gemini/DynamicNever.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/DynamicUndefined.json b/test/schemas/llm.parameters/gemini/DynamicUndefined.json new file mode 100644 index 0000000000..12836c708a --- /dev/null +++ b/test/schemas/llm.parameters/gemini/DynamicUndefined.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "type": "object", + "properties": {}, + "required": [], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectDate.json b/test/schemas/llm.parameters/gemini/ObjectDate.json new file mode 100644 index 0000000000..4b5dc321af --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectDate.json @@ -0,0 +1,195 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + }, + "nullable": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + }, + "faint": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectDescription.json b/test/schemas/llm.parameters/gemini/ObjectDescription.json new file mode 100644 index 0000000000..a074220824 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectDescription.json @@ -0,0 +1,193 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectGenericAlias.json b/test/schemas/llm.parameters/gemini/ObjectGenericAlias.json new file mode 100644 index 0000000000..eebb2e6bc9 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectGenericAlias.json @@ -0,0 +1,70 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectGenericArray.json b/test/schemas/llm.parameters/gemini/ObjectGenericArray.json new file mode 100644 index 0000000000..6e43bf17ca --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectGenericArray.json @@ -0,0 +1,265 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "nullable": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "faint": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectInternal.json b/test/schemas/llm.parameters/gemini/ObjectInternal.json new file mode 100644 index 0000000000..54fdd805e7 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectInternal.json @@ -0,0 +1,90 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectIntersection.json b/test/schemas/llm.parameters/gemini/ObjectIntersection.json new file mode 100644 index 0000000000..b6708b4bb8 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectIntersection.json @@ -0,0 +1,110 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "nullable": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "faint": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectJsonTag.json b/test/schemas/llm.parameters/gemini/ObjectJsonTag.json new file mode 100644 index 0000000000..168599f653 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectJsonTag.json @@ -0,0 +1,150 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "nullable": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "faint": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectLiteralProperty.json b/test/schemas/llm.parameters/gemini/ObjectLiteralProperty.json new file mode 100644 index 0000000000..a4795d7476 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectLiteralProperty.json @@ -0,0 +1,90 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "nullable": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "faint": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectLiteralType.json b/test/schemas/llm.parameters/gemini/ObjectLiteralType.json new file mode 100644 index 0000000000..2fd47798d6 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectLiteralType.json @@ -0,0 +1,110 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectOptional.json b/test/schemas/llm.parameters/gemini/ObjectOptional.json new file mode 100644 index 0000000000..b7364db402 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectOptional.json @@ -0,0 +1,105 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectPartial.json b/test/schemas/llm.parameters/gemini/ObjectPartial.json new file mode 100644 index 0000000000..9cd82e1dd5 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectPartial.json @@ -0,0 +1,698 @@ +{ + "type": "object", + "properties": { + "regular": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + }, + "nullable": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "optional": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + }, + "faint": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectPartialAndRequired.json b/test/schemas/llm.parameters/gemini/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..e3f416ae0d --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectPartialAndRequired.json @@ -0,0 +1,525 @@ +{ + "type": "object", + "properties": { + "regular": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + }, + "nullable": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "optional": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + }, + "faint": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectPrimitive.json b/test/schemas/llm.parameters/gemini/ObjectPrimitive.json new file mode 100644 index 0000000000..2553ea3a21 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectPrimitive.json @@ -0,0 +1,350 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectRecursive.json b/test/schemas/llm.parameters/gemini/ObjectRecursive.json new file mode 100644 index 0000000000..9f5ff97908 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectRecursive.json @@ -0,0 +1,845 @@ +{ + "type": "object", + "properties": { + "regular": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + }, + "nullable": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + }, + "optional": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + }, + "faint": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectRequired.json b/test/schemas/llm.parameters/gemini/ObjectRequired.json new file mode 100644 index 0000000000..8030fe80ee --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectRequired.json @@ -0,0 +1,608 @@ +{ + "type": "object", + "properties": { + "regular": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + }, + "nullable": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + }, + "optional": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + }, + "faint": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ObjectSimple.json b/test/schemas/llm.parameters/gemini/ObjectSimple.json new file mode 100644 index 0000000000..21859c9b77 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ObjectSimple.json @@ -0,0 +1,450 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "nullable": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "faint": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TemplateAtomic.json b/test/schemas/llm.parameters/gemini/TemplateAtomic.json new file mode 100644 index 0000000000..bca1b38476 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TemplateAtomic.json @@ -0,0 +1,265 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "nullable": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "faint": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TemplateConstant.json b/test/schemas/llm.parameters/gemini/TemplateConstant.json new file mode 100644 index 0000000000..2bcfccde57 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TemplateConstant.json @@ -0,0 +1,270 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ToJsonDouble.json b/test/schemas/llm.parameters/gemini/ToJsonDouble.json new file mode 100644 index 0000000000..8a2a316b92 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ToJsonDouble.json @@ -0,0 +1,90 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/ToJsonNull.json b/test/schemas/llm.parameters/gemini/ToJsonNull.json new file mode 100644 index 0000000000..2ca0cd893e --- /dev/null +++ b/test/schemas/llm.parameters/gemini/ToJsonNull.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "null" + }, + "nullable": { + "type": "null" + }, + "optional": { + "type": "null" + }, + "faint": { + "type": "null" + }, + "array": { + "type": "array", + "items": { + "type": "null" + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagArray.json b/test/schemas/llm.parameters/gemini/TypeTagArray.json new file mode 100644 index 0000000000..d0ba0f702d --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagArray.json @@ -0,0 +1,340 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagCustom.json b/test/schemas/llm.parameters/gemini/TypeTagCustom.json new file mode 100644 index 0000000000..4e518e4afc --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagCustom.json @@ -0,0 +1,150 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "nullable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "faint": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagFormat.json b/test/schemas/llm.parameters/gemini/TypeTagFormat.json new file mode 100644 index 0000000000..29d821f00e --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagFormat.json @@ -0,0 +1,600 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagLength.json b/test/schemas/llm.parameters/gemini/TypeTagLength.json new file mode 100644 index 0000000000..0209a894f9 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagLength.json @@ -0,0 +1,230 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagMatrix.json b/test/schemas/llm.parameters/gemini/TypeTagMatrix.json new file mode 100644 index 0000000000..ce60f177a1 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagMatrix.json @@ -0,0 +1,125 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "nullable": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "faint": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagPattern.json b/test/schemas/llm.parameters/gemini/TypeTagPattern.json new file mode 100644 index 0000000000..6a245d9a99 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagPattern.json @@ -0,0 +1,150 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagRange.json b/test/schemas/llm.parameters/gemini/TypeTagRange.json new file mode 100644 index 0000000000..4ccf22f995 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagRange.json @@ -0,0 +1,330 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/gemini/TypeTagType.json b/test/schemas/llm.parameters/gemini/TypeTagType.json new file mode 100644 index 0000000000..c9682c3374 --- /dev/null +++ b/test/schemas/llm.parameters/gemini/TypeTagType.json @@ -0,0 +1,245 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayAny.json b/test/schemas/llm.parameters/llama/ArrayAny.json new file mode 100644 index 0000000000..f6218cd25f --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayAny.json @@ -0,0 +1,466 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayHierarchical.json b/test/schemas/llm.parameters/llama/ArrayHierarchical.json new file mode 100644 index 0000000000..545bd71aae --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayHierarchical.json @@ -0,0 +1,631 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayHierarchicalPointer.json b/test/schemas/llm.parameters/llama/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..0a05c8dc38 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayHierarchicalPointer.json @@ -0,0 +1,671 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayMatrix.json b/test/schemas/llm.parameters/llama/ArrayMatrix.json new file mode 100644 index 0000000000..10c0b1a218 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayMatrix.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRecursive.json b/test/schemas/llm.parameters/llama/ArrayRecursive.json new file mode 100644 index 0000000000..4c4ee75b86 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRecursive.json @@ -0,0 +1,89 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "optional": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursive.ICategory": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursive.ICategory" + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.parameters/llama/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..25646a857e --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRecursiveUnionExplicit.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionExplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicit.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.parameters/llama/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..61d55645c7 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1,294 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionExplicitPointer.IBucket": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IDirectory" + }, + { + "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": { + "const": "file" + }, + "extension": { + "const": "jpg" + } + }, + "required": [ + "id", + "name", + "path", + "width", + "height", + "url", + "size", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "txt" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content", + "type", + "extension" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "zip" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count", + "type", + "extension" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IShortcut" + } + ] + } + }, + "required": [ + "value" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + } + }, + "type": { + "const": "directory" + } + }, + "required": [ + "id", + "name", + "path", + "children", + "type" + ] + }, + "ArrayRecursiveUnionExplicitPointer.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionExplicitPointer.IBucket" + }, + "type": { + "const": "file" + }, + "extension": { + "const": "lnk" + } + }, + "required": [ + "id", + "name", + "path", + "target", + "type", + "extension" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.parameters/llama/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..65a9ae9fb0 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRecursiveUnionImplicit.json @@ -0,0 +1,250 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRecursiveUnionImplicit.IBucket": { + "oneOf": [ + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IDirectory" + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.ISharedDirectory" + }, + { + "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" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "content": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "content" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "size": { + "type": "number" + }, + "count": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "path", + "size", + "count" + ] + }, + { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IShortcut" + } + ] + }, + "ArrayRecursiveUnionImplicit.IDirectory": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.ISharedDirectory": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "const": "read" + }, + { + "const": "write" + } + ] + }, + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + } + }, + "required": [ + "access", + "id", + "name", + "path", + "children" + ] + }, + "ArrayRecursiveUnionImplicit.IShortcut": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "target": { + "$ref": "#/$defs/ArrayRecursiveUnionImplicit.IBucket" + } + }, + "required": [ + "id", + "name", + "path", + "target" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRepeatedNullable.json b/test/schemas/llm.parameters/llama/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..359a3b9f5d --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRepeatedNullable.json @@ -0,0 +1,81 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "nullable": { + "$ref": "#/$defs/ArrayRepeatedNullable" + }, + "optional": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedNullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedNullable" + } + ] + }, + "ArrayArrayRepeatedNullable": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedNullable" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRepeatedRequired.json b/test/schemas/llm.parameters/llama/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..ea8e0dbc73 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRepeatedRequired.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedRequired" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "optional": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedRequired": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedRequired" + } + ] + }, + "ArrayArrayRepeatedRequired": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedRequired" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayRepeatedUnion.json b/test/schemas/llm.parameters/llama/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..27f9cd98bb --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayRepeatedUnion.json @@ -0,0 +1,472 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ArrayRepeatedUnion" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "optional": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ArrayRepeatedUnion": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/$defs/ArrayArrayRepeatedUnion" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + ] + }, + "ArrayArrayRepeatedUnion": { + "type": "array", + "items": { + "$ref": "#/$defs/ArrayRepeatedUnion" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArraySimple.json b/test/schemas/llm.parameters/llama/ArraySimple.json new file mode 100644 index 0000000000..b1b1c6c764 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArraySimple.json @@ -0,0 +1,236 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ArrayUnion.json b/test/schemas/llm.parameters/llama/ArrayUnion.json new file mode 100644 index 0000000000..7d9879b780 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ArrayUnion.json @@ -0,0 +1,156 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/AtomicUnion.json b/test/schemas/llm.parameters/llama/AtomicUnion.json new file mode 100644 index 0000000000..8fa8f16801 --- /dev/null +++ b/test/schemas/llm.parameters/llama/AtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ClassGetter.json b/test/schemas/llm.parameters/llama/ClassGetter.json new file mode 100644 index 0000000000..035bae3b06 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ClassGetter.json @@ -0,0 +1,161 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ClassMethod.json b/test/schemas/llm.parameters/llama/ClassMethod.json new file mode 100644 index 0000000000..fab6467691 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ClassMethod.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ClassPropertyAssignment.json b/test/schemas/llm.parameters/llama/ClassPropertyAssignment.json new file mode 100644 index 0000000000..9c4a899abd --- /dev/null +++ b/test/schemas/llm.parameters/llama/ClassPropertyAssignment.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagArray.json b/test/schemas/llm.parameters/llama/CommentTagArray.json new file mode 100644 index 0000000000..b4ed344ce5 --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagArray.json @@ -0,0 +1,336 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagArrayUnion.json b/test/schemas/llm.parameters/llama/CommentTagArrayUnion.json new file mode 100644 index 0000000000..b81d7c7661 --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagArrayUnion.json @@ -0,0 +1,286 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagAtomicUnion.json b/test/schemas/llm.parameters/llama/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..815ffb6595 --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagAtomicUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagDefault.json b/test/schemas/llm.parameters/llama/CommentTagDefault.json new file mode 100644 index 0000000000..831abbc3ad --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagDefault.json @@ -0,0 +1,631 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagFormat.json b/test/schemas/llm.parameters/llama/CommentTagFormat.json new file mode 100644 index 0000000000..08a29afb7b --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagFormat.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagLength.json b/test/schemas/llm.parameters/llama/CommentTagLength.json new file mode 100644 index 0000000000..aba9d7b88b --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagLength.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagObjectUnion.json b/test/schemas/llm.parameters/llama/CommentTagObjectUnion.json new file mode 100644 index 0000000000..b747bb8c47 --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagObjectUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagPattern.json b/test/schemas/llm.parameters/llama/CommentTagPattern.json new file mode 100644 index 0000000000..4b79c8cfb0 --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagPattern.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagRange.json b/test/schemas/llm.parameters/llama/CommentTagRange.json new file mode 100644 index 0000000000..6fa59a1bb2 --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagRange.json @@ -0,0 +1,401 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/CommentTagType.json b/test/schemas/llm.parameters/llama/CommentTagType.json new file mode 100644 index 0000000000..9488cfb86b --- /dev/null +++ b/test/schemas/llm.parameters/llama/CommentTagType.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ConstantAtomicAbsorbed.json b/test/schemas/llm.parameters/llama/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..4578a192dd --- /dev/null +++ b/test/schemas/llm.parameters/llama/ConstantAtomicAbsorbed.json @@ -0,0 +1,116 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ConstantAtomicTagged.json b/test/schemas/llm.parameters/llama/ConstantAtomicTagged.json new file mode 100644 index 0000000000..b947bae2d8 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ConstantAtomicTagged.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ConstantAtomicUnion.json b/test/schemas/llm.parameters/llama/ConstantAtomicUnion.json new file mode 100644 index 0000000000..e56344e27f --- /dev/null +++ b/test/schemas/llm.parameters/llama/ConstantAtomicUnion.json @@ -0,0 +1,196 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ConstantConstEnumeration.json b/test/schemas/llm.parameters/llama/ConstantConstEnumeration.json new file mode 100644 index 0000000000..2f54301e86 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ConstantConstEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ConstantEnumeration.json b/test/schemas/llm.parameters/llama/ConstantEnumeration.json new file mode 100644 index 0000000000..2f54301e86 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ConstantEnumeration.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicArray.json b/test/schemas/llm.parameters/llama/DynamicArray.json new file mode 100644 index 0000000000..76efb13115 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicArray.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicComposite.json b/test/schemas/llm.parameters/llama/DynamicComposite.json new file mode 100644 index 0000000000..254e867fd1 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicComposite.json @@ -0,0 +1,171 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicConstant.json b/test/schemas/llm.parameters/llama/DynamicConstant.json new file mode 100644 index 0000000000..5a37363a00 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicConstant.json @@ -0,0 +1,186 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicEnumeration.json b/test/schemas/llm.parameters/llama/DynamicEnumeration.json new file mode 100644 index 0000000000..ea70ec04a2 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicEnumeration.json @@ -0,0 +1,306 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicNever.json b/test/schemas/llm.parameters/llama/DynamicNever.json new file mode 100644 index 0000000000..b855a4cf8f --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicNever.json @@ -0,0 +1,56 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicSimple.json b/test/schemas/llm.parameters/llama/DynamicSimple.json new file mode 100644 index 0000000000..f1128f8d08 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicSimple.json @@ -0,0 +1,111 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicTemplate.json b/test/schemas/llm.parameters/llama/DynamicTemplate.json new file mode 100644 index 0000000000..93ebed96a0 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicTemplate.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicTree.json b/test/schemas/llm.parameters/llama/DynamicTree.json new file mode 100644 index 0000000000..bd0eedd745 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicTree.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/DynamicTree" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "optional": { + "$ref": "#/$defs/DynamicTree" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/DynamicTree" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/DynamicTree" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "DynamicTree": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "$ref": "#/$defs/RecordstringDynamicTree" + } + }, + "required": [ + "id", + "sequence", + "children" + ] + }, + "RecordstringDynamicTree": { + "description": "Construct a type with a set of properties K of type T", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "$ref": "#/$defs/DynamicTree" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicUndefined.json b/test/schemas/llm.parameters/llama/DynamicUndefined.json new file mode 100644 index 0000000000..b855a4cf8f --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicUndefined.json @@ -0,0 +1,56 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/DynamicUnion.json b/test/schemas/llm.parameters/llama/DynamicUnion.json new file mode 100644 index 0000000000..0e059972c2 --- /dev/null +++ b/test/schemas/llm.parameters/llama/DynamicUnion.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectAlias.json b/test/schemas/llm.parameters/llama/ObjectAlias.json new file mode 100644 index 0000000000..9867c714a6 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectAlias.json @@ -0,0 +1,386 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectDate.json b/test/schemas/llm.parameters/llama/ObjectDate.json new file mode 100644 index 0000000000..20be22a50e --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectDate.json @@ -0,0 +1,366 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectDescription.json b/test/schemas/llm.parameters/llama/ObjectDescription.json new file mode 100644 index 0000000000..52da819973 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectDescription.json @@ -0,0 +1,246 @@ +{ + "type": "object", + "properties": { + "regular": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "optional": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description." + } + ] + }, + "array": { + "type": "array", + "items": { + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectDynamic.json b/test/schemas/llm.parameters/llama/ObjectDynamic.json new file mode 100644 index 0000000000..93ebed96a0 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectDynamic.json @@ -0,0 +1,121 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectGenericAlias.json b/test/schemas/llm.parameters/llama/ObjectGenericAlias.json new file mode 100644 index 0000000000..50bd75ec59 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectGenericAlias.json @@ -0,0 +1,86 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectGenericArray.json b/test/schemas/llm.parameters/llama/ObjectGenericArray.json new file mode 100644 index 0000000000..0ddad008fc --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectGenericArray.json @@ -0,0 +1,281 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectGenericUnion.json b/test/schemas/llm.parameters/llama/ObjectGenericUnion.json new file mode 100644 index 0000000000..b0565ea251 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectGenericUnion.json @@ -0,0 +1,1751 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectInternal.json b/test/schemas/llm.parameters/llama/ObjectInternal.json new file mode 100644 index 0000000000..77226bc39f --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectInternal.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectIntersection.json b/test/schemas/llm.parameters/llama/ObjectIntersection.json new file mode 100644 index 0000000000..60d20d58c6 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectIntersection.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectJsonTag.json b/test/schemas/llm.parameters/llama/ObjectJsonTag.json new file mode 100644 index 0000000000..d4a58cd596 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectJsonTag.json @@ -0,0 +1,181 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectLiteralProperty.json b/test/schemas/llm.parameters/llama/ObjectLiteralProperty.json new file mode 100644 index 0000000000..11033f898f --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectLiteralProperty.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectLiteralType.json b/test/schemas/llm.parameters/llama/ObjectLiteralType.json new file mode 100644 index 0000000000..995ed73c6c --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectLiteralType.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectNullable.json b/test/schemas/llm.parameters/llama/ObjectNullable.json new file mode 100644 index 0000000000..3d1d7dc2cc --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectNullable.json @@ -0,0 +1,526 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectOptional.json b/test/schemas/llm.parameters/llama/ObjectOptional.json new file mode 100644 index 0000000000..5bef2cb072 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectOptional.json @@ -0,0 +1,146 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectPartial.json b/test/schemas/llm.parameters/llama/ObjectPartial.json new file mode 100644 index 0000000000..4d500de08f --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectPartial.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "optional": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartial.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartial.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectPartialAndRequired.json b/test/schemas/llm.parameters/llama/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..0b7591af71 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectPartialAndRequired.json @@ -0,0 +1,84 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectPartialAndRequired" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectPartialAndRequired": { + "type": "object", + "properties": { + "string": { + "type": "string" + }, + "number": { + "type": "number" + }, + "boolean": { + "type": "boolean" + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectPartialAndRequired" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "string", + "number", + "boolean", + "object", + "array" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectPrimitive.json b/test/schemas/llm.parameters/llama/ObjectPrimitive.json new file mode 100644 index 0000000000..127bc9c60c --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectPrimitive.json @@ -0,0 +1,391 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectRecursive.json b/test/schemas/llm.parameters/llama/ObjectRecursive.json new file mode 100644 index 0000000000..35143a74cc --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectRecursive.json @@ -0,0 +1,97 @@ +{ + "type": "object", + "properties": { + "regular": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "optional": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "array": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRecursive.IDepartment": { + "type": "object", + "properties": { + "parent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRecursive.IDepartment" + } + ] + }, + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectRequired.json b/test/schemas/llm.parameters/llama/ObjectRequired.json new file mode 100644 index 0000000000..9e6ad110d3 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectRequired.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "properties": { + "regular": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "optional": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" + } + ] + }, + "array": { + "type": "array", + "items": { + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required", + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": { + "ObjectRequired.IBase": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number" + }, + "string": { + "type": "string" + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + }, + "object": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/ObjectRequired.IBase" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ] + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectSimple.json b/test/schemas/llm.parameters/llama/ObjectSimple.json new file mode 100644 index 0000000000..fd80131a95 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectSimple.json @@ -0,0 +1,466 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUndefined.json b/test/schemas/llm.parameters/llama/ObjectUndefined.json new file mode 100644 index 0000000000..f6fc570fb6 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUndefined.json @@ -0,0 +1,266 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionComposite.json b/test/schemas/llm.parameters/llama/ObjectUnionComposite.json new file mode 100644 index 0000000000..003cb860f1 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionComposite.json @@ -0,0 +1,1761 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionCompositePointer.json b/test/schemas/llm.parameters/llama/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..827af7a3de --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionCompositePointer.json @@ -0,0 +1,1841 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionDouble.json b/test/schemas/llm.parameters/llama/ObjectUnionDouble.json new file mode 100644 index 0000000000..7437489051 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionDouble.json @@ -0,0 +1,701 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionExplicit.json b/test/schemas/llm.parameters/llama/ObjectUnionExplicit.json new file mode 100644 index 0000000000..3135c2443d --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionExplicit.json @@ -0,0 +1,1691 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionExplicitPointer.json b/test/schemas/llm.parameters/llama/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..4e9f4178ea --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionExplicitPointer.json @@ -0,0 +1,1771 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionImplicit.json b/test/schemas/llm.parameters/llama/ObjectUnionImplicit.json new file mode 100644 index 0000000000..6edc1a52ac --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionImplicit.json @@ -0,0 +1,3036 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ObjectUnionNonPredictable.json b/test/schemas/llm.parameters/llama/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..898a29a8e1 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ObjectUnionNonPredictable.json @@ -0,0 +1,471 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TemplateAtomic.json b/test/schemas/llm.parameters/llama/TemplateAtomic.json new file mode 100644 index 0000000000..dd5fee90df --- /dev/null +++ b/test/schemas/llm.parameters/llama/TemplateAtomic.json @@ -0,0 +1,296 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TemplateConstant.json b/test/schemas/llm.parameters/llama/TemplateConstant.json new file mode 100644 index 0000000000..5765a752b2 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TemplateConstant.json @@ -0,0 +1,421 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TemplateUnion.json b/test/schemas/llm.parameters/llama/TemplateUnion.json new file mode 100644 index 0000000000..11e31b131e --- /dev/null +++ b/test/schemas/llm.parameters/llama/TemplateUnion.json @@ -0,0 +1,406 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ToJsonAtomicUnion.json b/test/schemas/llm.parameters/llama/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..8fa8f16801 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ToJsonAtomicUnion.json @@ -0,0 +1,126 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ToJsonDouble.json b/test/schemas/llm.parameters/llama/ToJsonDouble.json new file mode 100644 index 0000000000..96a657cf76 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ToJsonDouble.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ToJsonNull.json b/test/schemas/llm.parameters/llama/ToJsonNull.json new file mode 100644 index 0000000000..8bc2070cb5 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ToJsonNull.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "null" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "optional": { + "type": "null" + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "null" + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "null" + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/ToJsonUnion.json b/test/schemas/llm.parameters/llama/ToJsonUnion.json new file mode 100644 index 0000000000..ffc640a4e1 --- /dev/null +++ b/test/schemas/llm.parameters/llama/ToJsonUnion.json @@ -0,0 +1,396 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagArray.json b/test/schemas/llm.parameters/llama/TypeTagArray.json new file mode 100644 index 0000000000..6959d7d48f --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagArray.json @@ -0,0 +1,361 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagArrayUnion.json b/test/schemas/llm.parameters/llama/TypeTagArrayUnion.json new file mode 100644 index 0000000000..6fabeae36a --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagArrayUnion.json @@ -0,0 +1,311 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagAtomicUnion.json b/test/schemas/llm.parameters/llama/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..815ffb6595 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagAtomicUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagCustom.json b/test/schemas/llm.parameters/llama/TypeTagCustom.json new file mode 100644 index 0000000000..5e2584807b --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagCustom.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagDefault.json b/test/schemas/llm.parameters/llama/TypeTagDefault.json new file mode 100644 index 0000000000..c3aab96ab6 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagDefault.json @@ -0,0 +1,541 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagFormat.json b/test/schemas/llm.parameters/llama/TypeTagFormat.json new file mode 100644 index 0000000000..08a29afb7b --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagFormat.json @@ -0,0 +1,616 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagLength.json b/test/schemas/llm.parameters/llama/TypeTagLength.json new file mode 100644 index 0000000000..aba9d7b88b --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagLength.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagMatrix.json b/test/schemas/llm.parameters/llama/TypeTagMatrix.json new file mode 100644 index 0000000000..3f464ab252 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagMatrix.json @@ -0,0 +1,141 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagObjectUnion.json b/test/schemas/llm.parameters/llama/TypeTagObjectUnion.json new file mode 100644 index 0000000000..b747bb8c47 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagObjectUnion.json @@ -0,0 +1,191 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "optional": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagPattern.json b/test/schemas/llm.parameters/llama/TypeTagPattern.json new file mode 100644 index 0000000000..08ecb36f35 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagPattern.json @@ -0,0 +1,166 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagRange.json b/test/schemas/llm.parameters/llama/TypeTagRange.json new file mode 100644 index 0000000000..6fa59a1bb2 --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagRange.json @@ -0,0 +1,401 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm.parameters/llama/TypeTagType.json b/test/schemas/llm.parameters/llama/TypeTagType.json new file mode 100644 index 0000000000..7be5bbc41f --- /dev/null +++ b/test/schemas/llm.parameters/llama/TypeTagType.json @@ -0,0 +1,261 @@ +{ + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "optional": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + }, + "faint": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + ] + }, + "array": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "regular", + "nullable", + "optional", + "faint", + "array" + ], + "additionalProperties": false, + "$defs": {} +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayAny.json b/test/schemas/llm.schema/3.0/ArrayAny.json similarity index 100% rename from test/schemas/llm/type/ArrayAny.json rename to test/schemas/llm.schema/3.0/ArrayAny.json diff --git a/test/schemas/llm/type/ArrayHierarchical.json b/test/schemas/llm.schema/3.0/ArrayHierarchical.json similarity index 100% rename from test/schemas/llm/type/ArrayHierarchical.json rename to test/schemas/llm.schema/3.0/ArrayHierarchical.json diff --git a/test/schemas/llm/type/ArrayHierarchicalPointer.json b/test/schemas/llm.schema/3.0/ArrayHierarchicalPointer.json similarity index 100% rename from test/schemas/llm/type/ArrayHierarchicalPointer.json rename to test/schemas/llm.schema/3.0/ArrayHierarchicalPointer.json diff --git a/test/schemas/llm/type/ArrayMatrix.json b/test/schemas/llm.schema/3.0/ArrayMatrix.json similarity index 100% rename from test/schemas/llm/type/ArrayMatrix.json rename to test/schemas/llm.schema/3.0/ArrayMatrix.json diff --git a/test/schemas/llm/type/ArrayRecursive.json b/test/schemas/llm.schema/3.0/ArrayRecursive.json similarity index 100% rename from test/schemas/llm/type/ArrayRecursive.json rename to test/schemas/llm.schema/3.0/ArrayRecursive.json diff --git a/test/schemas/llm/type/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.schema/3.0/ArrayRecursiveUnionExplicit.json similarity index 100% rename from test/schemas/llm/type/ArrayRecursiveUnionExplicit.json rename to test/schemas/llm.schema/3.0/ArrayRecursiveUnionExplicit.json diff --git a/test/schemas/llm/type/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.schema/3.0/ArrayRecursiveUnionExplicitPointer.json similarity index 100% rename from test/schemas/llm/type/ArrayRecursiveUnionExplicitPointer.json rename to test/schemas/llm.schema/3.0/ArrayRecursiveUnionExplicitPointer.json diff --git a/test/schemas/llm/type/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.schema/3.0/ArrayRecursiveUnionImplicit.json similarity index 100% rename from test/schemas/llm/type/ArrayRecursiveUnionImplicit.json rename to test/schemas/llm.schema/3.0/ArrayRecursiveUnionImplicit.json diff --git a/test/schemas/llm/type/ArrayRepeatedNullable.json b/test/schemas/llm.schema/3.0/ArrayRepeatedNullable.json similarity index 100% rename from test/schemas/llm/type/ArrayRepeatedNullable.json rename to test/schemas/llm.schema/3.0/ArrayRepeatedNullable.json diff --git a/test/schemas/llm/type/ArrayRepeatedRequired.json b/test/schemas/llm.schema/3.0/ArrayRepeatedRequired.json similarity index 100% rename from test/schemas/llm/type/ArrayRepeatedRequired.json rename to test/schemas/llm.schema/3.0/ArrayRepeatedRequired.json diff --git a/test/schemas/llm/type/ArrayRepeatedUnion.json b/test/schemas/llm.schema/3.0/ArrayRepeatedUnion.json similarity index 100% rename from test/schemas/llm/type/ArrayRepeatedUnion.json rename to test/schemas/llm.schema/3.0/ArrayRepeatedUnion.json diff --git a/test/schemas/llm/type/ArraySimple.json b/test/schemas/llm.schema/3.0/ArraySimple.json similarity index 100% rename from test/schemas/llm/type/ArraySimple.json rename to test/schemas/llm.schema/3.0/ArraySimple.json diff --git a/test/schemas/llm.schema/3.0/ArrayUnion.json b/test/schemas/llm.schema/3.0/ArrayUnion.json new file mode 100644 index 0000000000..8b132d9c46 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ArrayUnion.json @@ -0,0 +1,25 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm/type/AtomicUnion.json b/test/schemas/llm.schema/3.0/AtomicUnion.json similarity index 100% rename from test/schemas/llm/type/AtomicUnion.json rename to test/schemas/llm.schema/3.0/AtomicUnion.json diff --git a/test/schemas/llm/type/ClassGetter.json b/test/schemas/llm.schema/3.0/ClassGetter.json similarity index 100% rename from test/schemas/llm/type/ClassGetter.json rename to test/schemas/llm.schema/3.0/ClassGetter.json diff --git a/test/schemas/llm/type/ClassMethod.json b/test/schemas/llm.schema/3.0/ClassMethod.json similarity index 100% rename from test/schemas/llm/type/ClassMethod.json rename to test/schemas/llm.schema/3.0/ClassMethod.json diff --git a/test/schemas/llm/type/ClassPropertyAssignment.json b/test/schemas/llm.schema/3.0/ClassPropertyAssignment.json similarity index 100% rename from test/schemas/llm/type/ClassPropertyAssignment.json rename to test/schemas/llm.schema/3.0/ClassPropertyAssignment.json diff --git a/test/schemas/llm/type/CommentTagArray.json b/test/schemas/llm.schema/3.0/CommentTagArray.json similarity index 100% rename from test/schemas/llm/type/CommentTagArray.json rename to test/schemas/llm.schema/3.0/CommentTagArray.json diff --git a/test/schemas/llm/type/CommentTagArrayUnion.json b/test/schemas/llm.schema/3.0/CommentTagArrayUnion.json similarity index 100% rename from test/schemas/llm/type/CommentTagArrayUnion.json rename to test/schemas/llm.schema/3.0/CommentTagArrayUnion.json diff --git a/test/schemas/llm.schema/3.0/CommentTagAtomicUnion.json b/test/schemas/llm.schema/3.0/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..bcd2339f64 --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/CommentTagDefault.json b/test/schemas/llm.schema/3.0/CommentTagDefault.json new file mode 100644 index 0000000000..276050aabb --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagDefault.json @@ -0,0 +1,109 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean", + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value." + }, + "number": { + "type": "number", + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value." + }, + "string": { + "type": "string", + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value." + }, + "text": { + "type": "string", + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters." + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "type": "number", + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5" + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/CommentTagFormat.json b/test/schemas/llm.schema/3.0/CommentTagFormat.json new file mode 100644 index 0000000000..719a81cd8d --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagFormat.json @@ -0,0 +1,118 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/CommentTagLength.json b/test/schemas/llm.schema/3.0/CommentTagLength.json new file mode 100644 index 0000000000..048f961d79 --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagLength.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/CommentTagObjectUnion.json b/test/schemas/llm.schema/3.0/CommentTagObjectUnion.json new file mode 100644 index 0000000000..4fbc4a2af7 --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagObjectUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/CommentTagPattern.json b/test/schemas/llm.schema/3.0/CommentTagPattern.json new file mode 100644 index 0000000000..fc58abea78 --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagPattern.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/CommentTagRange.json b/test/schemas/llm.schema/3.0/CommentTagRange.json new file mode 100644 index 0000000000..0731556940 --- /dev/null +++ b/test/schemas/llm.schema/3.0/CommentTagRange.json @@ -0,0 +1,65 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagType.json b/test/schemas/llm.schema/3.0/CommentTagType.json similarity index 100% rename from test/schemas/llm/type/CommentTagType.json rename to test/schemas/llm.schema/3.0/CommentTagType.json diff --git a/test/schemas/llm.schema/3.0/ConstantAtomicAbsorbed.json b/test/schemas/llm.schema/3.0/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..a2bcdd9035 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ConstantAtomicAbsorbed.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/ConstantAtomicTagged.json b/test/schemas/llm.schema/3.0/ConstantAtomicTagged.json new file mode 100644 index 0000000000..78126785f6 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ConstantAtomicTagged.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "latest" + ], + "description": "@format uuid" + }, + "age": { + "oneOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ConstantAtomicUnion.json b/test/schemas/llm.schema/3.0/ConstantAtomicUnion.json similarity index 100% rename from test/schemas/llm/type/ConstantAtomicUnion.json rename to test/schemas/llm.schema/3.0/ConstantAtomicUnion.json diff --git a/test/schemas/llm/type/ConstantConstEnumeration.json b/test/schemas/llm.schema/3.0/ConstantConstEnumeration.json similarity index 100% rename from test/schemas/llm/type/ConstantConstEnumeration.json rename to test/schemas/llm.schema/3.0/ConstantConstEnumeration.json diff --git a/test/schemas/llm/type/ConstantEnumeration.json b/test/schemas/llm.schema/3.0/ConstantEnumeration.json similarity index 100% rename from test/schemas/llm/type/ConstantEnumeration.json rename to test/schemas/llm.schema/3.0/ConstantEnumeration.json diff --git a/test/schemas/llm.schema/3.0/DynamicArray.json b/test/schemas/llm.schema/3.0/DynamicArray.json new file mode 100644 index 0000000000..8bab97d33d --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicArray.json @@ -0,0 +1,20 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicComposite.json b/test/schemas/llm.schema/3.0/DynamicComposite.json similarity index 100% rename from test/schemas/llm/type/DynamicComposite.json rename to test/schemas/llm.schema/3.0/DynamicComposite.json diff --git a/test/schemas/llm/type/DynamicConstant.json b/test/schemas/llm.schema/3.0/DynamicConstant.json similarity index 100% rename from test/schemas/llm/type/DynamicConstant.json rename to test/schemas/llm.schema/3.0/DynamicConstant.json diff --git a/test/schemas/llm.schema/3.0/DynamicEnumeration.json b/test/schemas/llm.schema/3.0/DynamicEnumeration.json new file mode 100644 index 0000000000..d5d812da0f --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicEnumeration.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/DynamicNever.json b/test/schemas/llm.schema/3.0/DynamicNever.json new file mode 100644 index 0000000000..811aba4a9b --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicNever.json @@ -0,0 +1,6 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/DynamicSimple.json b/test/schemas/llm.schema/3.0/DynamicSimple.json new file mode 100644 index 0000000000..86e3f6b285 --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicSimple.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/DynamicTemplate.json b/test/schemas/llm.schema/3.0/DynamicTemplate.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicTemplate.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/DynamicTree.json b/test/schemas/llm.schema/3.0/DynamicTree.json new file mode 100644 index 0000000000..b0e6c594cc --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicTree.json @@ -0,0 +1,93 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "children": { + "type": "object", + "properties": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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": {}, + "required": [], + "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.schema/3.0/DynamicUndefined.json b/test/schemas/llm.schema/3.0/DynamicUndefined.json new file mode 100644 index 0000000000..811aba4a9b --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicUndefined.json @@ -0,0 +1,6 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/DynamicUnion.json b/test/schemas/llm.schema/3.0/DynamicUnion.json new file mode 100644 index 0000000000..fa10bb7562 --- /dev/null +++ b/test/schemas/llm.schema/3.0/DynamicUnion.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectAlias.json b/test/schemas/llm.schema/3.0/ObjectAlias.json similarity index 100% rename from test/schemas/llm/type/ObjectAlias.json rename to test/schemas/llm.schema/3.0/ObjectAlias.json diff --git a/test/schemas/llm.schema/3.0/ObjectDate.json b/test/schemas/llm.schema/3.0/ObjectDate.json new file mode 100644 index 0000000000..061e28c086 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ObjectDate.json @@ -0,0 +1,37 @@ +{ + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/ObjectDescription.json b/test/schemas/llm.schema/3.0/ObjectDescription.json new file mode 100644 index 0000000000..189cba9269 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ObjectDescription.json @@ -0,0 +1,42 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "title": "This is the title", + "description": "Title tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/ObjectDynamic.json b/test/schemas/llm.schema/3.0/ObjectDynamic.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/3.0/ObjectDynamic.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectGenericAlias.json b/test/schemas/llm.schema/3.0/ObjectGenericAlias.json similarity index 100% rename from test/schemas/llm/type/ObjectGenericAlias.json rename to test/schemas/llm.schema/3.0/ObjectGenericAlias.json diff --git a/test/schemas/llm/type/ObjectGenericArray.json b/test/schemas/llm.schema/3.0/ObjectGenericArray.json similarity index 100% rename from test/schemas/llm/type/ObjectGenericArray.json rename to test/schemas/llm.schema/3.0/ObjectGenericArray.json diff --git a/test/schemas/llm/type/ObjectGenericUnion.json b/test/schemas/llm.schema/3.0/ObjectGenericUnion.json similarity index 100% rename from test/schemas/llm/type/ObjectGenericUnion.json rename to test/schemas/llm.schema/3.0/ObjectGenericUnion.json diff --git a/test/schemas/llm/type/ObjectInternal.json b/test/schemas/llm.schema/3.0/ObjectInternal.json similarity index 100% rename from test/schemas/llm/type/ObjectInternal.json rename to test/schemas/llm.schema/3.0/ObjectInternal.json diff --git a/test/schemas/llm/type/ObjectIntersection.json b/test/schemas/llm.schema/3.0/ObjectIntersection.json similarity index 100% rename from test/schemas/llm/type/ObjectIntersection.json rename to test/schemas/llm.schema/3.0/ObjectIntersection.json diff --git a/test/schemas/llm/type/ObjectJsonTag.json b/test/schemas/llm.schema/3.0/ObjectJsonTag.json similarity index 100% rename from test/schemas/llm/type/ObjectJsonTag.json rename to test/schemas/llm.schema/3.0/ObjectJsonTag.json diff --git a/test/schemas/llm/type/ObjectLiteralProperty.json b/test/schemas/llm.schema/3.0/ObjectLiteralProperty.json similarity index 100% rename from test/schemas/llm/type/ObjectLiteralProperty.json rename to test/schemas/llm.schema/3.0/ObjectLiteralProperty.json diff --git a/test/schemas/llm/type/ObjectLiteralType.json b/test/schemas/llm.schema/3.0/ObjectLiteralType.json similarity index 100% rename from test/schemas/llm/type/ObjectLiteralType.json rename to test/schemas/llm.schema/3.0/ObjectLiteralType.json diff --git a/test/schemas/llm/type/ObjectNullable.json b/test/schemas/llm.schema/3.0/ObjectNullable.json similarity index 100% rename from test/schemas/llm/type/ObjectNullable.json rename to test/schemas/llm.schema/3.0/ObjectNullable.json diff --git a/test/schemas/llm.schema/3.0/ObjectOptional.json b/test/schemas/llm.schema/3.0/ObjectOptional.json new file mode 100644 index 0000000000..9a3404ece0 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ObjectOptional.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/ObjectPartial.json b/test/schemas/llm.schema/3.0/ObjectPartial.json new file mode 100644 index 0000000000..b1ea619a73 --- /dev/null +++ b/test/schemas/llm.schema/3.0/ObjectPartial.json @@ -0,0 +1,142 @@ +{ + "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 + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> 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.schema/3.0/ObjectPartialAndRequired.json similarity index 100% rename from test/schemas/llm/type/ObjectPartialAndRequired.json rename to test/schemas/llm.schema/3.0/ObjectPartialAndRequired.json diff --git a/test/schemas/llm/type/ObjectPrimitive.json b/test/schemas/llm.schema/3.0/ObjectPrimitive.json similarity index 100% rename from test/schemas/llm/type/ObjectPrimitive.json rename to test/schemas/llm.schema/3.0/ObjectPrimitive.json diff --git a/test/schemas/llm/type/ObjectRecursive.json b/test/schemas/llm.schema/3.0/ObjectRecursive.json similarity index 100% rename from test/schemas/llm/type/ObjectRecursive.json rename to test/schemas/llm.schema/3.0/ObjectRecursive.json diff --git a/test/schemas/llm.schema/3.0/ObjectRequired.json b/test/schemas/llm.schema/3.0/ObjectRequired.json new file mode 100644 index 0000000000..6b258ff35e --- /dev/null +++ b/test/schemas/llm.schema/3.0/ObjectRequired.json @@ -0,0 +1,124 @@ +{ + "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": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [], + "additionalProperties": false, + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> 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.schema/3.0/ObjectSimple.json similarity index 100% rename from test/schemas/llm/type/ObjectSimple.json rename to test/schemas/llm.schema/3.0/ObjectSimple.json diff --git a/test/schemas/llm/type/ObjectUndefined.json b/test/schemas/llm.schema/3.0/ObjectUndefined.json similarity index 100% rename from test/schemas/llm/type/ObjectUndefined.json rename to test/schemas/llm.schema/3.0/ObjectUndefined.json diff --git a/test/schemas/llm/type/ObjectUnionComposite.json b/test/schemas/llm.schema/3.0/ObjectUnionComposite.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionComposite.json rename to test/schemas/llm.schema/3.0/ObjectUnionComposite.json diff --git a/test/schemas/llm/type/ObjectUnionCompositePointer.json b/test/schemas/llm.schema/3.0/ObjectUnionCompositePointer.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionCompositePointer.json rename to test/schemas/llm.schema/3.0/ObjectUnionCompositePointer.json diff --git a/test/schemas/llm/type/ObjectUnionDouble.json b/test/schemas/llm.schema/3.0/ObjectUnionDouble.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionDouble.json rename to test/schemas/llm.schema/3.0/ObjectUnionDouble.json diff --git a/test/schemas/llm/type/ObjectUnionExplicit.json b/test/schemas/llm.schema/3.0/ObjectUnionExplicit.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionExplicit.json rename to test/schemas/llm.schema/3.0/ObjectUnionExplicit.json diff --git a/test/schemas/llm/type/ObjectUnionExplicitPointer.json b/test/schemas/llm.schema/3.0/ObjectUnionExplicitPointer.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionExplicitPointer.json rename to test/schemas/llm.schema/3.0/ObjectUnionExplicitPointer.json diff --git a/test/schemas/llm/type/ObjectUnionImplicit.json b/test/schemas/llm.schema/3.0/ObjectUnionImplicit.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionImplicit.json rename to test/schemas/llm.schema/3.0/ObjectUnionImplicit.json diff --git a/test/schemas/llm/type/ObjectUnionNonPredictable.json b/test/schemas/llm.schema/3.0/ObjectUnionNonPredictable.json similarity index 100% rename from test/schemas/llm/type/ObjectUnionNonPredictable.json rename to test/schemas/llm.schema/3.0/ObjectUnionNonPredictable.json diff --git a/test/schemas/llm.schema/3.0/TemplateAtomic.json b/test/schemas/llm.schema/3.0/TemplateAtomic.json new file mode 100644 index 0000000000..78776186f8 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TemplateAtomic.json @@ -0,0 +1,51 @@ +{ + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/TemplateConstant.json b/test/schemas/llm.schema/3.0/TemplateConstant.json similarity index 100% rename from test/schemas/llm/type/TemplateConstant.json rename to test/schemas/llm.schema/3.0/TemplateConstant.json diff --git a/test/schemas/llm.schema/3.0/TemplateUnion.json b/test/schemas/llm.schema/3.0/TemplateUnion.json new file mode 100644 index 0000000000..8846f096b7 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TemplateUnion.json @@ -0,0 +1,70 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "enum": [ + "the_A_value", + "the_B_value" + ], + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/ToJsonAtomicUnion.json b/test/schemas/llm.schema/3.0/ToJsonAtomicUnion.json similarity index 100% rename from test/schemas/llm/type/ToJsonAtomicUnion.json rename to test/schemas/llm.schema/3.0/ToJsonAtomicUnion.json diff --git a/test/schemas/llm/type/ToJsonDouble.json b/test/schemas/llm.schema/3.0/ToJsonDouble.json similarity index 100% rename from test/schemas/llm/type/ToJsonDouble.json rename to test/schemas/llm.schema/3.0/ToJsonDouble.json diff --git a/test/schemas/llm/type/ToJsonNull.json b/test/schemas/llm.schema/3.0/ToJsonNull.json similarity index 100% rename from test/schemas/llm/type/ToJsonNull.json rename to test/schemas/llm.schema/3.0/ToJsonNull.json diff --git a/test/schemas/llm/type/ToJsonUnion.json b/test/schemas/llm.schema/3.0/ToJsonUnion.json similarity index 100% rename from test/schemas/llm/type/ToJsonUnion.json rename to test/schemas/llm.schema/3.0/ToJsonUnion.json diff --git a/test/schemas/llm.schema/3.0/TypeTagArray.json b/test/schemas/llm.schema/3.0/TypeTagArray.json new file mode 100644 index 0000000000..920e6be0cc --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagArray.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagArrayUnion.json b/test/schemas/llm.schema/3.0/TypeTagArrayUnion.json new file mode 100644 index 0000000000..9743855d22 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagArrayUnion.json @@ -0,0 +1,57 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagAtomicUnion.json b/test/schemas/llm.schema/3.0/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..bcd2339f64 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagCustom.json b/test/schemas/llm.schema/3.0/TypeTagCustom.json new file mode 100644 index 0000000000..be155bc1ba --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagCustom.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagDefault.json b/test/schemas/llm.schema/3.0/TypeTagDefault.json new file mode 100644 index 0000000000..f270782139 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagDefault.json @@ -0,0 +1,103 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "description": "@default 1" + }, + "string": { + "type": "string", + "description": "@default two" + }, + "text": { + "type": "string", + "description": "@default Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagFormat.json b/test/schemas/llm.schema/3.0/TypeTagFormat.json new file mode 100644 index 0000000000..719a81cd8d --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagFormat.json @@ -0,0 +1,118 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagLength.json b/test/schemas/llm.schema/3.0/TypeTagLength.json new file mode 100644 index 0000000000..048f961d79 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagLength.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagMatrix.json b/test/schemas/llm.schema/3.0/TypeTagMatrix.json new file mode 100644 index 0000000000..279d765e9d --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagMatrix.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagObjectUnion.json b/test/schemas/llm.schema/3.0/TypeTagObjectUnion.json new file mode 100644 index 0000000000..4fbc4a2af7 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagObjectUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "@minimum 3" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagPattern.json b/test/schemas/llm.schema/3.0/TypeTagPattern.json new file mode 100644 index 0000000000..7718afdf10 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagPattern.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.0/TypeTagRange.json b/test/schemas/llm.schema/3.0/TypeTagRange.json new file mode 100644 index 0000000000..0731556940 --- /dev/null +++ b/test/schemas/llm.schema/3.0/TypeTagRange.json @@ -0,0 +1,65 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagType.json b/test/schemas/llm.schema/3.0/TypeTagType.json similarity index 100% rename from test/schemas/llm/type/TypeTagType.json rename to test/schemas/llm.schema/3.0/TypeTagType.json diff --git a/test/schemas/llm.schema/3.1/ArrayAny.json b/test/schemas/llm.schema/3.1/ArrayAny.json new file mode 100644 index 0000000000..ab2ac01bf9 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayAny.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayHierarchical.json b/test/schemas/llm.schema/3.1/ArrayHierarchical.json new file mode 100644 index 0000000000..f160010dd9 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayHierarchical.json @@ -0,0 +1,120 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayHierarchicalPointer.json b/test/schemas/llm.schema/3.1/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..c08fac851b --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayHierarchicalPointer.json @@ -0,0 +1,128 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayMatrix.json b/test/schemas/llm.schema/3.1/ArrayMatrix.json new file mode 100644 index 0000000000..b71a8043df --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayMatrix.json @@ -0,0 +1,12 @@ +{ + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRecursive.json b/test/schemas/llm.schema/3.1/ArrayRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.schema/3.1/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRecursiveUnionExplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.schema/3.1/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.schema/3.1/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRecursiveUnionImplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRepeatedNullable.json b/test/schemas/llm.schema/3.1/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRepeatedNullable.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRepeatedRequired.json b/test/schemas/llm.schema/3.1/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRepeatedRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayRepeatedUnion.json b/test/schemas/llm.schema/3.1/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayRepeatedUnion.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArraySimple.json b/test/schemas/llm.schema/3.1/ArraySimple.json new file mode 100644 index 0000000000..442ef4ec78 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArraySimple.json @@ -0,0 +1,41 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ArrayUnion.json b/test/schemas/llm.schema/3.1/ArrayUnion.json new file mode 100644 index 0000000000..8b132d9c46 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ArrayUnion.json @@ -0,0 +1,25 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/AtomicUnion.json b/test/schemas/llm.schema/3.1/AtomicUnion.json new file mode 100644 index 0000000000..a5ed788285 --- /dev/null +++ b/test/schemas/llm.schema/3.1/AtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ClassGetter.json b/test/schemas/llm.schema/3.1/ClassGetter.json new file mode 100644 index 0000000000..2e100c350a --- /dev/null +++ b/test/schemas/llm.schema/3.1/ClassGetter.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ClassMethod.json b/test/schemas/llm.schema/3.1/ClassMethod.json new file mode 100644 index 0000000000..97f1e16a0e --- /dev/null +++ b/test/schemas/llm.schema/3.1/ClassMethod.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ClassPropertyAssignment.json b/test/schemas/llm.schema/3.1/ClassPropertyAssignment.json new file mode 100644 index 0000000000..a080dafc7d --- /dev/null +++ b/test/schemas/llm.schema/3.1/ClassPropertyAssignment.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagArray.json b/test/schemas/llm.schema/3.1/CommentTagArray.json new file mode 100644 index 0000000000..e401a8fb3e --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagArray.json @@ -0,0 +1,58 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagArrayUnion.json b/test/schemas/llm.schema/3.1/CommentTagArrayUnion.json new file mode 100644 index 0000000000..b5a2e16f5e --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagArrayUnion.json @@ -0,0 +1,49 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagAtomicUnion.json b/test/schemas/llm.schema/3.1/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..75a5502ce9 --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagAtomicUnion.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagDefault.json b/test/schemas/llm.schema/3.1/CommentTagDefault.json new file mode 100644 index 0000000000..89f7455ad0 --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagDefault.json @@ -0,0 +1,118 @@ +{ + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagFormat.json b/test/schemas/llm.schema/3.1/CommentTagFormat.json new file mode 100644 index 0000000000..875e10b47b --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagLength.json b/test/schemas/llm.schema/3.1/CommentTagLength.json new file mode 100644 index 0000000000..87e6d7161c --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagLength.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagObjectUnion.json b/test/schemas/llm.schema/3.1/CommentTagObjectUnion.json new file mode 100644 index 0000000000..fab8bc3c33 --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagObjectUnion.json @@ -0,0 +1,31 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagPattern.json b/test/schemas/llm.schema/3.1/CommentTagPattern.json new file mode 100644 index 0000000000..9ca149e0c0 --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagRange.json b/test/schemas/llm.schema/3.1/CommentTagRange.json new file mode 100644 index 0000000000..f0e228d30e --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagRange.json @@ -0,0 +1,63 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/CommentTagType.json b/test/schemas/llm.schema/3.1/CommentTagType.json new file mode 100644 index 0000000000..afa02a0ba0 --- /dev/null +++ b/test/schemas/llm.schema/3.1/CommentTagType.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ConstantAtomicAbsorbed.json b/test/schemas/llm.schema/3.1/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..9755afb7c7 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ConstantAtomicAbsorbed.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ConstantAtomicTagged.json b/test/schemas/llm.schema/3.1/ConstantAtomicTagged.json new file mode 100644 index 0000000000..45b727ab27 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ConstantAtomicTagged.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "description": "@format uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "description": "@maximum 100" + } + ] + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ConstantAtomicUnion.json b/test/schemas/llm.schema/3.1/ConstantAtomicUnion.json new file mode 100644 index 0000000000..7501e84eca --- /dev/null +++ b/test/schemas/llm.schema/3.1/ConstantAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ConstantConstEnumeration.json b/test/schemas/llm.schema/3.1/ConstantConstEnumeration.json new file mode 100644 index 0000000000..1fa9ddcd96 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ConstantConstEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ConstantEnumeration.json b/test/schemas/llm.schema/3.1/ConstantEnumeration.json new file mode 100644 index 0000000000..1fa9ddcd96 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ConstantEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicArray.json b/test/schemas/llm.schema/3.1/DynamicArray.json new file mode 100644 index 0000000000..f76fd117e5 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicArray.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicComposite.json b/test/schemas/llm.schema/3.1/DynamicComposite.json new file mode 100644 index 0000000000..2bd79fa6b3 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicComposite.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicConstant.json b/test/schemas/llm.schema/3.1/DynamicConstant.json new file mode 100644 index 0000000000..1595a33697 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicConstant.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicEnumeration.json b/test/schemas/llm.schema/3.1/DynamicEnumeration.json new file mode 100644 index 0000000000..27eb8a9b61 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicEnumeration.json @@ -0,0 +1,55 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicNever.json b/test/schemas/llm.schema/3.1/DynamicNever.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicNever.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicSimple.json b/test/schemas/llm.schema/3.1/DynamicSimple.json new file mode 100644 index 0000000000..3ecfaa3493 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicSimple.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicTemplate.json b/test/schemas/llm.schema/3.1/DynamicTemplate.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicTemplate.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicTree.json b/test/schemas/llm.schema/3.1/DynamicTree.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicTree.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicUndefined.json b/test/schemas/llm.schema/3.1/DynamicUndefined.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicUndefined.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/DynamicUnion.json b/test/schemas/llm.schema/3.1/DynamicUnion.json new file mode 100644 index 0000000000..fa10bb7562 --- /dev/null +++ b/test/schemas/llm.schema/3.1/DynamicUnion.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectAlias.json b/test/schemas/llm.schema/3.1/ObjectAlias.json new file mode 100644 index 0000000000..03964d1ac9 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectAlias.json @@ -0,0 +1,71 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectDate.json b/test/schemas/llm.schema/3.1/ObjectDate.json new file mode 100644 index 0000000000..b1ff9ea820 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectDate.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectDescription.json b/test/schemas/llm.schema/3.1/ObjectDescription.json new file mode 100644 index 0000000000..77a6b1dd53 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectDescription.json @@ -0,0 +1,42 @@ +{ + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectDynamic.json b/test/schemas/llm.schema/3.1/ObjectDynamic.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectDynamic.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectGenericAlias.json b/test/schemas/llm.schema/3.1/ObjectGenericAlias.json new file mode 100644 index 0000000000..18d298ead1 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectGenericAlias.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectGenericArray.json b/test/schemas/llm.schema/3.1/ObjectGenericArray.json new file mode 100644 index 0000000000..f6c6a35aa5 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectGenericArray.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectGenericUnion.json b/test/schemas/llm.schema/3.1/ObjectGenericUnion.json new file mode 100644 index 0000000000..01b157c1e6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectGenericUnion.json @@ -0,0 +1,344 @@ +{ + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectInternal.json b/test/schemas/llm.schema/3.1/ObjectInternal.json new file mode 100644 index 0000000000..7dc4990cb7 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectInternal.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectIntersection.json b/test/schemas/llm.schema/3.1/ObjectIntersection.json new file mode 100644 index 0000000000..d70f237e86 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectIntersection.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectJsonTag.json b/test/schemas/llm.schema/3.1/ObjectJsonTag.json new file mode 100644 index 0000000000..b245ce4314 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectJsonTag.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectLiteralProperty.json b/test/schemas/llm.schema/3.1/ObjectLiteralProperty.json new file mode 100644 index 0000000000..3b3771043d --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectLiteralProperty.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectLiteralType.json b/test/schemas/llm.schema/3.1/ObjectLiteralType.json new file mode 100644 index 0000000000..1a21bd5c4a --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectLiteralType.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectNullable.json b/test/schemas/llm.schema/3.1/ObjectNullable.json new file mode 100644 index 0000000000..d1c234353c --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectNullable.json @@ -0,0 +1,99 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectOptional.json b/test/schemas/llm.schema/3.1/ObjectOptional.json new file mode 100644 index 0000000000..ad68b72c24 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectOptional.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectPartial.json b/test/schemas/llm.schema/3.1/ObjectPartial.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectPartial.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectPartialAndRequired.json b/test/schemas/llm.schema/3.1/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectPartialAndRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectPrimitive.json b/test/schemas/llm.schema/3.1/ObjectPrimitive.json new file mode 100644 index 0000000000..a3a2c982e4 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectPrimitive.json @@ -0,0 +1,72 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectRecursive.json b/test/schemas/llm.schema/3.1/ObjectRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectRequired.json b/test/schemas/llm.schema/3.1/ObjectRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectSimple.json b/test/schemas/llm.schema/3.1/ObjectSimple.json new file mode 100644 index 0000000000..67548a8ed8 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectSimple.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUndefined.json b/test/schemas/llm.schema/3.1/ObjectUndefined.json new file mode 100644 index 0000000000..c7c6460e04 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUndefined.json @@ -0,0 +1,47 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionComposite.json b/test/schemas/llm.schema/3.1/ObjectUnionComposite.json new file mode 100644 index 0000000000..0a9b9c1dba --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionComposite.json @@ -0,0 +1,346 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionCompositePointer.json b/test/schemas/llm.schema/3.1/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..7b2c95593f --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionCompositePointer.json @@ -0,0 +1,362 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionDouble.json b/test/schemas/llm.schema/3.1/ObjectUnionDouble.json new file mode 100644 index 0000000000..d1bdb109e4 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionDouble.json @@ -0,0 +1,134 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionExplicit.json b/test/schemas/llm.schema/3.1/ObjectUnionExplicit.json new file mode 100644 index 0000000000..ff2b506ef9 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionExplicit.json @@ -0,0 +1,332 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionExplicitPointer.json b/test/schemas/llm.schema/3.1/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..12dc3b6c29 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionExplicitPointer.json @@ -0,0 +1,348 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionImplicit.json b/test/schemas/llm.schema/3.1/ObjectUnionImplicit.json new file mode 100644 index 0000000000..7a11552c16 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionImplicit.json @@ -0,0 +1,601 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ObjectUnionNonPredictable.json b/test/schemas/llm.schema/3.1/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..fa6b443d37 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ObjectUnionNonPredictable.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TemplateAtomic.json b/test/schemas/llm.schema/3.1/TemplateAtomic.json new file mode 100644 index 0000000000..3c4c7d2f5f --- /dev/null +++ b/test/schemas/llm.schema/3.1/TemplateAtomic.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TemplateConstant.json b/test/schemas/llm.schema/3.1/TemplateConstant.json new file mode 100644 index 0000000000..8b4b7ec391 --- /dev/null +++ b/test/schemas/llm.schema/3.1/TemplateConstant.json @@ -0,0 +1,78 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TemplateUnion.json b/test/schemas/llm.schema/3.1/TemplateUnion.json new file mode 100644 index 0000000000..bfe1d86f8c --- /dev/null +++ b/test/schemas/llm.schema/3.1/TemplateUnion.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ToJsonAtomicUnion.json b/test/schemas/llm.schema/3.1/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..a5ed788285 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ToJsonAtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ToJsonDouble.json b/test/schemas/llm.schema/3.1/ToJsonDouble.json new file mode 100644 index 0000000000..da3e14052b --- /dev/null +++ b/test/schemas/llm.schema/3.1/ToJsonDouble.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ToJsonNull.json b/test/schemas/llm.schema/3.1/ToJsonNull.json new file mode 100644 index 0000000000..743b3af495 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ToJsonNull.json @@ -0,0 +1,3 @@ +{ + "type": "null" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/ToJsonUnion.json b/test/schemas/llm.schema/3.1/ToJsonUnion.json new file mode 100644 index 0000000000..4a9c36ece2 --- /dev/null +++ b/test/schemas/llm.schema/3.1/ToJsonUnion.json @@ -0,0 +1,73 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagArray.json b/test/schemas/llm.schema/3.1/TypeTagArray.json new file mode 100644 index 0000000000..93c805ab09 --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagArray.json @@ -0,0 +1,62 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagArrayUnion.json b/test/schemas/llm.schema/3.1/TypeTagArrayUnion.json new file mode 100644 index 0000000000..ba4209bcc5 --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagArrayUnion.json @@ -0,0 +1,54 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagAtomicUnion.json b/test/schemas/llm.schema/3.1/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..75a5502ce9 --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagAtomicUnion.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagCustom.json b/test/schemas/llm.schema/3.1/TypeTagCustom.json new file mode 100644 index 0000000000..51b952cc9d --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagCustom.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagDefault.json b/test/schemas/llm.schema/3.1/TypeTagDefault.json new file mode 100644 index 0000000000..7b4aa000a8 --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagDefault.json @@ -0,0 +1,102 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagFormat.json b/test/schemas/llm.schema/3.1/TypeTagFormat.json new file mode 100644 index 0000000000..875e10b47b --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagLength.json b/test/schemas/llm.schema/3.1/TypeTagLength.json new file mode 100644 index 0000000000..87e6d7161c --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagLength.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagMatrix.json b/test/schemas/llm.schema/3.1/TypeTagMatrix.json new file mode 100644 index 0000000000..49f227de0e --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagMatrix.json @@ -0,0 +1,20 @@ +{ + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagObjectUnion.json b/test/schemas/llm.schema/3.1/TypeTagObjectUnion.json new file mode 100644 index 0000000000..fab8bc3c33 --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagObjectUnion.json @@ -0,0 +1,31 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagPattern.json b/test/schemas/llm.schema/3.1/TypeTagPattern.json new file mode 100644 index 0000000000..90d601480a --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagRange.json b/test/schemas/llm.schema/3.1/TypeTagRange.json new file mode 100644 index 0000000000..f0e228d30e --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagRange.json @@ -0,0 +1,63 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/3.1/TypeTagType.json b/test/schemas/llm.schema/3.1/TypeTagType.json new file mode 100644 index 0000000000..e5bccc37bb --- /dev/null +++ b/test/schemas/llm.schema/3.1/TypeTagType.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayAny.json b/test/schemas/llm.schema/chatgpt/ArrayAny.json new file mode 100644 index 0000000000..d7db47c0a9 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayAny.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayHierarchical.json b/test/schemas/llm.schema/chatgpt/ArrayHierarchical.json new file mode 100644 index 0000000000..f7fc8f9fb0 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayHierarchical.json @@ -0,0 +1,126 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayHierarchicalPointer.json b/test/schemas/llm.schema/chatgpt/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..751bf3fbf3 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayHierarchicalPointer.json @@ -0,0 +1,135 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayMatrix.json b/test/schemas/llm.schema/chatgpt/ArrayMatrix.json new file mode 100644 index 0000000000..b71a8043df --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayMatrix.json @@ -0,0 +1,12 @@ +{ + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRecursive.json b/test/schemas/llm.schema/chatgpt/ArrayRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionExplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRecursiveUnionImplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRepeatedNullable.json b/test/schemas/llm.schema/chatgpt/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRepeatedNullable.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRepeatedRequired.json b/test/schemas/llm.schema/chatgpt/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRepeatedRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayRepeatedUnion.json b/test/schemas/llm.schema/chatgpt/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayRepeatedUnion.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArraySimple.json b/test/schemas/llm.schema/chatgpt/ArraySimple.json new file mode 100644 index 0000000000..336f2a1009 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArraySimple.json @@ -0,0 +1,43 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ], + "additionalProperties": false + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ArrayUnion.json b/test/schemas/llm.schema/chatgpt/ArrayUnion.json new file mode 100644 index 0000000000..0abf2c43e0 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ArrayUnion.json @@ -0,0 +1,25 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/AtomicUnion.json b/test/schemas/llm.schema/chatgpt/AtomicUnion.json new file mode 100644 index 0000000000..aeee926dcc --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/AtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ClassGetter.json b/test/schemas/llm.schema/chatgpt/ClassGetter.json new file mode 100644 index 0000000000..760b6801e4 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ClassGetter.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ClassMethod.json b/test/schemas/llm.schema/chatgpt/ClassMethod.json new file mode 100644 index 0000000000..a7d695f7f4 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ClassMethod.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ClassPropertyAssignment.json b/test/schemas/llm.schema/chatgpt/ClassPropertyAssignment.json new file mode 100644 index 0000000000..79dd00dd80 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ClassPropertyAssignment.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagArray.json b/test/schemas/llm.schema/chatgpt/CommentTagArray.json new file mode 100644 index 0000000000..60bf42a904 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagArray.json @@ -0,0 +1,60 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagArrayUnion.json b/test/schemas/llm.schema/chatgpt/CommentTagArrayUnion.json new file mode 100644 index 0000000000..05c2733352 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagArrayUnion.json @@ -0,0 +1,50 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagAtomicUnion.json b/test/schemas/llm.schema/chatgpt/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..029aa00b5a --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagDefault.json b/test/schemas/llm.schema/chatgpt/CommentTagDefault.json new file mode 100644 index 0000000000..7399ef292a --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagDefault.json @@ -0,0 +1,119 @@ +{ + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.\n\n\n@minimum 3\n@maximum 5", + "type": "number" + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagFormat.json b/test/schemas/llm.schema/chatgpt/CommentTagFormat.json new file mode 100644 index 0000000000..3f2924005b --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagFormat.json @@ -0,0 +1,118 @@ +{ + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagLength.json b/test/schemas/llm.schema/chatgpt/CommentTagLength.json new file mode 100644 index 0000000000..0e4d254b05 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagLength.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagObjectUnion.json b/test/schemas/llm.schema/chatgpt/CommentTagObjectUnion.json new file mode 100644 index 0000000000..4e1b1423a1 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagObjectUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagPattern.json b/test/schemas/llm.schema/chatgpt/CommentTagPattern.json new file mode 100644 index 0000000000..063607b08c --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagPattern.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "uuid": { + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagRange.json b/test/schemas/llm.schema/chatgpt/CommentTagRange.json new file mode 100644 index 0000000000..9d3a2711fc --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagRange.json @@ -0,0 +1,65 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/CommentTagType.json b/test/schemas/llm.schema/chatgpt/CommentTagType.json new file mode 100644 index 0000000000..0d258fae85 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/CommentTagType.json @@ -0,0 +1,52 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ConstantAtomicAbsorbed.json b/test/schemas/llm.schema/chatgpt/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..49aaa92b98 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ConstantAtomicAbsorbed.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": { + "id": { + "description": "@default something", + "type": "string" + }, + "age": { + "description": "@default 20", + "type": "number" + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ConstantAtomicTagged.json b/test/schemas/llm.schema/chatgpt/ConstantAtomicTagged.json new file mode 100644 index 0000000000..5f8e35fa55 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ConstantAtomicTagged.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string", + "enum": [ + "latest" + ] + }, + "age": { + "anyOf": [ + { + "type": "integer", + "description": "@maximum 100" + }, + { + "type": "number", + "enum": [ + -1 + ] + } + ] + } + }, + "required": [ + "id", + "age" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ConstantAtomicUnion.json b/test/schemas/llm.schema/chatgpt/ConstantAtomicUnion.json new file mode 100644 index 0000000000..3472ad8265 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ConstantAtomicUnion.json @@ -0,0 +1,42 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "key" + ] + } + }, + "required": [ + "key" + ], + "additionalProperties": false + }, + { + "type": "boolean", + "enum": [ + false + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "three", + "four" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ConstantConstEnumeration.json b/test/schemas/llm.schema/chatgpt/ConstantConstEnumeration.json new file mode 100644 index 0000000000..d09a752b12 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ConstantConstEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ConstantEnumeration.json b/test/schemas/llm.schema/chatgpt/ConstantEnumeration.json new file mode 100644 index 0000000000..d09a752b12 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ConstantEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "Three", + "Four" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/DynamicConstant.json b/test/schemas/llm.schema/chatgpt/DynamicConstant.json new file mode 100644 index 0000000000..dce929abac --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/DynamicConstant.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/DynamicEnumeration.json b/test/schemas/llm.schema/chatgpt/DynamicEnumeration.json new file mode 100644 index 0000000000..c02d946f00 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/DynamicEnumeration.json @@ -0,0 +1,57 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/DynamicNever.json b/test/schemas/llm.schema/chatgpt/DynamicNever.json new file mode 100644 index 0000000000..811aba4a9b --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/DynamicNever.json @@ -0,0 +1,6 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/DynamicUndefined.json b/test/schemas/llm.schema/chatgpt/DynamicUndefined.json new file mode 100644 index 0000000000..811aba4a9b --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/DynamicUndefined.json @@ -0,0 +1,6 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectAlias.json b/test/schemas/llm.schema/chatgpt/ObjectAlias.json new file mode 100644 index 0000000000..bab5f09560 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectAlias.json @@ -0,0 +1,74 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + { + "type": "string", + "enum": [ + "male", + "female" + ] + } + ] + }, + "age": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectDate.json b/test/schemas/llm.schema/chatgpt/ObjectDate.json new file mode 100644 index 0000000000..dc1f86ac5f --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectDate.json @@ -0,0 +1,68 @@ +{ + "type": "object", + "properties": { + "classDate": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "date": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date" + } + ] + }, + "datetime": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format date-time" + } + ] + }, + "time": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format time" + } + ] + }, + "duration": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "description": "@format duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectDescription.json b/test/schemas/llm.schema/chatgpt/ObjectDescription.json new file mode 100644 index 0000000000..b13f5d4d91 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectDescription.json @@ -0,0 +1,43 @@ +{ + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.\n\n\n@format uuid", + "type": "string" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectGenericAlias.json b/test/schemas/llm.schema/chatgpt/ObjectGenericAlias.json new file mode 100644 index 0000000000..2d8299f1ed --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectGenericAlias.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectGenericArray.json b/test/schemas/llm.schema/chatgpt/ObjectGenericArray.json new file mode 100644 index 0000000000..6697631b9d --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectGenericArray.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ], + "additionalProperties": false + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ], + "additionalProperties": false + } + } + }, + "required": [ + "pagination", + "data" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectGenericUnion.json b/test/schemas/llm.schema/chatgpt/ObjectGenericUnion.json new file mode 100644 index 0000000000..61c1ff5d70 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectGenericUnion.json @@ -0,0 +1,357 @@ +{ + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ], + "additionalProperties": false + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ], + "additionalProperties": false + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectInternal.json b/test/schemas/llm.schema/chatgpt/ObjectInternal.json new file mode 100644 index 0000000000..309fcac1ef --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectInternal.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectIntersection.json b/test/schemas/llm.schema/chatgpt/ObjectIntersection.json new file mode 100644 index 0000000000..b45b8ea364 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectIntersection.json @@ -0,0 +1,20 @@ +{ + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectJsonTag.json b/test/schemas/llm.schema/chatgpt/ObjectJsonTag.json new file mode 100644 index 0000000000..11c30a4716 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectJsonTag.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectLiteralProperty.json b/test/schemas/llm.schema/chatgpt/ObjectLiteralProperty.json new file mode 100644 index 0000000000..7fbbd90150 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectLiteralProperty.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectLiteralType.json b/test/schemas/llm.schema/chatgpt/ObjectLiteralType.json new file mode 100644 index 0000000000..4cc6ebbfde --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectLiteralType.json @@ -0,0 +1,20 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectNullable.json b/test/schemas/llm.schema/chatgpt/ObjectNullable.json new file mode 100644 index 0000000000..68a50e4d63 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectNullable.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "brand": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + }, + "similar": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "brand" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "manufacturer" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectOptional.json b/test/schemas/llm.schema/chatgpt/ObjectOptional.json new file mode 100644 index 0000000000..80ba12f320 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectOptional.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectPartial.json b/test/schemas/llm.schema/chatgpt/ObjectPartial.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectPartial.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectPartialAndRequired.json b/test/schemas/llm.schema/chatgpt/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectPartialAndRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectPrimitive.json b/test/schemas/llm.schema/chatgpt/ObjectPrimitive.json new file mode 100644 index 0000000000..3e8ddfed05 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectPrimitive.json @@ -0,0 +1,69 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ], + "additionalProperties": false + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectRecursive.json b/test/schemas/llm.schema/chatgpt/ObjectRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectRequired.json b/test/schemas/llm.schema/chatgpt/ObjectRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectSimple.json b/test/schemas/llm.schema/chatgpt/ObjectSimple.json new file mode 100644 index 0000000000..b179cbf925 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectSimple.json @@ -0,0 +1,92 @@ +{ + "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.schema/chatgpt/ObjectUndefined.json b/test/schemas/llm.schema/chatgpt/ObjectUndefined.json new file mode 100644 index 0000000000..67ef6bbd58 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUndefined.json @@ -0,0 +1,49 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionComposite.json b/test/schemas/llm.schema/chatgpt/ObjectUnionComposite.json new file mode 100644 index 0000000000..8def112f98 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionComposite.json @@ -0,0 +1,371 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionCompositePointer.json b/test/schemas/llm.schema/chatgpt/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..61a90652d5 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionCompositePointer.json @@ -0,0 +1,389 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + } + }, + "required": [ + "outer", + "inner" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionDouble.json b/test/schemas/llm.schema/chatgpt/ObjectUnionDouble.json new file mode 100644 index 0000000000..09d9839416 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionDouble.json @@ -0,0 +1,146 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ], + "additionalProperties": false + }, + "child": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value", + "child" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionExplicit.json b/test/schemas/llm.schema/chatgpt/ObjectUnionExplicit.json new file mode 100644 index 0000000000..e250ca4f2e --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionExplicit.json @@ -0,0 +1,375 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionExplicitPointer.json b/test/schemas/llm.schema/chatgpt/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..086df4aa38 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionExplicitPointer.json @@ -0,0 +1,393 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "point" + ] + } + }, + "required": [ + "x", + "y", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "line" + ] + } + }, + "required": [ + "p1", + "p2", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "triangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "type": { + "type": "string", + "enum": [ + "rectangle" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polyline" + ] + } + }, + "required": [ + "points", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + } + } + }, + "required": [ + "points" + ], + "additionalProperties": false + } + }, + "type": { + "type": "string", + "enum": [ + "polygon" + ] + } + }, + "required": [ + "outer", + "inner", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "additionalProperties": false + }, + "radius": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "circle" + ] + } + }, + "required": [ + "centroid", + "radius", + "type" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionImplicit.json b/test/schemas/llm.schema/chatgpt/ObjectUnionImplicit.json new file mode 100644 index 0000000000..fe26e3c09f --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionImplicit.json @@ -0,0 +1,623 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "width": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + } + }, + "length": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ], + "additionalProperties": false + } + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ], + "additionalProperties": false + }, + "area": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ObjectUnionNonPredictable.json b/test/schemas/llm.schema/chatgpt/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..f51ecca932 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ObjectUnionNonPredictable.json @@ -0,0 +1,97 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TemplateAtomic.json b/test/schemas/llm.schema/chatgpt/TemplateAtomic.json new file mode 100644 index 0000000000..5d0157198d --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TemplateAtomic.json @@ -0,0 +1,51 @@ +{ + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^(prefix_(.*))", + "type": "string" + }, + "postfix": { + "description": "@pattern ((.*)_postfix)$", + "type": "string" + }, + "middle_string": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_string_empty": { + "description": "@pattern ^(the_(.*)_value)$", + "type": "string" + }, + "middle_numeric": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$", + "type": "string" + }, + "email": { + "description": "@pattern ((.*)@(.*)\\.(.*))", + "type": "string" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TemplateConstant.json b/test/schemas/llm.schema/chatgpt/TemplateConstant.json new file mode 100644 index 0000000000..ee1d4625eb --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TemplateConstant.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TemplateUnion.json b/test/schemas/llm.schema/chatgpt/TemplateUnion.json new file mode 100644 index 0000000000..588eb89202 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TemplateUnion.json @@ -0,0 +1,70 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "description": "@pattern ^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$", + "type": "string" + }, + "postfix": { + "description": "@pattern (((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$", + "type": "string" + }, + "middle": { + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "mixed": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$", + "enum": [ + "the_A_value", + "the_B_value" + ] + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ToJsonAtomicUnion.json b/test/schemas/llm.schema/chatgpt/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..aeee926dcc --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ToJsonAtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ToJsonDouble.json b/test/schemas/llm.schema/chatgpt/ToJsonDouble.json new file mode 100644 index 0000000000..4ab2083b3f --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ToJsonDouble.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ToJsonNull.json b/test/schemas/llm.schema/chatgpt/ToJsonNull.json new file mode 100644 index 0000000000..743b3af495 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ToJsonNull.json @@ -0,0 +1,3 @@ +{ + "type": "null" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/ToJsonUnion.json b/test/schemas/llm.schema/chatgpt/ToJsonUnion.json new file mode 100644 index 0000000000..aba5de74c6 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/ToJsonUnion.json @@ -0,0 +1,76 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ], + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagArray.json b/test/schemas/llm.schema/chatgpt/TypeTagArray.json new file mode 100644 index 0000000000..80b7c8323a --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagArray.json @@ -0,0 +1,64 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "equal": { + "description": "@minItems 10\n@maxItems 10", + "type": "array", + "items": { + "description": "@minimum 10\n@maximum 10", + "type": "number" + } + }, + "unique": { + "description": "@uniqueItems", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagArrayUnion.json b/test/schemas/llm.schema/chatgpt/TypeTagArrayUnion.json new file mode 100644 index 0000000000..727ecf9328 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagArrayUnion.json @@ -0,0 +1,55 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + }, + "minItems": { + "description": "@minItems 3", + "type": "array", + "items": { + "description": "@minimum 3", + "type": "number" + } + }, + "maxItems": { + "description": "@maxItems 7", + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "description": "@maxLength 7" + }, + { + "type": "number", + "description": "@maximum 7" + } + ] + } + }, + "both": { + "description": "@minItems 3\n@maxItems 7", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagAtomicUnion.json b/test/schemas/llm.schema/chatgpt/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..029aa00b5a --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "anyOf": [ + { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + { + "type": "number", + "description": "@minimum 3" + } + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagCustom.json b/test/schemas/llm.schema/chatgpt/TypeTagCustom.json new file mode 100644 index 0000000000..8f806b9c88 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagCustom.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "id": { + "description": "@format uuid", + "type": "string" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagDefault.json b/test/schemas/llm.schema/chatgpt/TypeTagDefault.json new file mode 100644 index 0000000000..aef1e71160 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagDefault.json @@ -0,0 +1,103 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "description": "@default 1", + "type": "number" + }, + "string": { + "description": "@default two", + "type": "string" + }, + "text": { + "description": "@default Very long text, can you understand it?", + "type": "string" + }, + "boolean_and_number_and_string": { + "anyOf": [ + { + "type": "number", + "description": "@default 1" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number", + "description": "@default 1" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "description": "@default two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "anyOf": [ + { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + { + "type": "number", + "description": "@default 2" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagFormat.json b/test/schemas/llm.schema/chatgpt/TypeTagFormat.json new file mode 100644 index 0000000000..3f2924005b --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagFormat.json @@ -0,0 +1,118 @@ +{ + "type": "object", + "properties": { + "byte": { + "description": "@format byte", + "type": "string" + }, + "password": { + "description": "@format password", + "type": "string" + }, + "regex": { + "description": "@format regex", + "type": "string" + }, + "uuid": { + "description": "@format uuid", + "type": "string" + }, + "email": { + "description": "@format email", + "type": "string" + }, + "hostname": { + "description": "@format hostname", + "type": "string" + }, + "idnEmail": { + "description": "@format idn-email", + "type": "string" + }, + "idnHostname": { + "description": "@format idn-hostname", + "type": "string" + }, + "iri": { + "description": "@format iri", + "type": "string" + }, + "iriReference": { + "description": "@format iri-reference", + "type": "string" + }, + "ipv4": { + "description": "@format ipv4", + "type": "string" + }, + "ipv6": { + "description": "@format ipv6", + "type": "string" + }, + "uri": { + "description": "@format uri", + "type": "string" + }, + "uriReference": { + "description": "@format uri-reference", + "type": "string" + }, + "uriTemplate": { + "description": "@format uri-template", + "type": "string" + }, + "url": { + "description": "@format url", + "type": "string" + }, + "datetime": { + "description": "@format date-time", + "type": "string" + }, + "date": { + "description": "@format date", + "type": "string" + }, + "time": { + "description": "@format time", + "type": "string" + }, + "duration": { + "description": "@format duration", + "type": "string" + }, + "jsonPointer": { + "description": "@format json-pointer", + "type": "string" + }, + "relativeJsonPointer": { + "description": "@format relative-json-pointer", + "type": "string" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagLength.json b/test/schemas/llm.schema/chatgpt/TypeTagLength.json new file mode 100644 index 0000000000..0e4d254b05 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagLength.json @@ -0,0 +1,45 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "description": "@minLength 5\n@maxLength 5", + "type": "string" + }, + "minimum": { + "description": "@minLength 3", + "type": "string" + }, + "maximum": { + "description": "@maxLength 7", + "type": "string" + }, + "minimum_and_maximum": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + }, + "equal": { + "description": "@minLength 10\n@maxLength 19", + "type": "string" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagMatrix.json b/test/schemas/llm.schema/chatgpt/TypeTagMatrix.json new file mode 100644 index 0000000000..5af79791ad --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagMatrix.json @@ -0,0 +1,21 @@ +{ + "type": "object", + "properties": { + "matrix": { + "description": "@minItems 3\n@maxItems 3", + "type": "array", + "items": { + "description": "@minItems 4\n@maxItems 4", + "type": "array", + "items": { + "description": "@format uuid", + "type": "string" + } + } + } + }, + "required": [ + "matrix" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagObjectUnion.json b/test/schemas/llm.schema/chatgpt/TypeTagObjectUnion.json new file mode 100644 index 0000000000..4e1b1423a1 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagObjectUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "value": { + "description": "@minimum 3", + "type": "number" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "value": { + "description": "@minLength 3\n@maxLength 7", + "type": "string" + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagPattern.json b/test/schemas/llm.schema/chatgpt/TypeTagPattern.json new file mode 100644 index 0000000000..b70028d281 --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagPattern.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "uuid": { + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$", + "type": "string" + }, + "email": { + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", + "type": "string" + }, + "ipv4": { + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", + "type": "string" + }, + "ipv6": { + "description": "@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]))$", + "type": "string" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagRange.json b/test/schemas/llm.schema/chatgpt/TypeTagRange.json new file mode 100644 index 0000000000..9d3a2711fc --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagRange.json @@ -0,0 +1,65 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "description": "@minimum 3\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal": { + "description": "@minimum 3", + "type": "integer" + }, + "less": { + "description": "@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "less_equal": { + "description": "@maximum 7", + "type": "integer" + }, + "greater_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_equal_less": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true", + "type": "integer" + }, + "greater_less_equal": { + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true", + "type": "integer" + }, + "greater_equal_less_equal": { + "description": "@minimum 3\n@maximum 7", + "type": "integer" + }, + "equal": { + "description": "@minimum 10\n@maximum 10", + "type": "integer" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/chatgpt/TypeTagType.json b/test/schemas/llm.schema/chatgpt/TypeTagType.json new file mode 100644 index 0000000000..547cbf9caf --- /dev/null +++ b/test/schemas/llm.schema/chatgpt/TypeTagType.json @@ -0,0 +1,48 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ], + "additionalProperties": false + } + } + }, + "required": [ + "value" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayAny.json b/test/schemas/llm.schema/claude/ArrayAny.json new file mode 100644 index 0000000000..ab2ac01bf9 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayAny.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayHierarchical.json b/test/schemas/llm.schema/claude/ArrayHierarchical.json new file mode 100644 index 0000000000..f160010dd9 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayHierarchical.json @@ -0,0 +1,120 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayHierarchicalPointer.json b/test/schemas/llm.schema/claude/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..c08fac851b --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayHierarchicalPointer.json @@ -0,0 +1,128 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayMatrix.json b/test/schemas/llm.schema/claude/ArrayMatrix.json new file mode 100644 index 0000000000..b71a8043df --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayMatrix.json @@ -0,0 +1,12 @@ +{ + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRecursive.json b/test/schemas/llm.schema/claude/ArrayRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.schema/claude/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRecursiveUnionExplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.schema/claude/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.schema/claude/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRecursiveUnionImplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRepeatedNullable.json b/test/schemas/llm.schema/claude/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRepeatedNullable.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRepeatedRequired.json b/test/schemas/llm.schema/claude/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRepeatedRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayRepeatedUnion.json b/test/schemas/llm.schema/claude/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayRepeatedUnion.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArraySimple.json b/test/schemas/llm.schema/claude/ArraySimple.json new file mode 100644 index 0000000000..442ef4ec78 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArraySimple.json @@ -0,0 +1,41 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ArrayUnion.json b/test/schemas/llm.schema/claude/ArrayUnion.json new file mode 100644 index 0000000000..8b132d9c46 --- /dev/null +++ b/test/schemas/llm.schema/claude/ArrayUnion.json @@ -0,0 +1,25 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/AtomicUnion.json b/test/schemas/llm.schema/claude/AtomicUnion.json new file mode 100644 index 0000000000..a5ed788285 --- /dev/null +++ b/test/schemas/llm.schema/claude/AtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ClassGetter.json b/test/schemas/llm.schema/claude/ClassGetter.json new file mode 100644 index 0000000000..2e100c350a --- /dev/null +++ b/test/schemas/llm.schema/claude/ClassGetter.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ClassMethod.json b/test/schemas/llm.schema/claude/ClassMethod.json new file mode 100644 index 0000000000..97f1e16a0e --- /dev/null +++ b/test/schemas/llm.schema/claude/ClassMethod.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ClassPropertyAssignment.json b/test/schemas/llm.schema/claude/ClassPropertyAssignment.json new file mode 100644 index 0000000000..a080dafc7d --- /dev/null +++ b/test/schemas/llm.schema/claude/ClassPropertyAssignment.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagArray.json b/test/schemas/llm.schema/claude/CommentTagArray.json new file mode 100644 index 0000000000..02717ca4b6 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagArray.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagArrayUnion.json b/test/schemas/llm.schema/claude/CommentTagArrayUnion.json new file mode 100644 index 0000000000..3977d0b338 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagArrayUnion.json @@ -0,0 +1,51 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagAtomicUnion.json b/test/schemas/llm.schema/claude/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..678bd0ebf7 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagAtomicUnion.json @@ -0,0 +1,32 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagDefault.json b/test/schemas/llm.schema/claude/CommentTagDefault.json new file mode 100644 index 0000000000..c08b918b05 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagDefault.json @@ -0,0 +1,120 @@ +{ + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagFormat.json b/test/schemas/llm.schema/claude/CommentTagFormat.json new file mode 100644 index 0000000000..08cc786259 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagLength.json b/test/schemas/llm.schema/claude/CommentTagLength.json new file mode 100644 index 0000000000..89566bad51 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagLength.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagObjectUnion.json b/test/schemas/llm.schema/claude/CommentTagObjectUnion.json new file mode 100644 index 0000000000..2f27b4791d --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagObjectUnion.json @@ -0,0 +1,32 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagPattern.json b/test/schemas/llm.schema/claude/CommentTagPattern.json new file mode 100644 index 0000000000..726c05d109 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagRange.json b/test/schemas/llm.schema/claude/CommentTagRange.json new file mode 100644 index 0000000000..8ef35191dc --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagRange.json @@ -0,0 +1,74 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/CommentTagType.json b/test/schemas/llm.schema/claude/CommentTagType.json new file mode 100644 index 0000000000..afa02a0ba0 --- /dev/null +++ b/test/schemas/llm.schema/claude/CommentTagType.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ConstantAtomicAbsorbed.json b/test/schemas/llm.schema/claude/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..258b28561f --- /dev/null +++ b/test/schemas/llm.schema/claude/ConstantAtomicAbsorbed.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ConstantAtomicTagged.json b/test/schemas/llm.schema/claude/ConstantAtomicTagged.json new file mode 100644 index 0000000000..26a46307ab --- /dev/null +++ b/test/schemas/llm.schema/claude/ConstantAtomicTagged.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ConstantAtomicUnion.json b/test/schemas/llm.schema/claude/ConstantAtomicUnion.json new file mode 100644 index 0000000000..7501e84eca --- /dev/null +++ b/test/schemas/llm.schema/claude/ConstantAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ConstantConstEnumeration.json b/test/schemas/llm.schema/claude/ConstantConstEnumeration.json new file mode 100644 index 0000000000..1fa9ddcd96 --- /dev/null +++ b/test/schemas/llm.schema/claude/ConstantConstEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ConstantEnumeration.json b/test/schemas/llm.schema/claude/ConstantEnumeration.json new file mode 100644 index 0000000000..1fa9ddcd96 --- /dev/null +++ b/test/schemas/llm.schema/claude/ConstantEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicArray.json b/test/schemas/llm.schema/claude/DynamicArray.json new file mode 100644 index 0000000000..f76fd117e5 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicArray.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicComposite.json b/test/schemas/llm.schema/claude/DynamicComposite.json new file mode 100644 index 0000000000..2bd79fa6b3 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicComposite.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicConstant.json b/test/schemas/llm.schema/claude/DynamicConstant.json new file mode 100644 index 0000000000..1595a33697 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicConstant.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicEnumeration.json b/test/schemas/llm.schema/claude/DynamicEnumeration.json new file mode 100644 index 0000000000..27eb8a9b61 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicEnumeration.json @@ -0,0 +1,55 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicNever.json b/test/schemas/llm.schema/claude/DynamicNever.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicNever.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicSimple.json b/test/schemas/llm.schema/claude/DynamicSimple.json new file mode 100644 index 0000000000..3ecfaa3493 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicSimple.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicTemplate.json b/test/schemas/llm.schema/claude/DynamicTemplate.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicTemplate.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicTree.json b/test/schemas/llm.schema/claude/DynamicTree.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicTree.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicUndefined.json b/test/schemas/llm.schema/claude/DynamicUndefined.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicUndefined.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/DynamicUnion.json b/test/schemas/llm.schema/claude/DynamicUnion.json new file mode 100644 index 0000000000..fa10bb7562 --- /dev/null +++ b/test/schemas/llm.schema/claude/DynamicUnion.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectAlias.json b/test/schemas/llm.schema/claude/ObjectAlias.json new file mode 100644 index 0000000000..03964d1ac9 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectAlias.json @@ -0,0 +1,71 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectDate.json b/test/schemas/llm.schema/claude/ObjectDate.json new file mode 100644 index 0000000000..71c2fc6305 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectDate.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectDescription.json b/test/schemas/llm.schema/claude/ObjectDescription.json new file mode 100644 index 0000000000..4d09bd5808 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectDescription.json @@ -0,0 +1,43 @@ +{ + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectDynamic.json b/test/schemas/llm.schema/claude/ObjectDynamic.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectDynamic.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectGenericAlias.json b/test/schemas/llm.schema/claude/ObjectGenericAlias.json new file mode 100644 index 0000000000..18d298ead1 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectGenericAlias.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectGenericArray.json b/test/schemas/llm.schema/claude/ObjectGenericArray.json new file mode 100644 index 0000000000..f6c6a35aa5 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectGenericArray.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectGenericUnion.json b/test/schemas/llm.schema/claude/ObjectGenericUnion.json new file mode 100644 index 0000000000..01b157c1e6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectGenericUnion.json @@ -0,0 +1,344 @@ +{ + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectInternal.json b/test/schemas/llm.schema/claude/ObjectInternal.json new file mode 100644 index 0000000000..7dc4990cb7 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectInternal.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectIntersection.json b/test/schemas/llm.schema/claude/ObjectIntersection.json new file mode 100644 index 0000000000..d70f237e86 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectIntersection.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectJsonTag.json b/test/schemas/llm.schema/claude/ObjectJsonTag.json new file mode 100644 index 0000000000..b245ce4314 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectJsonTag.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectLiteralProperty.json b/test/schemas/llm.schema/claude/ObjectLiteralProperty.json new file mode 100644 index 0000000000..3b3771043d --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectLiteralProperty.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectLiteralType.json b/test/schemas/llm.schema/claude/ObjectLiteralType.json new file mode 100644 index 0000000000..1a21bd5c4a --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectLiteralType.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectNullable.json b/test/schemas/llm.schema/claude/ObjectNullable.json new file mode 100644 index 0000000000..d1c234353c --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectNullable.json @@ -0,0 +1,99 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectOptional.json b/test/schemas/llm.schema/claude/ObjectOptional.json new file mode 100644 index 0000000000..ad68b72c24 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectOptional.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectPartial.json b/test/schemas/llm.schema/claude/ObjectPartial.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectPartial.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectPartialAndRequired.json b/test/schemas/llm.schema/claude/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectPartialAndRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectPrimitive.json b/test/schemas/llm.schema/claude/ObjectPrimitive.json new file mode 100644 index 0000000000..a3a2c982e4 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectPrimitive.json @@ -0,0 +1,72 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectRecursive.json b/test/schemas/llm.schema/claude/ObjectRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectRequired.json b/test/schemas/llm.schema/claude/ObjectRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectSimple.json b/test/schemas/llm.schema/claude/ObjectSimple.json new file mode 100644 index 0000000000..67548a8ed8 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectSimple.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUndefined.json b/test/schemas/llm.schema/claude/ObjectUndefined.json new file mode 100644 index 0000000000..c7c6460e04 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUndefined.json @@ -0,0 +1,47 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionComposite.json b/test/schemas/llm.schema/claude/ObjectUnionComposite.json new file mode 100644 index 0000000000..0a9b9c1dba --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionComposite.json @@ -0,0 +1,346 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionCompositePointer.json b/test/schemas/llm.schema/claude/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..7b2c95593f --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionCompositePointer.json @@ -0,0 +1,362 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionDouble.json b/test/schemas/llm.schema/claude/ObjectUnionDouble.json new file mode 100644 index 0000000000..d1bdb109e4 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionDouble.json @@ -0,0 +1,134 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionExplicit.json b/test/schemas/llm.schema/claude/ObjectUnionExplicit.json new file mode 100644 index 0000000000..ff2b506ef9 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionExplicit.json @@ -0,0 +1,332 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionExplicitPointer.json b/test/schemas/llm.schema/claude/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..12dc3b6c29 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionExplicitPointer.json @@ -0,0 +1,348 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionImplicit.json b/test/schemas/llm.schema/claude/ObjectUnionImplicit.json new file mode 100644 index 0000000000..7a11552c16 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionImplicit.json @@ -0,0 +1,601 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ObjectUnionNonPredictable.json b/test/schemas/llm.schema/claude/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..fa6b443d37 --- /dev/null +++ b/test/schemas/llm.schema/claude/ObjectUnionNonPredictable.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TemplateAtomic.json b/test/schemas/llm.schema/claude/TemplateAtomic.json new file mode 100644 index 0000000000..c1660b8945 --- /dev/null +++ b/test/schemas/llm.schema/claude/TemplateAtomic.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TemplateConstant.json b/test/schemas/llm.schema/claude/TemplateConstant.json new file mode 100644 index 0000000000..8b4b7ec391 --- /dev/null +++ b/test/schemas/llm.schema/claude/TemplateConstant.json @@ -0,0 +1,78 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TemplateUnion.json b/test/schemas/llm.schema/claude/TemplateUnion.json new file mode 100644 index 0000000000..f64a7f0470 --- /dev/null +++ b/test/schemas/llm.schema/claude/TemplateUnion.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ToJsonAtomicUnion.json b/test/schemas/llm.schema/claude/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..a5ed788285 --- /dev/null +++ b/test/schemas/llm.schema/claude/ToJsonAtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ToJsonDouble.json b/test/schemas/llm.schema/claude/ToJsonDouble.json new file mode 100644 index 0000000000..da3e14052b --- /dev/null +++ b/test/schemas/llm.schema/claude/ToJsonDouble.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ToJsonNull.json b/test/schemas/llm.schema/claude/ToJsonNull.json new file mode 100644 index 0000000000..743b3af495 --- /dev/null +++ b/test/schemas/llm.schema/claude/ToJsonNull.json @@ -0,0 +1,3 @@ +{ + "type": "null" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/ToJsonUnion.json b/test/schemas/llm.schema/claude/ToJsonUnion.json new file mode 100644 index 0000000000..4a9c36ece2 --- /dev/null +++ b/test/schemas/llm.schema/claude/ToJsonUnion.json @@ -0,0 +1,73 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagArray.json b/test/schemas/llm.schema/claude/TypeTagArray.json new file mode 100644 index 0000000000..c308c83995 --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagArray.json @@ -0,0 +1,66 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagArrayUnion.json b/test/schemas/llm.schema/claude/TypeTagArrayUnion.json new file mode 100644 index 0000000000..54286f02ed --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagArrayUnion.json @@ -0,0 +1,56 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagAtomicUnion.json b/test/schemas/llm.schema/claude/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..678bd0ebf7 --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagAtomicUnion.json @@ -0,0 +1,32 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagCustom.json b/test/schemas/llm.schema/claude/TypeTagCustom.json new file mode 100644 index 0000000000..097ed0035e --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagCustom.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagDefault.json b/test/schemas/llm.schema/claude/TypeTagDefault.json new file mode 100644 index 0000000000..844a308f6e --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagDefault.json @@ -0,0 +1,102 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagFormat.json b/test/schemas/llm.schema/claude/TypeTagFormat.json new file mode 100644 index 0000000000..08cc786259 --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagLength.json b/test/schemas/llm.schema/claude/TypeTagLength.json new file mode 100644 index 0000000000..89566bad51 --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagLength.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagMatrix.json b/test/schemas/llm.schema/claude/TypeTagMatrix.json new file mode 100644 index 0000000000..0ed4ca50e5 --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagMatrix.json @@ -0,0 +1,22 @@ +{ + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagObjectUnion.json b/test/schemas/llm.schema/claude/TypeTagObjectUnion.json new file mode 100644 index 0000000000..2f27b4791d --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagObjectUnion.json @@ -0,0 +1,32 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagPattern.json b/test/schemas/llm.schema/claude/TypeTagPattern.json new file mode 100644 index 0000000000..6c054bbde4 --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagRange.json b/test/schemas/llm.schema/claude/TypeTagRange.json new file mode 100644 index 0000000000..8ef35191dc --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagRange.json @@ -0,0 +1,74 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/claude/TypeTagType.json b/test/schemas/llm.schema/claude/TypeTagType.json new file mode 100644 index 0000000000..e5bccc37bb --- /dev/null +++ b/test/schemas/llm.schema/claude/TypeTagType.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ArrayAny.json b/test/schemas/llm.schema/gemini/ArrayAny.json new file mode 100644 index 0000000000..a5a8b1316a --- /dev/null +++ b/test/schemas/llm.schema/gemini/ArrayAny.json @@ -0,0 +1,52 @@ +{ + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "type": "array", + "items": {}, + "nullable": true + }, + "nullables2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both1": { + "type": "array", + "items": {}, + "nullable": true + }, + "both2": { + "type": "array", + "items": {}, + "nullable": true + }, + "both3": { + "type": "array", + "items": {}, + "nullable": true + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "nullables1", + "nullables2", + "union" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ArrayHierarchical.json b/test/schemas/llm.schema/gemini/ArrayHierarchical.json new file mode 100644 index 0000000000..f160010dd9 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ArrayHierarchical.json @@ -0,0 +1,120 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ArrayHierarchicalPointer.json b/test/schemas/llm.schema/gemini/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..c08fac851b --- /dev/null +++ b/test/schemas/llm.schema/gemini/ArrayHierarchicalPointer.json @@ -0,0 +1,128 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ArrayMatrix.json b/test/schemas/llm.schema/gemini/ArrayMatrix.json new file mode 100644 index 0000000000..b71a8043df --- /dev/null +++ b/test/schemas/llm.schema/gemini/ArrayMatrix.json @@ -0,0 +1,12 @@ +{ + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ArrayRecursive.json b/test/schemas/llm.schema/gemini/ArrayRecursive.json new file mode 100644 index 0000000000..4354674d36 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ArrayRecursive.json @@ -0,0 +1,158 @@ +{ + "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" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] + } + }, + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sequence": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "children", + "id", + "code", + "sequence", + "created_at" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ArraySimple.json b/test/schemas/llm.schema/gemini/ArraySimple.json new file mode 100644 index 0000000000..442ef4ec78 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ArraySimple.json @@ -0,0 +1,41 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ClassGetter.json b/test/schemas/llm.schema/gemini/ClassGetter.json new file mode 100644 index 0000000000..9e8c9a7df0 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ClassGetter.json @@ -0,0 +1,20 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "type": "boolean", + "nullable": true + } + }, + "required": [ + "id", + "name", + "dead" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ClassMethod.json b/test/schemas/llm.schema/gemini/ClassMethod.json new file mode 100644 index 0000000000..97f1e16a0e --- /dev/null +++ b/test/schemas/llm.schema/gemini/ClassMethod.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ClassPropertyAssignment.json b/test/schemas/llm.schema/gemini/ClassPropertyAssignment.json new file mode 100644 index 0000000000..383d0818bc --- /dev/null +++ b/test/schemas/llm.schema/gemini/ClassPropertyAssignment.json @@ -0,0 +1,33 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "type": "string", + "enum": [ + "assignment" + ] + }, + "editable": { + "type": "boolean", + "enum": [ + false + ] + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/CommentTagArray.json b/test/schemas/llm.schema/gemini/CommentTagArray.json new file mode 100644 index 0000000000..02717ca4b6 --- /dev/null +++ b/test/schemas/llm.schema/gemini/CommentTagArray.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/CommentTagFormat.json b/test/schemas/llm.schema/gemini/CommentTagFormat.json new file mode 100644 index 0000000000..29531c14fe --- /dev/null +++ b/test/schemas/llm.schema/gemini/CommentTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/CommentTagLength.json b/test/schemas/llm.schema/gemini/CommentTagLength.json new file mode 100644 index 0000000000..26be3cc2d4 --- /dev/null +++ b/test/schemas/llm.schema/gemini/CommentTagLength.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/CommentTagPattern.json b/test/schemas/llm.schema/gemini/CommentTagPattern.json new file mode 100644 index 0000000000..e4c21a31fb --- /dev/null +++ b/test/schemas/llm.schema/gemini/CommentTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/CommentTagRange.json b/test/schemas/llm.schema/gemini/CommentTagRange.json new file mode 100644 index 0000000000..9e68d62770 --- /dev/null +++ b/test/schemas/llm.schema/gemini/CommentTagRange.json @@ -0,0 +1,63 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/CommentTagType.json b/test/schemas/llm.schema/gemini/CommentTagType.json new file mode 100644 index 0000000000..8c2a924448 --- /dev/null +++ b/test/schemas/llm.schema/gemini/CommentTagType.json @@ -0,0 +1,48 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer", + "description": "Integer value." + }, + "uint": { + "type": "integer", + "description": "Unsigned integer value." + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ConstantAtomicAbsorbed.json b/test/schemas/llm.schema/gemini/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..a5c9b38c62 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ConstantAtomicAbsorbed.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@default something" + }, + "age": { + "type": "number", + "description": "@default 20" + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/DynamicConstant.json b/test/schemas/llm.schema/gemini/DynamicConstant.json new file mode 100644 index 0000000000..1595a33697 --- /dev/null +++ b/test/schemas/llm.schema/gemini/DynamicConstant.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/DynamicEnumeration.json b/test/schemas/llm.schema/gemini/DynamicEnumeration.json new file mode 100644 index 0000000000..4b184c642e --- /dev/null +++ b/test/schemas/llm.schema/gemini/DynamicEnumeration.json @@ -0,0 +1,44 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/DynamicNever.json b/test/schemas/llm.schema/gemini/DynamicNever.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/gemini/DynamicNever.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/DynamicUndefined.json b/test/schemas/llm.schema/gemini/DynamicUndefined.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/gemini/DynamicUndefined.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectDate.json b/test/schemas/llm.schema/gemini/ObjectDate.json new file mode 100644 index 0000000000..034921ad0c --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectDate.json @@ -0,0 +1,36 @@ +{ + "type": "object", + "properties": { + "classDate": { + "type": "string", + "description": "@format date-time", + "nullable": true + }, + "date": { + "type": "string", + "nullable": true, + "description": "@format date" + }, + "datetime": { + "type": "string", + "nullable": true, + "description": "@format date-time" + }, + "time": { + "type": "string", + "nullable": true, + "description": "@format time" + }, + "duration": { + "type": "string", + "nullable": true, + "description": "@format duration" + } + }, + "required": [ + "date", + "datetime", + "time", + "duration" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectDescription.json b/test/schemas/llm.schema/gemini/ObjectDescription.json new file mode 100644 index 0000000000..1980aa685e --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectDescription.json @@ -0,0 +1,36 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Primary Key.\n\n\n@format uuid" + }, + "deprecated": { + "type": "boolean", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." + }, + "title": { + "type": "string", + "description": "This is the title.\n\nTitle tag can replace the first line of the comment." + }, + "descriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." + }, + "newLine": { + "type": "number", + "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." + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ], + "description": "This is the title of object type.\n\nAn interface designed to test JSON schema's object description." +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectGenericAlias.json b/test/schemas/llm.schema/gemini/ObjectGenericAlias.json new file mode 100644 index 0000000000..18d298ead1 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectGenericAlias.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectGenericArray.json b/test/schemas/llm.schema/gemini/ObjectGenericArray.json new file mode 100644 index 0000000000..f6c6a35aa5 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectGenericArray.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectInternal.json b/test/schemas/llm.schema/gemini/ObjectInternal.json new file mode 100644 index 0000000000..7dc4990cb7 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectInternal.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectIntersection.json b/test/schemas/llm.schema/gemini/ObjectIntersection.json new file mode 100644 index 0000000000..d70f237e86 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectIntersection.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectJsonTag.json b/test/schemas/llm.schema/gemini/ObjectJsonTag.json new file mode 100644 index 0000000000..ad0c88310e --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectJsonTag.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "type": "string", + "description": "Descripted property." + }, + "title": { + "type": "string", + "description": "something.\n\nTitled property." + }, + "complicate_title": { + "type": "string", + "description": "something weirdo with {@link something } tag.\n\nComplicate title." + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectLiteralProperty.json b/test/schemas/llm.schema/gemini/ObjectLiteralProperty.json new file mode 100644 index 0000000000..3b3771043d --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectLiteralProperty.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectLiteralType.json b/test/schemas/llm.schema/gemini/ObjectLiteralType.json new file mode 100644 index 0000000000..1a21bd5c4a --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectLiteralType.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectOptional.json b/test/schemas/llm.schema/gemini/ObjectOptional.json new file mode 100644 index 0000000000..6c5ced61d1 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectOptional.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectPartial.json b/test/schemas/llm.schema/gemini/ObjectPartial.json new file mode 100644 index 0000000000..64410a7ea7 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectPartial.json @@ -0,0 +1,137 @@ +{ + "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" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "nullable": true + } + }, + "required": [], + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialObjectPartial.IBase} type:\n\n> Make all properties in T optional" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectPartialAndRequired.json b/test/schemas/llm.schema/gemini/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..c189136ef5 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectPartialAndRequired.json @@ -0,0 +1,102 @@ +{ + "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" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ], + "nullable": true + }, + "array": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "object", + "array" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectPrimitive.json b/test/schemas/llm.schema/gemini/ObjectPrimitive.json new file mode 100644 index 0000000000..ab745e1a62 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectPrimitive.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectRecursive.json b/test/schemas/llm.schema/gemini/ObjectRecursive.json new file mode 100644 index 0000000000..16097f5ddb --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectRecursive.json @@ -0,0 +1,166 @@ +{ + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ], + "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" + ] + } + }, + "required": [ + "parent", + "id", + "code", + "name", + "sequence", + "created_at" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectRequired.json b/test/schemas/llm.schema/gemini/ObjectRequired.json new file mode 100644 index 0000000000..c88a7f39f1 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectRequired.json @@ -0,0 +1,119 @@ +{ + "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": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [], + "nullable": true + } + }, + "required": [ + "boolean", + "number", + "string", + "array", + "object" + ], + "description": "Make all properties in T required\n\n------------------------------\n\nDescription of the current {@link RequiredObjectRequired.IBase} type:\n\n> Make all properties in T required" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ObjectSimple.json b/test/schemas/llm.schema/gemini/ObjectSimple.json new file mode 100644 index 0000000000..67548a8ed8 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ObjectSimple.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TemplateAtomic.json b/test/schemas/llm.schema/gemini/TemplateAtomic.json new file mode 100644 index 0000000000..9b683b6898 --- /dev/null +++ b/test/schemas/llm.schema/gemini/TemplateAtomic.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "@pattern ^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "description": "@pattern ((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "description": "@pattern ^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "description": "@pattern ^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "type": "string", + "enum": [ + "the_false_value", + "the_true_value" + ] + }, + "ipv4": { + "type": "string", + "description": "@pattern ^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "description": "@pattern ((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TemplateConstant.json b/test/schemas/llm.schema/gemini/TemplateConstant.json new file mode 100644 index 0000000000..df125c7461 --- /dev/null +++ b/test/schemas/llm.schema/gemini/TemplateConstant.json @@ -0,0 +1,51 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "enum": [ + "prefix_A", + "prefix_B", + "prefix_C" + ] + }, + "postfix": { + "type": "string", + "enum": [ + "1_postfix", + "2_postfix", + "3_postfix" + ] + }, + "combined": { + "type": "string", + "enum": [ + "the_1_value_with_label_A", + "the_1_value_with_label_B", + "the_1_value_with_label_C", + "the_2_value_with_label_A", + "the_2_value_with_label_B", + "the_2_value_with_label_C", + "the_3_value_with_label_A", + "the_3_value_with_label_B", + "the_3_value_with_label_C" + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ToJsonDouble.json b/test/schemas/llm.schema/gemini/ToJsonDouble.json new file mode 100644 index 0000000000..da3e14052b --- /dev/null +++ b/test/schemas/llm.schema/gemini/ToJsonDouble.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/ToJsonNull.json b/test/schemas/llm.schema/gemini/ToJsonNull.json new file mode 100644 index 0000000000..743b3af495 --- /dev/null +++ b/test/schemas/llm.schema/gemini/ToJsonNull.json @@ -0,0 +1,3 @@ +{ + "type": "null" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagArray.json b/test/schemas/llm.schema/gemini/TypeTagArray.json new file mode 100644 index 0000000000..d4d6add70d --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagArray.json @@ -0,0 +1,65 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 3" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "description": "@minimum 10\n@maximum 10" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagCustom.json b/test/schemas/llm.schema/gemini/TypeTagCustom.json new file mode 100644 index 0000000000..307f439dfb --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagCustom.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "@format uuid" + }, + "dollar": { + "type": "string", + "x-typia-monetary": "dollar" + }, + "postfix": { + "type": "string", + "x-typia-postfix": "abcd" + }, + "powerOf": { + "type": "number", + "x-typia-powerOf": 2 + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagFormat.json b/test/schemas/llm.schema/gemini/TypeTagFormat.json new file mode 100644 index 0000000000..29531c14fe --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "description": "@format byte" + }, + "password": { + "type": "string", + "description": "@format password" + }, + "regex": { + "type": "string", + "description": "@format regex" + }, + "uuid": { + "type": "string", + "description": "@format uuid" + }, + "email": { + "type": "string", + "description": "@format email" + }, + "hostname": { + "type": "string", + "description": "@format hostname" + }, + "idnEmail": { + "type": "string", + "description": "@format idn-email" + }, + "idnHostname": { + "type": "string", + "description": "@format idn-hostname" + }, + "iri": { + "type": "string", + "description": "@format iri" + }, + "iriReference": { + "type": "string", + "description": "@format iri-reference" + }, + "ipv4": { + "type": "string", + "description": "@format ipv4" + }, + "ipv6": { + "type": "string", + "description": "@format ipv6" + }, + "uri": { + "type": "string", + "description": "@format uri" + }, + "uriReference": { + "type": "string", + "description": "@format uri-reference" + }, + "uriTemplate": { + "type": "string", + "description": "@format uri-template" + }, + "url": { + "type": "string", + "description": "@format url" + }, + "datetime": { + "type": "string", + "description": "@format date-time" + }, + "date": { + "type": "string", + "description": "@format date" + }, + "time": { + "type": "string", + "description": "@format time" + }, + "duration": { + "type": "string", + "description": "@format duration" + }, + "jsonPointer": { + "type": "string", + "description": "@format json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "description": "@format relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagLength.json b/test/schemas/llm.schema/gemini/TypeTagLength.json new file mode 100644 index 0000000000..26be3cc2d4 --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagLength.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "description": "@minLength 5\n@maxLength 5" + }, + "minimum": { + "type": "string", + "description": "@minLength 3" + }, + "maximum": { + "type": "string", + "description": "@maxLength 7" + }, + "minimum_and_maximum": { + "type": "string", + "description": "@minLength 3\n@maxLength 7" + }, + "equal": { + "type": "string", + "description": "@minLength 10\n@maxLength 19" + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagMatrix.json b/test/schemas/llm.schema/gemini/TypeTagMatrix.json new file mode 100644 index 0000000000..896c910786 --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagMatrix.json @@ -0,0 +1,22 @@ +{ + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "@format uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagPattern.json b/test/schemas/llm.schema/gemini/TypeTagPattern.json new file mode 100644 index 0000000000..366e567a42 --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "@pattern ^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "description": "@pattern ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "description": "@pattern ^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "description": "@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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagRange.json b/test/schemas/llm.schema/gemini/TypeTagRange.json new file mode 100644 index 0000000000..9e68d62770 --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagRange.json @@ -0,0 +1,63 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "description": "@minimum 3\n@exclusiveMinimum true" + }, + "greater_equal": { + "type": "integer", + "description": "@minimum 3" + }, + "less": { + "type": "integer", + "description": "@maximum 7\n@exclusiveMaximum true" + }, + "less_equal": { + "type": "integer", + "description": "@maximum 7" + }, + "greater_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true\n@exclusiveMaximum true" + }, + "greater_equal_less": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMaximum true" + }, + "greater_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7\n@exclusiveMinimum true" + }, + "greater_equal_less_equal": { + "type": "integer", + "description": "@minimum 3\n@maximum 7" + }, + "equal": { + "type": "integer", + "description": "@minimum 10\n@maximum 10" + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/gemini/TypeTagType.json b/test/schemas/llm.schema/gemini/TypeTagType.json new file mode 100644 index 0000000000..e5bccc37bb --- /dev/null +++ b/test/schemas/llm.schema/gemini/TypeTagType.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayAny.json b/test/schemas/llm.schema/llama/ArrayAny.json new file mode 100644 index 0000000000..ab2ac01bf9 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayAny.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "anys": { + "type": "array", + "items": {} + }, + "undefindable1": { + "type": "array", + "items": {} + }, + "undefindable2": { + "type": "array", + "items": {} + }, + "nullables1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "nullables2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both1": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both2": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "both3": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": {} + } + ] + }, + "union": { + "type": "array", + "items": {} + } + }, + "required": [ + "anys", + "undefindable1", + "undefindable2", + "nullables1", + "nullables2", + "both1", + "both2", + "both3", + "union" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayHierarchical.json b/test/schemas/llm.schema/llama/ArrayHierarchical.json new file mode 100644 index 0000000000..f160010dd9 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayHierarchical.json @@ -0,0 +1,120 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayHierarchicalPointer.json b/test/schemas/llm.schema/llama/ArrayHierarchicalPointer.json new file mode 100644 index 0000000000..c08fac851b --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayHierarchicalPointer.json @@ -0,0 +1,128 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "serial": { + "type": "number" + }, + "name": { + "type": "string" + }, + "established_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "departments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "code": { + "type": "string" + }, + "sales": { + "type": "number" + }, + "created_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + }, + "employees": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + }, + "grade": { + "type": "number" + }, + "employeed_at": { + "type": "object", + "properties": { + "time": { + "type": "number" + }, + "zone": { + "type": "number" + } + }, + "required": [ + "time", + "zone" + ] + } + }, + "required": [ + "id", + "name", + "age", + "grade", + "employeed_at" + ] + } + } + }, + "required": [ + "id", + "code", + "sales", + "created_at", + "employees" + ] + } + } + }, + "required": [ + "id", + "serial", + "name", + "established_at", + "departments" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayMatrix.json b/test/schemas/llm.schema/llama/ArrayMatrix.json new file mode 100644 index 0000000000..b71a8043df --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayMatrix.json @@ -0,0 +1,12 @@ +{ + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRecursive.json b/test/schemas/llm.schema/llama/ArrayRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRecursiveUnionExplicit.json b/test/schemas/llm.schema/llama/ArrayRecursiveUnionExplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRecursiveUnionExplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/llm.schema/llama/ArrayRecursiveUnionExplicitPointer.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRecursiveUnionExplicitPointer.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRecursiveUnionImplicit.json b/test/schemas/llm.schema/llama/ArrayRecursiveUnionImplicit.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRecursiveUnionImplicit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRepeatedNullable.json b/test/schemas/llm.schema/llama/ArrayRepeatedNullable.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRepeatedNullable.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRepeatedRequired.json b/test/schemas/llm.schema/llama/ArrayRepeatedRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRepeatedRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayRepeatedUnion.json b/test/schemas/llm.schema/llama/ArrayRepeatedUnion.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayRepeatedUnion.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArraySimple.json b/test/schemas/llm.schema/llama/ArraySimple.json new file mode 100644 index 0000000000..442ef4ec78 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArraySimple.json @@ -0,0 +1,41 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "hobbies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "rank": { + "type": "number" + } + }, + "required": [ + "name", + "body", + "rank" + ] + } + } + }, + "required": [ + "name", + "email", + "hobbies" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ArrayUnion.json b/test/schemas/llm.schema/llama/ArrayUnion.json new file mode 100644 index 0000000000..8b132d9c46 --- /dev/null +++ b/test/schemas/llm.schema/llama/ArrayUnion.json @@ -0,0 +1,25 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "boolean" + } + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/AtomicUnion.json b/test/schemas/llm.schema/llama/AtomicUnion.json new file mode 100644 index 0000000000..a5ed788285 --- /dev/null +++ b/test/schemas/llm.schema/llama/AtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ClassGetter.json b/test/schemas/llm.schema/llama/ClassGetter.json new file mode 100644 index 0000000000..2e100c350a --- /dev/null +++ b/test/schemas/llm.schema/llama/ClassGetter.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "name", + "dead" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ClassMethod.json b/test/schemas/llm.schema/llama/ClassMethod.json new file mode 100644 index 0000000000..97f1e16a0e --- /dev/null +++ b/test/schemas/llm.schema/llama/ClassMethod.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ClassPropertyAssignment.json b/test/schemas/llm.schema/llama/ClassPropertyAssignment.json new file mode 100644 index 0000000000..a080dafc7d --- /dev/null +++ b/test/schemas/llm.schema/llama/ClassPropertyAssignment.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "note": { + "const": "assignment" + }, + "editable": { + "const": false + }, + "incremental": { + "type": "boolean" + } + }, + "required": [ + "id", + "name", + "note", + "editable", + "incremental" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagArray.json b/test/schemas/llm.schema/llama/CommentTagArray.json new file mode 100644 index 0000000000..02717ca4b6 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagArray.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagArrayUnion.json b/test/schemas/llm.schema/llama/CommentTagArrayUnion.json new file mode 100644 index 0000000000..3977d0b338 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagArrayUnion.json @@ -0,0 +1,51 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number" + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagAtomicUnion.json b/test/schemas/llm.schema/llama/CommentTagAtomicUnion.json new file mode 100644 index 0000000000..678bd0ebf7 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagAtomicUnion.json @@ -0,0 +1,32 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagDefault.json b/test/schemas/llm.schema/llama/CommentTagDefault.json new file mode 100644 index 0000000000..c08b918b05 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagDefault.json @@ -0,0 +1,120 @@ +{ + "type": "object", + "properties": { + "boolean": { + "title": "Default tag on `boolean` typed value", + "description": "Default tag on `boolean` typed value.", + "type": "boolean" + }, + "number": { + "title": "Default tag on `number` typed value", + "description": "Default tag on `number` typed value.", + "type": "number" + }, + "string": { + "title": "Default tag on `string` typed value", + "description": "Default tag on `string` typed value.", + "type": "string" + }, + "text": { + "title": "Default tag on `string` typed value with long characters", + "description": "Default tag on `string` typed value with long characters.", + "type": "string" + }, + "boolean_and_number_and_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "vulnerable_range": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "type": "number", + "minimum": 3, + "maximum": 5 + }, + "boolean_and_number_and_template": { + "title": "Default value on union typed property", + "description": "Default value on union typed property.", + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "vulnerable_range", + "boolean_and_number_and_template" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagFormat.json b/test/schemas/llm.schema/llama/CommentTagFormat.json new file mode 100644 index 0000000000..08cc786259 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagLength.json b/test/schemas/llm.schema/llama/CommentTagLength.json new file mode 100644 index 0000000000..89566bad51 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagLength.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagObjectUnion.json b/test/schemas/llm.schema/llama/CommentTagObjectUnion.json new file mode 100644 index 0000000000..2f27b4791d --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagObjectUnion.json @@ -0,0 +1,32 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagPattern.json b/test/schemas/llm.schema/llama/CommentTagPattern.json new file mode 100644 index 0000000000..726c05d109 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagRange.json b/test/schemas/llm.schema/llama/CommentTagRange.json new file mode 100644 index 0000000000..8ef35191dc --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagRange.json @@ -0,0 +1,74 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/CommentTagType.json b/test/schemas/llm.schema/llama/CommentTagType.json new file mode 100644 index 0000000000..afa02a0ba0 --- /dev/null +++ b/test/schemas/llm.schema/llama/CommentTagType.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "title": "Integer value", + "description": "Integer value.", + "type": "integer" + }, + "uint": { + "title": "Unsigned integer value", + "description": "Unsigned integer value.", + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ConstantAtomicAbsorbed.json b/test/schemas/llm.schema/llama/ConstantAtomicAbsorbed.json new file mode 100644 index 0000000000..258b28561f --- /dev/null +++ b/test/schemas/llm.schema/llama/ConstantAtomicAbsorbed.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "default": "something" + }, + "age": { + "type": "number", + "default": 20 + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ConstantAtomicTagged.json b/test/schemas/llm.schema/llama/ConstantAtomicTagged.json new file mode 100644 index 0000000000..26a46307ab --- /dev/null +++ b/test/schemas/llm.schema/llama/ConstantAtomicTagged.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "const": "latest" + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "age": { + "oneOf": [ + { + "const": -1 + }, + { + "type": "integer", + "maximum": 100 + } + ] + } + }, + "required": [ + "id", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ConstantAtomicUnion.json b/test/schemas/llm.schema/llama/ConstantAtomicUnion.json new file mode 100644 index 0000000000..7501e84eca --- /dev/null +++ b/test/schemas/llm.schema/llama/ConstantAtomicUnion.json @@ -0,0 +1,33 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": false + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "three" + }, + { + "const": "four" + }, + { + "type": "object", + "properties": { + "key": { + "const": "key" + } + }, + "required": [ + "key" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ConstantConstEnumeration.json b/test/schemas/llm.schema/llama/ConstantConstEnumeration.json new file mode 100644 index 0000000000..1fa9ddcd96 --- /dev/null +++ b/test/schemas/llm.schema/llama/ConstantConstEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ConstantEnumeration.json b/test/schemas/llm.schema/llama/ConstantEnumeration.json new file mode 100644 index 0000000000..1fa9ddcd96 --- /dev/null +++ b/test/schemas/llm.schema/llama/ConstantEnumeration.json @@ -0,0 +1,22 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "const": 0 + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "Three" + }, + { + "const": "Four" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicArray.json b/test/schemas/llm.schema/llama/DynamicArray.json new file mode 100644 index 0000000000..f76fd117e5 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicArray.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicComposite.json b/test/schemas/llm.schema/llama/DynamicComposite.json new file mode 100644 index 0000000000..2bd79fa6b3 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicComposite.json @@ -0,0 +1,28 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicConstant.json b/test/schemas/llm.schema/llama/DynamicConstant.json new file mode 100644 index 0000000000..1595a33697 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicConstant.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "a": { + "type": "number" + }, + "b": { + "type": "number" + }, + "c": { + "type": "number" + }, + "d": { + "type": "number" + } + }, + "required": [ + "a", + "b", + "c", + "d" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicEnumeration.json b/test/schemas/llm.schema/llama/DynamicEnumeration.json new file mode 100644 index 0000000000..27eb8a9b61 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicEnumeration.json @@ -0,0 +1,55 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "ar": { + "type": "string" + }, + "zh-Hans": { + "type": "string" + }, + "zh-Hant": { + "type": "string" + }, + "en": { + "type": "string" + }, + "fr": { + "type": "string" + }, + "de": { + "type": "string" + }, + "ja": { + "type": "string" + }, + "ko": { + "type": "string" + }, + "pt": { + "type": "string" + }, + "ru": { + "type": "string" + } + }, + "required": [ + "ar", + "zh-Hans", + "zh-Hant", + "en", + "fr", + "de", + "ja", + "ko", + "pt", + "ru" + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicNever.json b/test/schemas/llm.schema/llama/DynamicNever.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicNever.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicSimple.json b/test/schemas/llm.schema/llama/DynamicSimple.json new file mode 100644 index 0000000000..3ecfaa3493 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicSimple.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "type": "number" + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicTemplate.json b/test/schemas/llm.schema/llama/DynamicTemplate.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicTemplate.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicTree.json b/test/schemas/llm.schema/llama/DynamicTree.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicTree.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicUndefined.json b/test/schemas/llm.schema/llama/DynamicUndefined.json new file mode 100644 index 0000000000..23dcd4be45 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicUndefined.json @@ -0,0 +1,5 @@ +{ + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/DynamicUnion.json b/test/schemas/llm.schema/llama/DynamicUnion.json new file mode 100644 index 0000000000..fa10bb7562 --- /dev/null +++ b/test/schemas/llm.schema/llama/DynamicUnion.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectAlias.json b/test/schemas/llm.schema/llama/ObjectAlias.json new file mode 100644 index 0000000000..03964d1ac9 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectAlias.json @@ -0,0 +1,71 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sex": { + "oneOf": [ + { + "type": "null" + }, + { + "const": 1 + }, + { + "const": 2 + }, + { + "const": "male" + }, + { + "const": "female" + } + ] + }, + "age": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "dead": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "id", + "email", + "name", + "sex", + "age", + "dead" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectDate.json b/test/schemas/llm.schema/llama/ObjectDate.json new file mode 100644 index 0000000000..71c2fc6305 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectDate.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "classDate": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "date": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "datetime": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "time": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "time" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "duration" + } + ] + } + }, + "required": [ + "classDate", + "date", + "datetime", + "time", + "duration" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectDescription.json b/test/schemas/llm.schema/llama/ObjectDescription.json new file mode 100644 index 0000000000..4d09bd5808 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectDescription.json @@ -0,0 +1,43 @@ +{ + "title": "This is the title of object type", + "description": "An interface designed to test JSON schema's object description.", + "type": "object", + "properties": { + "id": { + "title": "Primary Key", + "description": "Primary Key.", + "type": "string", + "format": "uuid" + }, + "deprecated": { + "title": "Deprecated property", + "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam.", + "type": "boolean", + "deprecated": true + }, + "title": { + "title": "This is the title", + "description": "Title tag can replace the first line of the comment.", + "type": "string" + }, + "descriptions": { + "title": "Description property", + "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written.", + "type": "array", + "items": { + "type": "string" + } + }, + "newLine": { + "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.", + "type": "number" + } + }, + "required": [ + "id", + "deprecated", + "title", + "descriptions", + "newLine" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectDynamic.json b/test/schemas/llm.schema/llama/ObjectDynamic.json new file mode 100644 index 0000000000..41f9bdeeeb --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectDynamic.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectGenericAlias.json b/test/schemas/llm.schema/llama/ObjectGenericAlias.json new file mode 100644 index 0000000000..18d298ead1 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectGenericAlias.json @@ -0,0 +1,11 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectGenericArray.json b/test/schemas/llm.schema/llama/ObjectGenericArray.json new file mode 100644 index 0000000000..f6c6a35aa5 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectGenericArray.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "number" + }, + "limit": { + "type": "number" + }, + "total_count": { + "type": "number" + }, + "total_pages": { + "type": "number" + } + }, + "required": [ + "page", + "limit", + "total_count", + "total_pages" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "name", + "age" + ] + } + } + }, + "required": [ + "pagination", + "data" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectGenericUnion.json b/test/schemas/llm.schema/llama/ObjectGenericUnion.json new file mode 100644 index 0000000000..01b157c1e6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectGenericUnion.json @@ -0,0 +1,344 @@ +{ + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + }, + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "answer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "hit", + "contents", + "created_at" + ] + } + ] + }, + "id": { + "type": "string" + }, + "hit": { + "type": "number" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "score": { + "type": "number" + }, + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "extension", + "url" + ] + } + } + }, + "required": [ + "score", + "id", + "created_at", + "title", + "body", + "files" + ] + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "writer", + "answer", + "id", + "hit", + "contents", + "created_at" + ] + } + ] + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectInternal.json b/test/schemas/llm.schema/llama/ObjectInternal.json new file mode 100644 index 0000000000..7dc4990cb7 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectInternal.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectIntersection.json b/test/schemas/llm.schema/llama/ObjectIntersection.json new file mode 100644 index 0000000000..d70f237e86 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectIntersection.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vulnerable": { + "type": "boolean" + } + }, + "required": [ + "email", + "name", + "vulnerable" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectJsonTag.json b/test/schemas/llm.schema/llama/ObjectJsonTag.json new file mode 100644 index 0000000000..b245ce4314 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectJsonTag.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "vulnerable": { + "type": "string", + "deprecated": true + }, + "description": { + "title": "Descripted property", + "description": "Descripted property.", + "type": "string" + }, + "title": { + "title": "something", + "description": "Titled property.", + "type": "string" + }, + "complicate_title": { + "title": "something weirdo with {@link something } tag", + "description": "Complicate title.", + "type": "string" + } + }, + "required": [ + "vulnerable", + "description", + "title", + "complicate_title" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectLiteralProperty.json b/test/schemas/llm.schema/llama/ObjectLiteralProperty.json new file mode 100644 index 0000000000..3b3771043d --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectLiteralProperty.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "something-interesting-do-you-want?": { + "type": "string" + }, + "or-something-crazy-do-you-want?": { + "type": "string" + } + }, + "required": [ + "something-interesting-do-you-want?", + "or-something-crazy-do-you-want?" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectLiteralType.json b/test/schemas/llm.schema/llama/ObjectLiteralType.json new file mode 100644 index 0000000000..1a21bd5c4a --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectLiteralType.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "age": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "age" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectNullable.json b/test/schemas/llm.schema/llama/ObjectNullable.json new file mode 100644 index 0000000000..d1c234353c --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectNullable.json @@ -0,0 +1,99 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "manufacturer": { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "brand": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + }, + "similar": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "type": { + "const": "brand" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + { + "type": "object", + "properties": { + "type": { + "const": "manufacturer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + } + ] + } + }, + "required": [ + "name", + "manufacturer", + "brand", + "similar" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectOptional.json b/test/schemas/llm.schema/llama/ObjectOptional.json new file mode 100644 index 0000000000..ad68b72c24 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectOptional.json @@ -0,0 +1,23 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sequence": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "email", + "sequence" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectPartial.json b/test/schemas/llm.schema/llama/ObjectPartial.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectPartial.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectPartialAndRequired.json b/test/schemas/llm.schema/llama/ObjectPartialAndRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectPartialAndRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectPrimitive.json b/test/schemas/llm.schema/llama/ObjectPrimitive.json new file mode 100644 index 0000000000..a3a2c982e4 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectPrimitive.json @@ -0,0 +1,72 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "extension": { + "oneOf": [ + { + "const": "txt" + }, + { + "const": "md" + }, + { + "const": "html" + } + ] + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "url": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "extension", + "url", + "created_at" + ] + } + }, + "secret": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "extension", + "title", + "body", + "files", + "secret", + "created_at" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectRecursive.json b/test/schemas/llm.schema/llama/ObjectRecursive.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectRecursive.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectRequired.json b/test/schemas/llm.schema/llama/ObjectRequired.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectRequired.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectSimple.json b/test/schemas/llm.schema/llama/ObjectSimple.json new file mode 100644 index 0000000000..67548a8ed8 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectSimple.json @@ -0,0 +1,87 @@ +{ + "type": "object", + "properties": { + "scale": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "rotate": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + }, + "pivot": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ] + } + }, + "required": [ + "scale", + "position", + "rotate", + "pivot" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUndefined.json b/test/schemas/llm.schema/llama/ObjectUndefined.json new file mode 100644 index 0000000000..c7c6460e04 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUndefined.json @@ -0,0 +1,47 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "professor": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "classroom": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "grade": { + "type": "number" + }, + "unknown": {} + }, + "required": [ + "name", + "professor", + "classroom", + "grade", + "unknown" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionComposite.json b/test/schemas/llm.schema/llama/ObjectUnionComposite.json new file mode 100644 index 0000000000..0a9b9c1dba --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionComposite.json @@ -0,0 +1,346 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionCompositePointer.json b/test/schemas/llm.schema/llama/ObjectUnionCompositePointer.json new file mode 100644 index 0000000000..7b2c95593f --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionCompositePointer.json @@ -0,0 +1,362 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "inner": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + } + }, + "required": [ + "outer", + "inner" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + } + }, + "required": [ + "centroid", + "radius" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionDouble.json b/test/schemas/llm.schema/llama/ObjectUnionDouble.json new file mode 100644 index 0000000000..d1bdb109e4 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionDouble.json @@ -0,0 +1,134 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "number" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "number" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "boolean" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "x": { + "type": "string" + } + }, + "required": [ + "x" + ] + }, + "child": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "y": { + "type": "string" + } + }, + "required": [ + "y" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value", + "child" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionExplicit.json b/test/schemas/llm.schema/llama/ObjectUnionExplicit.json new file mode 100644 index 0000000000..ff2b506ef9 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionExplicit.json @@ -0,0 +1,332 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionExplicitPointer.json b/test/schemas/llm.schema/llama/ObjectUnionExplicitPointer.json new file mode 100644 index 0000000000..12dc3b6c29 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionExplicitPointer.json @@ -0,0 +1,348 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "type": { + "const": "point" + } + }, + "required": [ + "x", + "y", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "line" + } + }, + "required": [ + "p1", + "p2", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "triangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "type" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "type": { + "const": "rectangle" + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "type" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + }, + "type": { + "const": "polyline" + } + }, + "required": [ + "points", + "type" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + } + } + }, + "required": [ + "points" + ] + } + }, + "type": { + "const": "polygon" + } + }, + "required": [ + "outer", + "inner", + "type" + ] + }, + { + "type": "object", + "properties": { + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "x", + "y" + ] + }, + "radius": { + "type": "number" + }, + "type": { + "const": "circle" + } + }, + "required": [ + "centroid", + "radius", + "type" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionImplicit.json b/test/schemas/llm.schema/llama/ObjectUnionImplicit.json new file mode 100644 index 0000000000..7a11552c16 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionImplicit.json @@ -0,0 +1,601 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "distance": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "width", + "distance" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "p1": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p2": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p3": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "p4": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "width": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "height": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "p1", + "p2", + "p3", + "p4", + "width", + "height", + "area" + ] + }, + { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + { + "type": "object", + "properties": { + "outer": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + }, + "inner": { + "type": "array", + "items": { + "type": "object", + "properties": { + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + } + }, + "length": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "points", + "length" + ] + } + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "outer", + "inner", + "area" + ] + }, + { + "type": "object", + "properties": { + "radius": { + "type": "number" + }, + "centroid": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "slope": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "x", + "y", + "slope" + ] + }, + "area": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "radius", + "centroid", + "area" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ObjectUnionNonPredictable.json b/test/schemas/llm.schema/llama/ObjectUnionNonPredictable.json new file mode 100644 index 0000000000..fa6b443d37 --- /dev/null +++ b/test/schemas/llm.schema/llama/ObjectUnionNonPredictable.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "number" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + ] + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TemplateAtomic.json b/test/schemas/llm.schema/llama/TemplateAtomic.json new file mode 100644 index 0000000000..c1660b8945 --- /dev/null +++ b/test/schemas/llm.schema/llama/TemplateAtomic.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + "postfix": { + "type": "string", + "pattern": "((.*)_postfix)$" + }, + "middle_string": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_string_empty": { + "type": "string", + "pattern": "^(the_(.*)_value)$" + }, + "middle_numeric": { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + "middle_boolean": { + "oneOf": [ + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "ipv4": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "email": { + "type": "string", + "pattern": "((.*)@(.*)\\.(.*))" + } + }, + "required": [ + "prefix", + "postfix", + "middle_string", + "middle_string_empty", + "middle_numeric", + "middle_boolean", + "ipv4", + "email" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TemplateConstant.json b/test/schemas/llm.schema/llama/TemplateConstant.json new file mode 100644 index 0000000000..8b4b7ec391 --- /dev/null +++ b/test/schemas/llm.schema/llama/TemplateConstant.json @@ -0,0 +1,78 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "oneOf": [ + { + "const": "prefix_A" + }, + { + "const": "prefix_B" + }, + { + "const": "prefix_C" + } + ] + }, + "postfix": { + "oneOf": [ + { + "const": "1_postfix" + }, + { + "const": "2_postfix" + }, + { + "const": "3_postfix" + } + ] + }, + "combined": { + "oneOf": [ + { + "const": "the_1_value_with_label_A" + }, + { + "const": "the_1_value_with_label_B" + }, + { + "const": "the_1_value_with_label_C" + }, + { + "const": "the_2_value_with_label_A" + }, + { + "const": "the_2_value_with_label_B" + }, + { + "const": "the_2_value_with_label_C" + }, + { + "const": "the_3_value_with_label_A" + }, + { + "const": "the_3_value_with_label_B" + }, + { + "const": "the_3_value_with_label_C" + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "combined" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TemplateUnion.json b/test/schemas/llm.schema/llama/TemplateUnion.json new file mode 100644 index 0000000000..f64a7f0470 --- /dev/null +++ b/test/schemas/llm.schema/llama/TemplateUnion.json @@ -0,0 +1,75 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" + }, + "postfix": { + "type": "string", + "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" + }, + "middle": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_false_value" + }, + { + "const": "the_true_value" + } + ] + }, + "mixed": { + "oneOf": [ + { + "type": "string", + "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" + }, + { + "const": "the_A_value" + }, + { + "const": "the_B_value" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + } + }, + "required": [ + "prefix", + "postfix", + "middle", + "mixed" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ToJsonAtomicUnion.json b/test/schemas/llm.schema/llama/ToJsonAtomicUnion.json new file mode 100644 index 0000000000..a5ed788285 --- /dev/null +++ b/test/schemas/llm.schema/llama/ToJsonAtomicUnion.json @@ -0,0 +1,19 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ToJsonDouble.json b/test/schemas/llm.schema/llama/ToJsonDouble.json new file mode 100644 index 0000000000..da3e14052b --- /dev/null +++ b/test/schemas/llm.schema/llama/ToJsonDouble.json @@ -0,0 +1,15 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "flag": { + "type": "boolean" + } + }, + "required": [ + "id", + "flag" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ToJsonNull.json b/test/schemas/llm.schema/llama/ToJsonNull.json new file mode 100644 index 0000000000..743b3af495 --- /dev/null +++ b/test/schemas/llm.schema/llama/ToJsonNull.json @@ -0,0 +1,3 @@ +{ + "type": "null" +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/ToJsonUnion.json b/test/schemas/llm.schema/llama/ToJsonUnion.json new file mode 100644 index 0000000000..4a9c36ece2 --- /dev/null +++ b/test/schemas/llm.schema/llama/ToJsonUnion.json @@ -0,0 +1,73 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + }, + { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "manufacturer", + "brand", + "name" + ] + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "mobile": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "mobile", + "name" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagArray.json b/test/schemas/llm.schema/llama/TypeTagArray.json new file mode 100644 index 0000000000..c308c83995 --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagArray.json @@ -0,0 +1,66 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + }, + "equal": { + "type": "array", + "items": { + "type": "number", + "minimum": 10, + "maximum": 10 + }, + "minItems": 10, + "maxItems": 10 + }, + "unique": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "items", + "minItems", + "both", + "equal", + "unique" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagArrayUnion.json b/test/schemas/llm.schema/llama/TypeTagArrayUnion.json new file mode 100644 index 0000000000..54286f02ed --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagArrayUnion.json @@ -0,0 +1,56 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 3 + }, + "minItems": { + "type": "array", + "items": { + "type": "number", + "minimum": 3 + }, + "minItems": 3 + }, + "maxItems": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "maxLength": 7 + }, + { + "type": "number", + "maximum": 7 + } + ] + }, + "maxItems": 7 + }, + "both": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 3, + "maxItems": 7 + } + }, + "required": [ + "items", + "minItems", + "maxItems", + "both" + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagAtomicUnion.json b/test/schemas/llm.schema/llama/TypeTagAtomicUnion.json new file mode 100644 index 0000000000..678bd0ebf7 --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagAtomicUnion.json @@ -0,0 +1,32 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + { + "type": "number", + "minimum": 3 + } + ] + } + }, + "required": [ + "value" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagCustom.json b/test/schemas/llm.schema/llama/TypeTagCustom.json new file mode 100644 index 0000000000..097ed0035e --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagCustom.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "dollar": { + "x-typia-monetary": "dollar", + "type": "string" + }, + "postfix": { + "x-typia-postfix": "abcd", + "type": "string" + }, + "powerOf": { + "x-typia-powerOf": 2, + "type": "number" + } + }, + "required": [ + "id", + "dollar", + "postfix", + "powerOf" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagDefault.json b/test/schemas/llm.schema/llama/TypeTagDefault.json new file mode 100644 index 0000000000..844a308f6e --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagDefault.json @@ -0,0 +1,102 @@ +{ + "type": "object", + "properties": { + "boolean": { + "type": "boolean" + }, + "number": { + "type": "number", + "default": 1 + }, + "string": { + "type": "string", + "default": "two" + }, + "text": { + "type": "string", + "default": "Very long text, can you understand it?" + }, + "boolean_and_number_and_string": { + "oneOf": [ + { + "type": "number", + "default": 1 + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "union_but_boolean": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "union_but_number": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number", + "default": 1 + }, + { + "type": "boolean" + } + ] + }, + "union_but_string": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string", + "default": "two" + }, + { + "type": "boolean" + } + ] + }, + "boolean_and_number_and_template": { + "oneOf": [ + { + "type": "string", + "pattern": "^(prefix_(.*))" + }, + { + "type": "number", + "default": 2 + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "boolean", + "number", + "string", + "text", + "boolean_and_number_and_string", + "union_but_boolean", + "union_but_number", + "union_but_string", + "boolean_and_number_and_template" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagFormat.json b/test/schemas/llm.schema/llama/TypeTagFormat.json new file mode 100644 index 0000000000..08cc786259 --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagFormat.json @@ -0,0 +1,117 @@ +{ + "type": "object", + "properties": { + "byte": { + "type": "string", + "format": "byte" + }, + "password": { + "type": "string", + "format": "password" + }, + "regex": { + "type": "string", + "format": "regex" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "format": "email" + }, + "hostname": { + "type": "string", + "format": "hostname" + }, + "idnEmail": { + "type": "string", + "format": "idn-email" + }, + "idnHostname": { + "type": "string", + "format": "idn-hostname" + }, + "iri": { + "type": "string", + "format": "iri" + }, + "iriReference": { + "type": "string", + "format": "iri-reference" + }, + "ipv4": { + "type": "string", + "format": "ipv4" + }, + "ipv6": { + "type": "string", + "format": "ipv6" + }, + "uri": { + "type": "string", + "format": "uri" + }, + "uriReference": { + "type": "string", + "format": "uri-reference" + }, + "uriTemplate": { + "type": "string", + "format": "uri-template" + }, + "url": { + "type": "string", + "format": "url" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "time": { + "type": "string", + "format": "time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "jsonPointer": { + "type": "string", + "format": "json-pointer" + }, + "relativeJsonPointer": { + "type": "string", + "format": "relative-json-pointer" + } + }, + "required": [ + "byte", + "password", + "regex", + "uuid", + "email", + "hostname", + "idnEmail", + "idnHostname", + "iri", + "iriReference", + "ipv4", + "ipv6", + "uri", + "uriReference", + "uriTemplate", + "url", + "datetime", + "date", + "time", + "duration", + "jsonPointer", + "relativeJsonPointer" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagLength.json b/test/schemas/llm.schema/llama/TypeTagLength.json new file mode 100644 index 0000000000..89566bad51 --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagLength.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "fixed": { + "type": "string", + "minLength": 5, + "maxLength": 5 + }, + "minimum": { + "type": "string", + "minLength": 3 + }, + "maximum": { + "type": "string", + "maxLength": 7 + }, + "minimum_and_maximum": { + "type": "string", + "minLength": 3, + "maxLength": 7 + }, + "equal": { + "type": "string", + "minLength": 10, + "maxLength": 19 + } + }, + "required": [ + "fixed", + "minimum", + "maximum", + "minimum_and_maximum", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagMatrix.json b/test/schemas/llm.schema/llama/TypeTagMatrix.json new file mode 100644 index 0000000000..0ed4ca50e5 --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagMatrix.json @@ -0,0 +1,22 @@ +{ + "type": "object", + "properties": { + "matrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 4, + "maxItems": 4 + }, + "minItems": 3, + "maxItems": 3 + } + }, + "required": [ + "matrix" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagObjectUnion.json b/test/schemas/llm.schema/llama/TypeTagObjectUnion.json new file mode 100644 index 0000000000..2f27b4791d --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagObjectUnion.json @@ -0,0 +1,32 @@ +{ + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "value": { + "type": "number", + "minimum": 3 + } + }, + "required": [ + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "minLength": 3, + "maxLength": 7 + } + }, + "required": [ + "value" + ] + } + ] + } +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagPattern.json b/test/schemas/llm.schema/llama/TypeTagPattern.json new file mode 100644 index 0000000000..6c054bbde4 --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagPattern.json @@ -0,0 +1,27 @@ +{ + "type": "object", + "properties": { + "uuid": { + "type": "string", + "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" + }, + "email": { + "type": "string", + "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" + }, + "ipv4": { + "type": "string", + "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "ipv6": { + "type": "string", + "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]))$" + } + }, + "required": [ + "uuid", + "email", + "ipv4", + "ipv6" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagRange.json b/test/schemas/llm.schema/llama/TypeTagRange.json new file mode 100644 index 0000000000..8ef35191dc --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagRange.json @@ -0,0 +1,74 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "greater": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3 + }, + "greater_equal": { + "type": "integer", + "minimum": 3 + }, + "less": { + "type": "integer", + "exclusiveMaximum": true, + "maximum": 7 + }, + "less_equal": { + "type": "integer", + "maximum": 7 + }, + "greater_less": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_equal_less": { + "type": "integer", + "minimum": 3, + "exclusiveMaximum": true, + "maximum": 7 + }, + "greater_less_equal": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 3, + "maximum": 7 + }, + "greater_equal_less_equal": { + "type": "integer", + "minimum": 3, + "maximum": 7 + }, + "equal": { + "type": "integer", + "minimum": 10, + "maximum": 10 + } + }, + "required": [ + "greater", + "greater_equal", + "less", + "less_equal", + "greater_less", + "greater_equal_less", + "greater_less_equal", + "greater_equal_less_equal", + "equal" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm.schema/llama/TypeTagType.json b/test/schemas/llm.schema/llama/TypeTagType.json new file mode 100644 index 0000000000..e5bccc37bb --- /dev/null +++ b/test/schemas/llm.schema/llama/TypeTagType.json @@ -0,0 +1,46 @@ +{ + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "int": { + "type": "integer" + }, + "uint": { + "type": "integer" + }, + "int32": { + "type": "integer" + }, + "uint32": { + "type": "integer" + }, + "int64": { + "type": "integer" + }, + "uint64": { + "type": "integer" + }, + "float": { + "type": "number" + } + }, + "required": [ + "int", + "uint", + "int32", + "uint32", + "int64", + "uint64", + "float" + ] + } + } + }, + "required": [ + "value" + ] +} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayAtomicAlias.json b/test/schemas/llm/type/ArrayAtomicAlias.json deleted file mode 100644 index 69987ae2ea..0000000000 --- a/test/schemas/llm/type/ArrayAtomicAlias.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayAtomicSimple.json b/test/schemas/llm/type/ArrayAtomicSimple.json deleted file mode 100644 index 69987ae2ea..0000000000 --- a/test/schemas/llm/type/ArrayAtomicSimple.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ArrayRepeatedUnionWithTuple.json b/test/schemas/llm/type/ArrayRepeatedUnionWithTuple.json deleted file mode 100644 index f1f5a83f6b..0000000000 --- a/test/schemas/llm/type/ArrayRepeatedUnionWithTuple.json +++ /dev/null @@ -1,1014 +0,0 @@ -{ - "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/ArrayUnion.json b/test/schemas/llm/type/ArrayUnion.json deleted file mode 100644 index 6f1b0f65e8..0000000000 --- a/test/schemas/llm/type/ArrayUnion.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - } - ] - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/AtomicAlias.json b/test/schemas/llm/type/AtomicAlias.json deleted file mode 100644 index a9dc150cdd..0000000000 --- a/test/schemas/llm/type/AtomicAlias.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/AtomicClass.json b/test/schemas/llm/type/AtomicClass.json deleted file mode 100644 index 3fdc058a5a..0000000000 --- a/test/schemas/llm/type/AtomicClass.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "boolean" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "string" - }, - { - "type": "string" - } - ] - }, - "minItems": 9, - "maxItems": 9 -} \ No newline at end of file diff --git a/test/schemas/llm/type/AtomicIntersection.json b/test/schemas/llm/type/AtomicIntersection.json deleted file mode 100644 index a9dc150cdd..0000000000 --- a/test/schemas/llm/type/AtomicIntersection.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/AtomicSimple.json b/test/schemas/llm/type/AtomicSimple.json deleted file mode 100644 index a9dc150cdd..0000000000 --- a/test/schemas/llm/type/AtomicSimple.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagAtomicUnion.json b/test/schemas/llm/type/CommentTagAtomicUnion.json deleted file mode 100644 index 4d814e123d..0000000000 --- a/test/schemas/llm/type/CommentTagAtomicUnion.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - { - "type": "number", - "minimum": 3 - } - ] - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagDefault.json b/test/schemas/llm/type/CommentTagDefault.json deleted file mode 100644 index 222261f60d..0000000000 --- a/test/schemas/llm/type/CommentTagDefault.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "type": "object", - "properties": { - "boolean": { - "type": "boolean", - "title": "Default tag on `boolean` typed value", - "description": "Default tag on `boolean` typed value." - }, - "number": { - "type": "number", - "title": "Default tag on `number` typed value", - "description": "Default tag on `number` typed value." - }, - "string": { - "type": "string", - "title": "Default tag on `string` typed value", - "description": "Default tag on `string` typed value." - }, - "text": { - "type": "string", - "title": "Default tag on `string` typed value with long characters", - "description": "Default tag on `string` typed value with long characters." - }, - "boolean_and_number_and_string": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "union_but_boolean": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "union_but_number": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "union_but_string": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "vulnerable_range": { - "type": "number", - "minimum": 3, - "maximum": 5, - "title": "Default value on union typed property", - "description": "Default value on union typed property." - }, - "boolean_and_number_and_template": { - "oneOf": [ - { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - }, - "required": [ - "boolean", - "number", - "string", - "text", - "boolean_and_number_and_string", - "union_but_boolean", - "union_but_number", - "union_but_string", - "vulnerable_range", - "boolean_and_number_and_template" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagFormat.json b/test/schemas/llm/type/CommentTagFormat.json deleted file mode 100644 index 3822e1a6bd..0000000000 --- a/test/schemas/llm/type/CommentTagFormat.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "type": "object", - "properties": { - "byte": { - "type": "string", - "format": "byte" - }, - "password": { - "type": "string", - "format": "password" - }, - "regex": { - "type": "string", - "format": "regex" - }, - "uuid": { - "type": "string", - "format": "uuid" - }, - "email": { - "type": "string", - "format": "email" - }, - "hostname": { - "type": "string", - "format": "hostname" - }, - "idnEmail": { - "type": "string", - "format": "idn-email" - }, - "idnHostname": { - "type": "string", - "format": "idn-hostname" - }, - "iri": { - "type": "string", - "format": "iri" - }, - "iriReference": { - "type": "string", - "format": "iri-reference" - }, - "ipv4": { - "type": "string", - "format": "ipv4" - }, - "ipv6": { - "type": "string", - "format": "ipv6" - }, - "uri": { - "type": "string", - "format": "uri" - }, - "uriReference": { - "type": "string", - "format": "uri-reference" - }, - "uriTemplate": { - "type": "string", - "format": "uri-template" - }, - "url": { - "type": "string", - "format": "url" - }, - "datetime": { - "type": "string", - "format": "date-time" - }, - "date": { - "type": "string", - "format": "date" - }, - "time": { - "type": "string", - "format": "time" - }, - "duration": { - "type": "string", - "format": "duration" - }, - "jsonPointer": { - "type": "string", - "format": "json-pointer" - }, - "relativeJsonPointer": { - "type": "string", - "format": "relative-json-pointer" - } - }, - "required": [ - "byte", - "password", - "regex", - "uuid", - "email", - "hostname", - "idnEmail", - "idnHostname", - "iri", - "iriReference", - "ipv4", - "ipv6", - "uri", - "uriReference", - "uriTemplate", - "url", - "datetime", - "date", - "time", - "duration", - "jsonPointer", - "relativeJsonPointer" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagLength.json b/test/schemas/llm/type/CommentTagLength.json deleted file mode 100644 index 79018d4b80..0000000000 --- a/test/schemas/llm/type/CommentTagLength.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "fixed": { - "type": "string", - "minLength": 5, - "maxLength": 5 - }, - "minimum": { - "type": "string", - "minLength": 3 - }, - "maximum": { - "type": "string", - "maxLength": 7 - }, - "minimum_and_maximum": { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - "equal": { - "type": "string", - "minLength": 10, - "maxLength": 19 - } - }, - "required": [ - "fixed", - "minimum", - "maximum", - "minimum_and_maximum", - "equal" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagObjectUnion.json b/test/schemas/llm/type/CommentTagObjectUnion.json deleted file mode 100644 index ec0ecdcc99..0000000000 --- a/test/schemas/llm/type/CommentTagObjectUnion.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "value": { - "type": "number", - "minimum": 3 - } - }, - "required": [ - "value" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "string", - "minLength": 3, - "maxLength": 7 - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - ] - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagPattern.json b/test/schemas/llm/type/CommentTagPattern.json deleted file mode 100644 index fb2e985935..0000000000 --- a/test/schemas/llm/type/CommentTagPattern.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "object", - "properties": { - "uuid": { - "type": "string", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[4][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" - }, - "email": { - "type": "string", - "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" - }, - "ipv4": { - "type": "string", - "pattern": "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" - }, - "ipv6": { - "type": "string", - "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]))$" - } - }, - "required": [ - "uuid", - "email", - "ipv4", - "ipv6" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/CommentTagRange.json b/test/schemas/llm/type/CommentTagRange.json deleted file mode 100644 index f81fad64de..0000000000 --- a/test/schemas/llm/type/CommentTagRange.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "greater": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3 - }, - "greater_equal": { - "type": "integer", - "minimum": 3 - }, - "less": { - "type": "integer", - "exclusiveMaximum": true, - "maximum": 7 - }, - "less_equal": { - "type": "integer", - "maximum": 7 - }, - "greater_less": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_equal_less": { - "type": "integer", - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_less_equal": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "maximum": 7 - }, - "greater_equal_less_equal": { - "type": "integer", - "minimum": 3, - "maximum": 7 - }, - "equal": { - "type": "integer", - "minimum": 10, - "maximum": 10 - } - }, - "required": [ - "greater", - "greater_equal", - "less", - "less_equal", - "greater_less", - "greater_equal_less", - "greater_less_equal", - "greater_equal_less_equal", - "equal" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ConstantAtomicAbsorbed.json b/test/schemas/llm/type/ConstantAtomicAbsorbed.json deleted file mode 100644 index f68ef2131d..0000000000 --- a/test/schemas/llm/type/ConstantAtomicAbsorbed.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "type": "string", - "default": "something" - }, - "age": { - "type": "number", - "default": 20 - } - }, - "required": [ - "id", - "age" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ConstantAtomicSimple.json b/test/schemas/llm/type/ConstantAtomicSimple.json deleted file mode 100644 index 031d320b2c..0000000000 --- a/test/schemas/llm/type/ConstantAtomicSimple.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "enum": [ - false, - true - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "string", - "enum": [ - "three" - ] - } - ] - }, - "minItems": 4, - "maxItems": 4 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ConstantAtomicTagged.json b/test/schemas/llm/type/ConstantAtomicTagged.json deleted file mode 100644 index 1f07983818..0000000000 --- a/test/schemas/llm/type/ConstantAtomicTagged.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "enum": [ - "latest" - ] - }, - "age": { - "oneOf": [ - { - "type": "integer", - "maximum": 100 - }, - { - "type": "number", - "enum": [ - -1 - ] - } - ] - } - }, - "required": [ - "id", - "age" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ConstantAtomicWrapper.json b/test/schemas/llm/type/ConstantAtomicWrapper.json deleted file mode 100644 index 40280bd787..0000000000 --- a/test/schemas/llm/type/ConstantAtomicWrapper.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "value": { - "type": "boolean" - } - }, - "required": [ - "value" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "number" - } - }, - "required": [ - "value" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ConstantIntersection.json b/test/schemas/llm/type/ConstantIntersection.json deleted file mode 100644 index 9613f21097..0000000000 --- a/test/schemas/llm/type/ConstantIntersection.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "enum": [ - false - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "string", - "enum": [ - "two" - ] - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicArray.json b/test/schemas/llm/type/DynamicArray.json deleted file mode 100644 index 812b3a514c..0000000000 --- a/test/schemas/llm/type/DynamicArray.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {}, - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicEnumeration.json b/test/schemas/llm/type/DynamicEnumeration.json deleted file mode 100644 index c2922e86e2..0000000000 --- a/test/schemas/llm/type/DynamicEnumeration.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "ar": { - "type": "string" - }, - "zh-Hans": { - "type": "string" - }, - "zh-Hant": { - "type": "string" - }, - "en": { - "type": "string" - }, - "fr": { - "type": "string" - }, - "de": { - "type": "string" - }, - "ja": { - "type": "string" - }, - "ko": { - "type": "string" - }, - "pt": { - "type": "string" - }, - "ru": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicNever.json b/test/schemas/llm/type/DynamicNever.json deleted file mode 100644 index 489a1b629f..0000000000 --- a/test/schemas/llm/type/DynamicNever.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicSimple.json b/test/schemas/llm/type/DynamicSimple.json deleted file mode 100644 index 85df503c55..0000000000 --- a/test/schemas/llm/type/DynamicSimple.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {}, - "additionalProperties": { - "type": "number" - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicTemplate.json b/test/schemas/llm/type/DynamicTemplate.json deleted file mode 100644 index 2775fa6af7..0000000000 --- a/test/schemas/llm/type/DynamicTemplate.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "object", - "properties": {}, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicTree.json b/test/schemas/llm/type/DynamicTree.json deleted file mode 100644 index fe3e2906aa..0000000000 --- a/test/schemas/llm/type/DynamicTree.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "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 deleted file mode 100644 index 489a1b629f..0000000000 --- a/test/schemas/llm/type/DynamicUndefined.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/DynamicUnion.json b/test/schemas/llm/type/DynamicUnion.json deleted file mode 100644 index 67d7443a86..0000000000 --- a/test/schemas/llm/type/DynamicUnion.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "object", - "properties": {}, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectDate.json b/test/schemas/llm/type/ObjectDate.json deleted file mode 100644 index fb19e12abf..0000000000 --- a/test/schemas/llm/type/ObjectDate.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "type": "object", - "properties": { - "classDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "date": { - "type": "string", - "format": "date", - "nullable": true - }, - "datetime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "time": { - "type": "string", - "format": "time", - "nullable": true - }, - "duration": { - "type": "string", - "format": "duration", - "nullable": true - } - }, - "required": [ - "date", - "datetime", - "time", - "duration" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectDescription.json b/test/schemas/llm/type/ObjectDescription.json deleted file mode 100644 index 8b23dbd652..0000000000 --- a/test/schemas/llm/type/ObjectDescription.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "deprecated": { - "type": "boolean", - "title": "Deprecated property", - "description": "Deprecated property.\n\nIf `@deprecated` comment tag being utilized, the property will be marked\nas deprecated in the JSON scheam." - }, - "title": { - "type": "string", - "title": "This is the title", - "description": "Title tag can replace the first line of the comment." - }, - "descriptions": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Description property", - "description": "Description property.\n\nIf you write first line and the first line ends with \".\" character,\nit would be considered as the title. By the way, description does\nnot exclusive the title, so that full content be written." - }, - "newLine": { - "type": "number", - "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." - } - }, - "required": [ - "id", - "deprecated", - "title", - "descriptions", - "newLine" - ], - "title": "This is the title of object type", - "description": "An interface designed to test JSON schema's object description.", - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectDynamic.json b/test/schemas/llm/type/ObjectDynamic.json deleted file mode 100644 index 2775fa6af7..0000000000 --- a/test/schemas/llm/type/ObjectDynamic.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "object", - "properties": {}, - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectGeneric.json b/test/schemas/llm/type/ObjectGeneric.json deleted file mode 100644 index cddbd97bbb..0000000000 --- a/test/schemas/llm/type/ObjectGeneric.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "value": { - "type": "boolean" - }, - "child": { - "type": "object", - "properties": { - "child_value": { - "type": "boolean" - }, - "child_next": { - "type": "boolean" - } - }, - "required": [ - "child_value", - "child_next" - ], - "additionalProperties": false - }, - "elements": { - "type": "array", - "items": { - "type": "object", - "properties": { - "child_value": { - "type": "boolean" - }, - "child_next": { - "type": "boolean" - } - }, - "required": [ - "child_value", - "child_next" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value", - "child", - "elements" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "number" - }, - "child": { - "type": "object", - "properties": { - "child_value": { - "type": "number" - }, - "child_next": { - "type": "number" - } - }, - "required": [ - "child_value", - "child_next" - ], - "additionalProperties": false - }, - "elements": { - "type": "array", - "items": { - "type": "object", - "properties": { - "child_value": { - "type": "number" - }, - "child_next": { - "type": "number" - } - }, - "required": [ - "child_value", - "child_next" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value", - "child", - "elements" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "child": { - "type": "object", - "properties": { - "child_value": { - "type": "string" - }, - "child_next": { - "type": "string" - } - }, - "required": [ - "child_value", - "child_next" - ], - "additionalProperties": false - }, - "elements": { - "type": "array", - "items": { - "type": "object", - "properties": { - "child_value": { - "type": "string" - }, - "child_next": { - "type": "string" - } - }, - "required": [ - "child_value", - "child_next" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value", - "child", - "elements" - ], - "additionalProperties": false - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectHierarchical.json b/test/schemas/llm/type/ObjectHierarchical.json deleted file mode 100644 index 9c9c70d17d..0000000000 --- a/test/schemas/llm/type/ObjectHierarchical.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "channel": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" - }, - "sequence": { - "type": "number" - }, - "exclusive": { - "type": "boolean" - }, - "priority": { - "type": "number" - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "code", - "name", - "sequence", - "exclusive", - "priority", - "created_at" - ], - "additionalProperties": false - }, - "member": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "account": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "code", - "created_at" - ], - "additionalProperties": false - }, - "enterprise": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "account": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "code", - "created_at" - ], - "additionalProperties": false - }, - "name": { - "type": "string" - }, - "grade": { - "type": "number" - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "account", - "name", - "grade", - "created_at" - ], - "additionalProperties": false, - "nullable": true - }, - "emails": { - "type": "array", - "items": { - "type": "string" - } - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - }, - "authorized": { - "type": "boolean" - } - }, - "required": [ - "id", - "account", - "enterprise", - "emails", - "created_at", - "authorized" - ], - "additionalProperties": false, - "nullable": true - }, - "account": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "code": { - "type": "string" - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "code", - "created_at" - ], - "additionalProperties": false, - "nullable": true - }, - "href": { - "type": "string" - }, - "referrer": { - "type": "string" - }, - "ip": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "minItems": 4, - "maxItems": 4 - }, - "created_at": { - "type": "object", - "properties": { - "time": { - "type": "number" - }, - "zone": { - "type": "number" - } - }, - "required": [ - "time", - "zone" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "channel", - "member", - "account", - "href", - "referrer", - "ip", - "created_at" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectOptional.json b/test/schemas/llm/type/ObjectOptional.json deleted file mode 100644 index c6312f9350..0000000000 --- a/test/schemas/llm/type/ObjectOptional.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sequence": { - "type": "number" - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectPartial.json b/test/schemas/llm/type/ObjectPartial.json deleted file mode 100644 index 9221418cf7..0000000000 --- a/test/schemas/llm/type/ObjectPartial.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "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/ObjectPropertyNullable.json b/test/schemas/llm/type/ObjectPropertyNullable.json deleted file mode 100644 index ee3cf48c93..0000000000 --- a/test/schemas/llm/type/ObjectPropertyNullable.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "number", - "nullable": true - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "nullable": true - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "grade": { - "type": "number" - }, - "serial": { - "type": "number", - "nullable": true - }, - "activated": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "name", - "activated" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - } - ] - }, - "minItems": 4, - "maxItems": 4 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ObjectRequired.json b/test/schemas/llm/type/ObjectRequired.json deleted file mode 100644 index cfb27069de..0000000000 --- a/test/schemas/llm/type/ObjectRequired.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "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/ObjectTuple.json b/test/schemas/llm/type/ObjectTuple.json deleted file mode 100644 index 44476b6d4b..0000000000 --- a/test/schemas/llm/type/ObjectTuple.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "code", - "name" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "mobile", - "name" - ], - "additionalProperties": false - } - ] - }, - "minItems": 2, - "maxItems": 2 -} \ No newline at end of file diff --git a/test/schemas/llm/type/TemplateAtomic.json b/test/schemas/llm/type/TemplateAtomic.json deleted file mode 100644 index 99e3f3ba0f..0000000000 --- a/test/schemas/llm/type/TemplateAtomic.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "type": "object", - "properties": { - "prefix": { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - "postfix": { - "type": "string", - "pattern": "((.*)_postfix)$" - }, - "middle_string": { - "type": "string", - "pattern": "^(the_(.*)_value)$" - }, - "middle_string_empty": { - "type": "string", - "pattern": "^(the_(.*)_value)$" - }, - "middle_numeric": { - "type": "string", - "pattern": "^(the_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_value)$" - }, - "middle_boolean": { - "type": "string", - "enum": [ - "the_false_value", - "the_true_value" - ] - }, - "ipv4": { - "type": "string", - "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\.[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" - }, - "email": { - "type": "string", - "pattern": "((.*)@(.*)\\.(.*))" - } - }, - "required": [ - "prefix", - "postfix", - "middle_string", - "middle_string_empty", - "middle_numeric", - "middle_boolean", - "ipv4", - "email" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TemplateUnion.json b/test/schemas/llm/type/TemplateUnion.json deleted file mode 100644 index ae3c5031ab..0000000000 --- a/test/schemas/llm/type/TemplateUnion.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "prefix": { - "type": "string", - "pattern": "^((prefix_(.*))|(prefix_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?))$" - }, - "postfix": { - "type": "string", - "pattern": "(((.*)_postfix)|([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_postfix))$" - }, - "middle": { - "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)$", - "enum": [ - "the_A_value", - "the_B_value" - ] - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "additionalProperties": false - } - ] - } - }, - "required": [ - "prefix", - "postfix", - "middle", - "mixed" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/ToJsonArray.json b/test/schemas/llm/type/ToJsonArray.json deleted file mode 100644 index b658eaa689..0000000000 --- a/test/schemas/llm/type/ToJsonArray.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "additionalProperties": false - } - } - ] - }, - "minItems": 4, - "maxItems": 4 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ToJsonAtomicSimple.json b/test/schemas/llm/type/ToJsonAtomicSimple.json deleted file mode 100644 index a9dc150cdd..0000000000 --- a/test/schemas/llm/type/ToJsonAtomicSimple.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 3, - "maxItems": 3 -} \ No newline at end of file diff --git a/test/schemas/llm/type/ToJsonTuple.json b/test/schemas/llm/type/ToJsonTuple.json deleted file mode 100644 index c6b416cb68..0000000000 --- a/test/schemas/llm/type/ToJsonTuple.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "code", - "name" - ], - "additionalProperties": false - } - ] - }, - "minItems": 4, - "maxItems": 4 -} \ No newline at end of file diff --git a/test/schemas/llm/type/TupleHierarchical.json b/test/schemas/llm/type/TupleHierarchical.json deleted file mode 100644 index d0cbf97175..0000000000 --- a/test/schemas/llm/type/TupleHierarchical.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "nullable": true - }, - { - "type": "number", - "nullable": true - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean", - "nullable": true - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "minItems": 2, - "maxItems": 2 - } - ] - }, - "minItems": 2, - "maxItems": 2, - "nullable": true - } - ] - }, - "minItems": 3, - "maxItems": 3, - "nullable": true - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "minItems": 2, - "maxItems": 2 - } - ] - }, - "minItems": 3, - "maxItems": 3 - } - } - ] - }, - "minItems": 3, - "maxItems": 3 - } - } - ] - }, - "minItems": 2, - "maxItems": 2, - "nullable": true - } - ] - }, - "minItems": 5, - "maxItems": 5 -} \ No newline at end of file diff --git a/test/schemas/llm/type/TupleRestArray.json b/test/schemas/llm/type/TupleRestArray.json deleted file mode 100644 index 82cd4e2539..0000000000 --- a/test/schemas/llm/type/TupleRestArray.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "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 deleted file mode 100644 index f7f2b00d92..0000000000 --- a/test/schemas/llm/type/TupleRestAtomic.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "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 deleted file mode 100644 index 977cdc6136..0000000000 --- a/test/schemas/llm/type/TupleRestObject.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - ] - }, - "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 deleted file mode 100644 index fd0d97b857..0000000000 --- a/test/schemas/llm/type/TypeTagArray.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 3 - }, - "minItems": { - "type": "array", - "items": { - "type": "number", - "minimum": 3 - }, - "minItems": 3 - }, - "both": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 7 - }, - "equal": { - "type": "array", - "items": { - "type": "number", - "minimum": 10, - "maximum": 10 - }, - "minItems": 10, - "maxItems": 10 - }, - "unique": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "required": [ - "items", - "minItems", - "both", - "equal", - "unique" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagArrayUnion.json b/test/schemas/llm/type/TypeTagArrayUnion.json deleted file mode 100644 index ce33f90c2d..0000000000 --- a/test/schemas/llm/type/TypeTagArrayUnion.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "type": "array", - "items": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 3 - }, - "minItems": { - "type": "array", - "items": { - "type": "number", - "minimum": 3 - }, - "minItems": 3 - }, - "maxItems": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "maxLength": 7 - }, - { - "type": "number", - "maximum": 7 - } - ] - }, - "maxItems": 7 - }, - "both": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 3, - "maxItems": 7 - } - }, - "required": [ - "items", - "minItems", - "maxItems", - "both" - ], - "additionalProperties": false - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagAtomicUnion.json b/test/schemas/llm/type/TypeTagAtomicUnion.json deleted file mode 100644 index 4d814e123d..0000000000 --- a/test/schemas/llm/type/TypeTagAtomicUnion.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "oneOf": [ - { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - { - "type": "number", - "minimum": 3 - } - ] - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagCustom.json b/test/schemas/llm/type/TypeTagCustom.json deleted file mode 100644 index 9f9c6e6cab..0000000000 --- a/test/schemas/llm/type/TypeTagCustom.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "dollar": { - "type": "string", - "x-typia-monetary": "dollar" - }, - "postfix": { - "type": "string", - "x-typia-postfix": "abcd" - }, - "powerOf": { - "type": "number", - "x-typia-powerOf": 2 - } - }, - "required": [ - "id", - "dollar", - "postfix", - "powerOf" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagDefault.json b/test/schemas/llm/type/TypeTagDefault.json deleted file mode 100644 index 8325218b4d..0000000000 --- a/test/schemas/llm/type/TypeTagDefault.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "type": "object", - "properties": { - "boolean": { - "type": "boolean" - }, - "number": { - "type": "number", - "default": 1 - }, - "string": { - "type": "string", - "default": "two" - }, - "text": { - "type": "string", - "default": "Very long text, can you understand it?" - }, - "boolean_and_number_and_string": { - "oneOf": [ - { - "type": "number", - "default": 1 - }, - { - "type": "string", - "default": "two" - }, - { - "type": "boolean" - } - ] - }, - "union_but_boolean": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "union_but_number": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number", - "default": 1 - }, - { - "type": "boolean" - } - ] - }, - "union_but_string": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string", - "default": "two" - }, - { - "type": "boolean" - } - ] - }, - "boolean_and_number_and_template": { - "oneOf": [ - { - "type": "string", - "pattern": "^(prefix_(.*))" - }, - { - "type": "number", - "default": 2 - }, - { - "type": "boolean" - } - ] - } - }, - "required": [ - "boolean", - "number", - "string", - "text", - "boolean_and_number_and_string", - "union_but_boolean", - "union_but_number", - "union_but_string", - "boolean_and_number_and_template" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagFormat.json b/test/schemas/llm/type/TypeTagFormat.json deleted file mode 100644 index 3822e1a6bd..0000000000 --- a/test/schemas/llm/type/TypeTagFormat.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "type": "object", - "properties": { - "byte": { - "type": "string", - "format": "byte" - }, - "password": { - "type": "string", - "format": "password" - }, - "regex": { - "type": "string", - "format": "regex" - }, - "uuid": { - "type": "string", - "format": "uuid" - }, - "email": { - "type": "string", - "format": "email" - }, - "hostname": { - "type": "string", - "format": "hostname" - }, - "idnEmail": { - "type": "string", - "format": "idn-email" - }, - "idnHostname": { - "type": "string", - "format": "idn-hostname" - }, - "iri": { - "type": "string", - "format": "iri" - }, - "iriReference": { - "type": "string", - "format": "iri-reference" - }, - "ipv4": { - "type": "string", - "format": "ipv4" - }, - "ipv6": { - "type": "string", - "format": "ipv6" - }, - "uri": { - "type": "string", - "format": "uri" - }, - "uriReference": { - "type": "string", - "format": "uri-reference" - }, - "uriTemplate": { - "type": "string", - "format": "uri-template" - }, - "url": { - "type": "string", - "format": "url" - }, - "datetime": { - "type": "string", - "format": "date-time" - }, - "date": { - "type": "string", - "format": "date" - }, - "time": { - "type": "string", - "format": "time" - }, - "duration": { - "type": "string", - "format": "duration" - }, - "jsonPointer": { - "type": "string", - "format": "json-pointer" - }, - "relativeJsonPointer": { - "type": "string", - "format": "relative-json-pointer" - } - }, - "required": [ - "byte", - "password", - "regex", - "uuid", - "email", - "hostname", - "idnEmail", - "idnHostname", - "iri", - "iriReference", - "ipv4", - "ipv6", - "uri", - "uriReference", - "uriTemplate", - "url", - "datetime", - "date", - "time", - "duration", - "jsonPointer", - "relativeJsonPointer" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagLength.json b/test/schemas/llm/type/TypeTagLength.json deleted file mode 100644 index 79018d4b80..0000000000 --- a/test/schemas/llm/type/TypeTagLength.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "fixed": { - "type": "string", - "minLength": 5, - "maxLength": 5 - }, - "minimum": { - "type": "string", - "minLength": 3 - }, - "maximum": { - "type": "string", - "maxLength": 7 - }, - "minimum_and_maximum": { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - "equal": { - "type": "string", - "minLength": 10, - "maxLength": 19 - } - }, - "required": [ - "fixed", - "minimum", - "maximum", - "minimum_and_maximum", - "equal" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagMatrix.json b/test/schemas/llm/type/TypeTagMatrix.json deleted file mode 100644 index 716980859a..0000000000 --- a/test/schemas/llm/type/TypeTagMatrix.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "object", - "properties": { - "matrix": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 4, - "maxItems": 4 - }, - "minItems": 3, - "maxItems": 3 - } - }, - "required": [ - "matrix" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagObjectUnion.json b/test/schemas/llm/type/TypeTagObjectUnion.json deleted file mode 100644 index ec0ecdcc99..0000000000 --- a/test/schemas/llm/type/TypeTagObjectUnion.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "value": { - "type": "number", - "minimum": 3 - } - }, - "required": [ - "value" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "string", - "minLength": 3, - "maxLength": 7 - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - ] - } -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagPattern.json b/test/schemas/llm/type/TypeTagPattern.json deleted file mode 100644 index f1d194ec67..0000000000 --- a/test/schemas/llm/type/TypeTagPattern.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "object", - "properties": { - "uuid": { - "type": "string", - "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$" - }, - "email": { - "type": "string", - "pattern": "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" - }, - "ipv4": { - "type": "string", - "pattern": "^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" - }, - "ipv6": { - "type": "string", - "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]))$" - } - }, - "required": [ - "uuid", - "email", - "ipv4", - "ipv6" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagRange.json b/test/schemas/llm/type/TypeTagRange.json deleted file mode 100644 index f81fad64de..0000000000 --- a/test/schemas/llm/type/TypeTagRange.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "object", - "properties": { - "greater": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3 - }, - "greater_equal": { - "type": "integer", - "minimum": 3 - }, - "less": { - "type": "integer", - "exclusiveMaximum": true, - "maximum": 7 - }, - "less_equal": { - "type": "integer", - "maximum": 7 - }, - "greater_less": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_equal_less": { - "type": "integer", - "minimum": 3, - "exclusiveMaximum": true, - "maximum": 7 - }, - "greater_less_equal": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 3, - "maximum": 7 - }, - "greater_equal_less_equal": { - "type": "integer", - "minimum": 3, - "maximum": 7 - }, - "equal": { - "type": "integer", - "minimum": 10, - "maximum": 10 - } - }, - "required": [ - "greater", - "greater_equal", - "less", - "less_equal", - "greater_less", - "greater_equal_less", - "greater_less_equal", - "greater_equal_less_equal", - "equal" - ], - "additionalProperties": false - } - } - }, - "required": [ - "value" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/llm/type/TypeTagTuple.json b/test/schemas/llm/type/TypeTagTuple.json deleted file mode 100644 index 180c4a6794..0000000000 --- a/test/schemas/llm/type/TypeTagTuple.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "type": "object", - "properties": { - "tuple": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "minLength": 3, - "maxLength": 7 - }, - { - "type": "number", - "minimum": 3, - "maximum": 7 - }, - { - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 2 - }, - "minItems": 3, - "maxItems": 7 - }, - { - "type": "array", - "items": { - "type": "number", - "minimum": 1, - "maximum": 2 - }, - "minItems": 3, - "maxItems": 7 - } - ] - }, - "minItems": 4, - "maxItems": 4 - } - }, - "required": [ - "tuple" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/test/schemas/protobuf/ObjectSequenceProtobuf.proto b/test/schemas/protobuf/ObjectSequenceProtobuf.proto new file mode 100644 index 0000000000..85b22a94d9 --- /dev/null +++ b/test/schemas/protobuf/ObjectSequenceProtobuf.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +message ObjectSequenceProtobuf { + repeated ObjectSequenceProtobuf.IMember value = 1; + message IMember { + oneof id { + bytes v13 = 13; + uint64 v12 = 12; + string v11 = 11; + } + optional string name = 20; + repeated ObjectSequenceProtobuf.IMember children = 30; + map keywords = 40; + oneof thumbnail { + bytes v41 = 41; + string v42 = 42; + } + required string email = 43; + repeated ObjectSequenceProtobuf.IHobby hobbies = 44; + } + + message IHobby { + required string id = 1; + required string name = 2; + required bool valid = 3; + } +} \ No newline at end of file diff --git a/test/schemas/reflect/metadata/ArrayAny.json b/test/schemas/reflect/metadata/ArrayAny.json index 914ee4747a..0caa11014a 100644 --- a/test/schemas/reflect/metadata/ArrayAny.json +++ b/test/schemas/reflect/metadata/ArrayAny.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayAny" + { + "name": "ArrayAny", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "anys" + "value": "anys", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "undefindable1" + "value": "undefindable1", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "undefindable2" + "value": "undefindable2", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "nullables1" + "value": "nullables1", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "nullables2" + "value": "nullables2", + "tags": [] } ] } @@ -320,7 +328,8 @@ "type": "string", "values": [ { - "value": "both1" + "value": "both1", + "tags": [] } ] } @@ -376,7 +385,8 @@ "type": "string", "values": [ { - "value": "both2" + "value": "both2", + "tags": [] } ] } @@ -432,7 +442,8 @@ "type": "string", "values": [ { - "value": "both3" + "value": "both3", + "tags": [] } ] } @@ -488,7 +499,8 @@ "type": "string", "values": [ { - "value": "union" + "value": "union", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ArrayHierarchical.json b/test/schemas/reflect/metadata/ArrayHierarchical.json index 13b5202119..838373d273 100644 --- a/test/schemas/reflect/metadata/ArrayHierarchical.json +++ b/test/schemas/reflect/metadata/ArrayHierarchical.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "serial" + "value": "serial", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -211,7 +214,8 @@ "type": "string", "values": [ { - "value": "established_at" + "value": "established_at", + "tags": [] } ] } @@ -241,7 +245,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchical.ITimestamp" + { + "name": "ArrayHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "departments" + "value": "departments", + "tags": [] } ] } @@ -331,7 +339,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -387,7 +396,8 @@ "type": "string", "values": [ { - "value": "zone" + "value": "zone", + "tags": [] } ] } @@ -454,7 +464,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -510,7 +521,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -566,7 +578,8 @@ "type": "string", "values": [ { - "value": "sales" + "value": "sales", + "tags": [] } ] } @@ -622,7 +635,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -652,7 +666,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchical.ITimestamp" + { + "name": "ArrayHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -675,7 +692,8 @@ "type": "string", "values": [ { - "value": "employees" + "value": "employees", + "tags": [] } ] } @@ -742,7 +760,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -798,7 +817,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -854,7 +874,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -910,7 +931,8 @@ "type": "string", "values": [ { - "value": "grade" + "value": "grade", + "tags": [] } ] } @@ -966,7 +988,8 @@ "type": "string", "values": [ { - "value": "employeed_at" + "value": "employeed_at", + "tags": [] } ] } @@ -996,7 +1019,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchical.ITimestamp" + { + "name": "ArrayHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1033,7 +1059,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchical.ICompany" + { + "name": "ArrayHierarchical.ICompany", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1062,7 +1091,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchical.IDepartment" + { + "name": "ArrayHierarchical.IDepartment", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1091,7 +1123,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchical.IEmployee" + { + "name": "ArrayHierarchical.IEmployee", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayHierarchicalPointer.json b/test/schemas/reflect/metadata/ArrayHierarchicalPointer.json index 2b9c26d78b..c335fc4a2f 100644 --- a/test/schemas/reflect/metadata/ArrayHierarchicalPointer.json +++ b/test/schemas/reflect/metadata/ArrayHierarchicalPointer.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer" + { + "name": "ArrayHierarchicalPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -163,7 +168,8 @@ "type": "string", "values": [ { - "value": "serial" + "value": "serial", + "tags": [] } ] } @@ -219,7 +225,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -275,7 +282,8 @@ "type": "string", "values": [ { - "value": "established_at" + "value": "established_at", + "tags": [] } ] } @@ -305,7 +313,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer.ITimestamp" + { + "name": "ArrayHierarchicalPointer.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -328,7 +339,8 @@ "type": "string", "values": [ { - "value": "departments" + "value": "departments", + "tags": [] } ] } @@ -395,7 +407,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -451,7 +464,8 @@ "type": "string", "values": [ { - "value": "zone" + "value": "zone", + "tags": [] } ] } @@ -518,7 +532,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -574,7 +589,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -630,7 +646,8 @@ "type": "string", "values": [ { - "value": "sales" + "value": "sales", + "tags": [] } ] } @@ -686,7 +703,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -716,7 +734,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer.ITimestamp" + { + "name": "ArrayHierarchicalPointer.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -739,7 +760,8 @@ "type": "string", "values": [ { - "value": "employees" + "value": "employees", + "tags": [] } ] } @@ -806,7 +828,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -862,7 +885,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -918,7 +942,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -974,7 +999,8 @@ "type": "string", "values": [ { - "value": "grade" + "value": "grade", + "tags": [] } ] } @@ -1030,7 +1056,8 @@ "type": "string", "values": [ { - "value": "employeed_at" + "value": "employeed_at", + "tags": [] } ] } @@ -1060,7 +1087,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer.ITimestamp" + { + "name": "ArrayHierarchicalPointer.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1097,7 +1127,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer.ICompany" + { + "name": "ArrayHierarchicalPointer.ICompany", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1126,7 +1159,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer.IDepartment" + { + "name": "ArrayHierarchicalPointer.IDepartment", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1155,7 +1191,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayHierarchicalPointer.IEmployee" + { + "name": "ArrayHierarchicalPointer.IEmployee", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayRecursive.json b/test/schemas/reflect/metadata/ArrayRecursive.json index 57b733bdc6..2cce95077d 100644 --- a/test/schemas/reflect/metadata/ArrayRecursive.json +++ b/test/schemas/reflect/metadata/ArrayRecursive.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursive.ICategory" + { + "name": "ArrayRecursive.ICategory", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "children" + "value": "children", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "sequence" + "value": "sequence", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -294,7 +302,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursive.ITimestamp" + { + "name": "ArrayRecursive.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -328,7 +339,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -384,7 +396,8 @@ "type": "string", "values": [ { - "value": "zone" + "value": "zone", + "tags": [] } ] } @@ -454,7 +467,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursive.ICategory" + { + "name": "ArrayRecursive.ICategory", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicit.json b/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicit.json index e2f8ddca10..1602c4234a 100644 --- a/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicit.json +++ b/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicit.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -211,7 +214,8 @@ "type": "string", "values": [ { - "value": "children" + "value": "children", + "tags": [] } ] } @@ -267,7 +271,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -339,7 +344,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -395,7 +401,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -451,7 +458,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -507,7 +515,8 @@ "type": "string", "values": [ { - "value": "width" + "value": "width", + "tags": [] } ] } @@ -563,7 +572,8 @@ "type": "string", "values": [ { - "value": "height" + "value": "height", + "tags": [] } ] } @@ -619,7 +629,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -675,7 +686,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -731,7 +743,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -792,7 +805,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -864,7 +878,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -920,7 +935,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -976,7 +992,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1032,7 +1049,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -1088,7 +1106,8 @@ "type": "string", "values": [ { - "value": "content" + "value": "content", + "tags": [] } ] } @@ -1144,7 +1163,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1205,7 +1225,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -1277,7 +1298,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1333,7 +1355,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1389,7 +1412,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1445,7 +1469,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -1501,7 +1526,8 @@ "type": "string", "values": [ { - "value": "count" + "value": "count", + "tags": [] } ] } @@ -1557,7 +1583,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1618,7 +1645,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -1690,7 +1718,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1746,7 +1775,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1802,7 +1832,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1858,7 +1889,8 @@ "type": "string", "values": [ { - "value": "target" + "value": "target", + "tags": [] } ] } @@ -1888,11 +1920,26 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicit.IDirectory", - "ArrayRecursiveUnionExplicit.IImageFile", - "ArrayRecursiveUnionExplicit.ITextFile", - "ArrayRecursiveUnionExplicit.IZipFile", - "ArrayRecursiveUnionExplicit.IShortcut" + { + "name": "ArrayRecursiveUnionExplicit.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1915,7 +1962,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1976,7 +2024,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -2051,11 +2100,26 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicit.IDirectory", - "ArrayRecursiveUnionExplicit.IImageFile", - "ArrayRecursiveUnionExplicit.ITextFile", - "ArrayRecursiveUnionExplicit.IZipFile", - "ArrayRecursiveUnionExplicit.IShortcut" + { + "name": "ArrayRecursiveUnionExplicit.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2084,11 +2148,26 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicit.IDirectory", - "ArrayRecursiveUnionExplicit.IImageFile", - "ArrayRecursiveUnionExplicit.ITextFile", - "ArrayRecursiveUnionExplicit.IZipFile", - "ArrayRecursiveUnionExplicit.IShortcut" + { + "name": "ArrayRecursiveUnionExplicit.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicit.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicitPointer.json b/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicitPointer.json index 5f5f6a05d3..f183c0bb79 100644 --- a/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicitPointer.json +++ b/test/schemas/reflect/metadata/ArrayRecursiveUnionExplicitPointer.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicitPointer" + { + "name": "ArrayRecursiveUnionExplicitPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -137,11 +142,26 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicitPointer.IDirectory", - "ArrayRecursiveUnionExplicitPointer.IImageFile", - "ArrayRecursiveUnionExplicitPointer.ITextFile", - "ArrayRecursiveUnionExplicitPointer.IZipFile", - "ArrayRecursiveUnionExplicitPointer.IShortcut" + { + "name": "ArrayRecursiveUnionExplicitPointer.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicitPointer.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicitPointer.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicitPointer.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionExplicitPointer.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], @@ -175,7 +195,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -231,7 +252,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -287,7 +309,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -343,7 +366,8 @@ "type": "string", "values": [ { - "value": "children" + "value": "children", + "tags": [] } ] } @@ -399,7 +423,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -471,7 +496,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -527,7 +553,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -583,7 +610,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -639,7 +667,8 @@ "type": "string", "values": [ { - "value": "width" + "value": "width", + "tags": [] } ] } @@ -695,7 +724,8 @@ "type": "string", "values": [ { - "value": "height" + "value": "height", + "tags": [] } ] } @@ -751,7 +781,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -807,7 +838,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -863,7 +895,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -924,7 +957,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -996,7 +1030,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1052,7 +1087,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1108,7 +1144,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1164,7 +1201,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -1220,7 +1258,8 @@ "type": "string", "values": [ { - "value": "content" + "value": "content", + "tags": [] } ] } @@ -1276,7 +1315,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1337,7 +1377,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -1409,7 +1450,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1465,7 +1507,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1521,7 +1564,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1577,7 +1621,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -1633,7 +1678,8 @@ "type": "string", "values": [ { - "value": "count" + "value": "count", + "tags": [] } ] } @@ -1689,7 +1735,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1750,7 +1797,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -1822,7 +1870,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1878,7 +1927,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1934,7 +1984,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1990,7 +2041,8 @@ "type": "string", "values": [ { - "value": "target" + "value": "target", + "tags": [] } ] } @@ -2020,7 +2072,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicitPointer.IBucket" + { + "name": "ArrayRecursiveUnionExplicitPointer.IBucket", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2043,7 +2098,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -2104,7 +2160,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -2179,7 +2236,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicitPointer.IBucket" + { + "name": "ArrayRecursiveUnionExplicitPointer.IBucket", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2208,7 +2268,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionExplicitPointer.IBucket" + { + "name": "ArrayRecursiveUnionExplicitPointer.IBucket", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayRecursiveUnionImplicit.json b/test/schemas/reflect/metadata/ArrayRecursiveUnionImplicit.json index 952a276e87..9e123c1472 100644 --- a/test/schemas/reflect/metadata/ArrayRecursiveUnionImplicit.json +++ b/test/schemas/reflect/metadata/ArrayRecursiveUnionImplicit.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -211,7 +214,8 @@ "type": "string", "values": [ { - "value": "children" + "value": "children", + "tags": [] } ] } @@ -278,7 +282,8 @@ "type": "string", "values": [ { - "value": "access" + "value": "access", + "tags": [] } ] } @@ -343,7 +348,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -399,7 +405,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -455,7 +462,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -511,7 +519,8 @@ "type": "string", "values": [ { - "value": "children" + "value": "children", + "tags": [] } ] } @@ -578,7 +587,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -634,7 +644,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -690,7 +701,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -746,7 +758,8 @@ "type": "string", "values": [ { - "value": "width" + "value": "width", + "tags": [] } ] } @@ -802,7 +815,8 @@ "type": "string", "values": [ { - "value": "height" + "value": "height", + "tags": [] } ] } @@ -858,7 +872,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -914,7 +929,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -981,7 +997,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1037,7 +1054,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1093,7 +1111,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1149,7 +1168,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -1205,7 +1225,8 @@ "type": "string", "values": [ { - "value": "content" + "value": "content", + "tags": [] } ] } @@ -1272,7 +1293,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1328,7 +1350,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1384,7 +1407,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1440,7 +1464,8 @@ "type": "string", "values": [ { - "value": "size" + "value": "size", + "tags": [] } ] } @@ -1496,7 +1521,8 @@ "type": "string", "values": [ { - "value": "count" + "value": "count", + "tags": [] } ] } @@ -1563,7 +1589,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1619,7 +1646,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1675,7 +1703,8 @@ "type": "string", "values": [ { - "value": "path" + "value": "path", + "tags": [] } ] } @@ -1731,7 +1760,8 @@ "type": "string", "values": [ { - "value": "target" + "value": "target", + "tags": [] } ] } @@ -1761,12 +1791,30 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionImplicit.IDirectory", - "ArrayRecursiveUnionImplicit.ISharedDirectory", - "ArrayRecursiveUnionImplicit.IImageFile", - "ArrayRecursiveUnionImplicit.ITextFile", - "ArrayRecursiveUnionImplicit.IZipFile", - "ArrayRecursiveUnionImplicit.IShortcut" + { + "name": "ArrayRecursiveUnionImplicit.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.ISharedDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1803,12 +1851,30 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionImplicit.IDirectory", - "ArrayRecursiveUnionImplicit.ISharedDirectory", - "ArrayRecursiveUnionImplicit.IImageFile", - "ArrayRecursiveUnionImplicit.ITextFile", - "ArrayRecursiveUnionImplicit.IZipFile", - "ArrayRecursiveUnionImplicit.IShortcut" + { + "name": "ArrayRecursiveUnionImplicit.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.ISharedDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1837,12 +1903,30 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRecursiveUnionImplicit.IDirectory", - "ArrayRecursiveUnionImplicit.ISharedDirectory", - "ArrayRecursiveUnionImplicit.IImageFile", - "ArrayRecursiveUnionImplicit.ITextFile", - "ArrayRecursiveUnionImplicit.IZipFile", - "ArrayRecursiveUnionImplicit.IShortcut" + { + "name": "ArrayRecursiveUnionImplicit.IDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.ISharedDirectory", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IImageFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.ITextFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IZipFile", + "tags": [] + }, + { + "name": "ArrayRecursiveUnionImplicit.IShortcut", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayRepeatedUnion.json b/test/schemas/reflect/metadata/ArrayRepeatedUnion.json index 6b008305d3..d186222e38 100644 --- a/test/schemas/reflect/metadata/ArrayRepeatedUnion.json +++ b/test/schemas/reflect/metadata/ArrayRepeatedUnion.json @@ -60,7 +60,8 @@ "type": "string", "values": [ { - "value": "scale" + "value": "scale", + "tags": [] } ] } @@ -90,7 +91,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnion.IPoint3D" + { + "name": "ArrayRepeatedUnion.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -113,7 +117,8 @@ "type": "string", "values": [ { - "value": "position" + "value": "position", + "tags": [] } ] } @@ -143,7 +148,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnion.IPoint3D" + { + "name": "ArrayRepeatedUnion.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -166,7 +174,8 @@ "type": "string", "values": [ { - "value": "rotate" + "value": "rotate", + "tags": [] } ] } @@ -196,7 +205,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnion.IPoint3D" + { + "name": "ArrayRepeatedUnion.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -219,7 +231,8 @@ "type": "string", "values": [ { - "value": "pivot" + "value": "pivot", + "tags": [] } ] } @@ -249,7 +262,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnion.IPoint3D" + { + "name": "ArrayRepeatedUnion.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -283,7 +299,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -339,7 +356,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -395,7 +413,8 @@ "type": "string", "values": [ { - "value": "z" + "value": "z", + "tags": [] } ] } @@ -546,7 +565,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnion.IBox3D" + { + "name": "ArrayRepeatedUnion.IBox3D", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayRepeatedUnionWithTuple.json b/test/schemas/reflect/metadata/ArrayRepeatedUnionWithTuple.json index 6cb712aac3..9ee29faa83 100644 --- a/test/schemas/reflect/metadata/ArrayRepeatedUnionWithTuple.json +++ b/test/schemas/reflect/metadata/ArrayRepeatedUnionWithTuple.json @@ -69,7 +69,8 @@ "type": "string", "values": [ { - "value": "scale" + "value": "scale", + "tags": [] } ] } @@ -99,7 +100,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IPoint3D" + { + "name": "ArrayRepeatedUnionWithTuple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -122,7 +126,8 @@ "type": "string", "values": [ { - "value": "position" + "value": "position", + "tags": [] } ] } @@ -152,7 +157,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IPoint3D" + { + "name": "ArrayRepeatedUnionWithTuple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -175,7 +183,8 @@ "type": "string", "values": [ { - "value": "rotate" + "value": "rotate", + "tags": [] } ] } @@ -205,7 +214,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IPoint3D" + { + "name": "ArrayRepeatedUnionWithTuple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -228,7 +240,8 @@ "type": "string", "values": [ { - "value": "pivot" + "value": "pivot", + "tags": [] } ] } @@ -258,7 +271,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IPoint3D" + { + "name": "ArrayRepeatedUnionWithTuple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -292,7 +308,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -348,7 +365,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -404,7 +422,8 @@ "type": "string", "values": [ { - "value": "z" + "value": "z", + "tags": [] } ] } @@ -564,7 +583,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IBox3D" + { + "name": "ArrayRepeatedUnionWithTuple.IBox3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -679,7 +701,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IBox3D" + { + "name": "ArrayRepeatedUnionWithTuple.IBox3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -700,7 +725,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArrayRepeatedUnionWithTuple.IPoint3D" + { + "name": "ArrayRepeatedUnionWithTuple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArraySimple.json b/test/schemas/reflect/metadata/ArraySimple.json index 829c327c3d..4cfc17305e 100644 --- a/test/schemas/reflect/metadata/ArraySimple.json +++ b/test/schemas/reflect/metadata/ArraySimple.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "hobbies" + "value": "hobbies", + "tags": [] } ] } @@ -222,7 +225,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -278,7 +282,8 @@ "type": "string", "values": [ { - "value": "body" + "value": "body", + "tags": [] } ] } @@ -334,7 +339,8 @@ "type": "string", "values": [ { - "value": "rank" + "value": "rank", + "tags": [] } ] } @@ -404,7 +410,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimple.IPerson" + { + "name": "ArraySimple.IPerson", + "tags": [] + } ], "aliases": [], "natives": [], @@ -433,7 +442,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimple.IHobby" + { + "name": "ArraySimple.IHobby", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArraySimpleProtobuf.json b/test/schemas/reflect/metadata/ArraySimpleProtobuf.json index 00789d8936..e1ff56fde7 100644 --- a/test/schemas/reflect/metadata/ArraySimpleProtobuf.json +++ b/test/schemas/reflect/metadata/ArraySimpleProtobuf.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimpleProtobuf" + { + "name": "ArraySimpleProtobuf", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -320,7 +328,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -376,7 +385,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -432,7 +442,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -488,7 +499,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -544,7 +556,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -648,7 +661,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -694,7 +707,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -832,7 +845,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -956,7 +969,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -983,7 +999,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimpleProtobuf" + { + "name": "ArraySimpleProtobuf", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArraySimpleProtobufNullable.json b/test/schemas/reflect/metadata/ArraySimpleProtobufNullable.json index 03787c8454..9dd23047e5 100644 --- a/test/schemas/reflect/metadata/ArraySimpleProtobufNullable.json +++ b/test/schemas/reflect/metadata/ArraySimpleProtobufNullable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimpleProtobufNullable" + { + "name": "ArraySimpleProtobufNullable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -320,7 +328,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -376,7 +385,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -432,7 +442,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -488,7 +499,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -544,7 +556,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -648,7 +661,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -694,7 +707,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -832,7 +845,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -956,7 +969,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -983,7 +999,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimpleProtobufNullable" + { + "name": "ArraySimpleProtobufNullable", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArraySimpleProtobufOptional.json b/test/schemas/reflect/metadata/ArraySimpleProtobufOptional.json index 4fd486af89..7b017d90c5 100644 --- a/test/schemas/reflect/metadata/ArraySimpleProtobufOptional.json +++ b/test/schemas/reflect/metadata/ArraySimpleProtobufOptional.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimpleProtobufOptional" + { + "name": "ArraySimpleProtobufOptional", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -320,7 +328,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -376,7 +385,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -432,7 +442,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -488,7 +499,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -544,7 +556,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -648,7 +661,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -694,7 +707,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -832,7 +845,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -956,7 +969,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -983,7 +999,10 @@ "arrays": [], "tuples": [], "objects": [ - "ArraySimpleProtobufOptional" + { + "name": "ArraySimpleProtobufOptional", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ArrayUnion.json b/test/schemas/reflect/metadata/ArrayUnion.json index 35443923a5..4c567eba93 100644 --- a/test/schemas/reflect/metadata/ArrayUnion.json +++ b/test/schemas/reflect/metadata/ArrayUnion.json @@ -48,11 +48,11 @@ "tags": [] }, { - "name": "Array", + "name": "Array", "tags": [] }, { - "name": "Array", + "name": "Array", "tags": [] } ], @@ -102,7 +102,7 @@ "index": null }, { - "name": "Array", + "name": "Array", "value": { "any": false, "required": true, @@ -111,7 +111,7 @@ "functions": [], "atomics": [ { - "type": "boolean", + "type": "number", "tags": [] } ], @@ -134,7 +134,7 @@ "index": null }, { - "name": "Array", + "name": "Array", "value": { "any": false, "required": true, @@ -143,7 +143,7 @@ "functions": [], "atomics": [ { - "type": "number", + "type": "boolean", "tags": [] } ], diff --git a/test/schemas/reflect/metadata/AtomicClass.json b/test/schemas/reflect/metadata/AtomicClass.json index 524270ba9c..365906141f 100644 --- a/test/schemas/reflect/metadata/AtomicClass.json +++ b/test/schemas/reflect/metadata/AtomicClass.json @@ -50,7 +50,10 @@ "objects": [], "aliases": [], "natives": [ - "Boolean" + { + "name": "Boolean", + "tags": [] + } ], "sets": [], "maps": [] @@ -81,7 +84,10 @@ "objects": [], "aliases": [], "natives": [ - "Boolean" + { + "name": "Boolean", + "tags": [] + } ], "sets": [], "maps": [] @@ -107,7 +113,10 @@ "objects": [], "aliases": [], "natives": [ - "Boolean" + { + "name": "Boolean", + "tags": [] + } ], "sets": [], "maps": [] @@ -128,7 +137,10 @@ "objects": [], "aliases": [], "natives": [ - "Number" + { + "name": "Number", + "tags": [] + } ], "sets": [], "maps": [] @@ -159,7 +171,10 @@ "objects": [], "aliases": [], "natives": [ - "Number" + { + "name": "Number", + "tags": [] + } ], "sets": [], "maps": [] @@ -185,7 +200,10 @@ "objects": [], "aliases": [], "natives": [ - "Number" + { + "name": "Number", + "tags": [] + } ], "sets": [], "maps": [] @@ -206,7 +224,10 @@ "objects": [], "aliases": [], "natives": [ - "String" + { + "name": "String", + "tags": [] + } ], "sets": [], "maps": [] @@ -237,7 +258,10 @@ "objects": [], "aliases": [], "natives": [ - "String" + { + "name": "String", + "tags": [] + } ], "sets": [], "maps": [] @@ -263,7 +287,10 @@ "objects": [], "aliases": [], "natives": [ - "String" + { + "name": "String", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/ClassClosure.json b/test/schemas/reflect/metadata/ClassClosure.json index d0fefced20..3293a984ef 100644 --- a/test/schemas/reflect/metadata/ClassClosure.json +++ b/test/schemas/reflect/metadata/ClassClosure.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ClassClosure.Something" + { + "name": "ClassClosure.Something", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -157,7 +162,8 @@ "type": "string", "values": [ { - "value": "closure" + "value": "closure", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ClassGetter.json b/test/schemas/reflect/metadata/ClassGetter.json index 97bee1ea74..64fb474150 100644 --- a/test/schemas/reflect/metadata/ClassGetter.json +++ b/test/schemas/reflect/metadata/ClassGetter.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ClassGetter.Person" + { + "name": "ClassGetter.Person", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "dead" + "value": "dead", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ClassMethod.json b/test/schemas/reflect/metadata/ClassMethod.json index 7369df76d8..8c8e81c5ce 100644 --- a/test/schemas/reflect/metadata/ClassMethod.json +++ b/test/schemas/reflect/metadata/ClassMethod.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ClassMethod.Animal" + { + "name": "ClassMethod.Animal", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "bark" + "value": "bark", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ClassNonPublic.json b/test/schemas/reflect/metadata/ClassNonPublic.json index 46b6aba58f..4de232d294 100644 --- a/test/schemas/reflect/metadata/ClassNonPublic.json +++ b/test/schemas/reflect/metadata/ClassNonPublic.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ClassNonPublic.Accessor" + { + "name": "ClassNonPublic.Accessor", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "implicit" + "value": "implicit", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "shown" + "value": "shown", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "getHidden" + "value": "getHidden", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ClassPropertyAssignment.json b/test/schemas/reflect/metadata/ClassPropertyAssignment.json index 65af1c742c..22f3fa6cfd 100644 --- a/test/schemas/reflect/metadata/ClassPropertyAssignment.json +++ b/test/schemas/reflect/metadata/ClassPropertyAssignment.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ClassPropertyAssignment" + { + "name": "ClassPropertyAssignment", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "note" + "value": "note", + "tags": [] } ] } @@ -213,7 +219,8 @@ "type": "string", "values": [ { - "value": "editable" + "value": "editable", + "tags": [] } ] } @@ -274,7 +281,8 @@ "type": "string", "values": [ { - "value": "incremental" + "value": "incremental", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/CommentTagArray.json b/test/schemas/reflect/metadata/CommentTagArray.json index e1e3ed99ba..620669b3b4 100644 --- a/test/schemas/reflect/metadata/CommentTagArray.json +++ b/test/schemas/reflect/metadata/CommentTagArray.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagArray" + { + "name": "CommentTagArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "items" + "value": "items", + "tags": [] } ] } @@ -198,7 +203,8 @@ "type": "string", "values": [ { - "value": "minItems" + "value": "minItems", + "tags": [] } ] } @@ -278,7 +284,8 @@ "type": "string", "values": [ { - "value": "both" + "value": "both", + "tags": [] } ] } @@ -378,7 +385,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -478,7 +486,8 @@ "type": "string", "values": [ { - "value": "unique" + "value": "unique", + "tags": [] } ] } @@ -566,7 +575,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagArray.Type" + { + "name": "CommentTagArray.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagArrayUnion.json b/test/schemas/reflect/metadata/CommentTagArrayUnion.json index 9a8be95b38..bb773f62f6 100644 --- a/test/schemas/reflect/metadata/CommentTagArrayUnion.json +++ b/test/schemas/reflect/metadata/CommentTagArrayUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "items" + "value": "items", + "tags": [] } ] } @@ -134,7 +135,8 @@ "type": "string", "values": [ { - "value": "minItems" + "value": "minItems", + "tags": [] } ] } @@ -214,7 +216,8 @@ "type": "string", "values": [ { - "value": "maxItems" + "value": "maxItems", + "tags": [] } ] } @@ -294,7 +297,8 @@ "type": "string", "values": [ { - "value": "both" + "value": "both", + "tags": [] } ] } @@ -408,7 +412,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagArrayUnion.Type" + { + "name": "CommentTagArrayUnion.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagAtomicUnion.json b/test/schemas/reflect/metadata/CommentTagAtomicUnion.json index 3985f992e0..2bf106d243 100644 --- a/test/schemas/reflect/metadata/CommentTagAtomicUnion.json +++ b/test/schemas/reflect/metadata/CommentTagAtomicUnion.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagAtomicUnion" + { + "name": "CommentTagAtomicUnion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -251,7 +256,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagAtomicUnion.Type" + { + "name": "CommentTagAtomicUnion.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagBigInt.json b/test/schemas/reflect/metadata/CommentTagBigInt.json index 3206a7c18e..859049c6f1 100644 --- a/test/schemas/reflect/metadata/CommentTagBigInt.json +++ b/test/schemas/reflect/metadata/CommentTagBigInt.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagBigInt" + { + "name": "CommentTagBigInt", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "ranged" + "value": "ranged", + "tags": [] } ] } @@ -135,7 +140,10 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "minimum": 0 + } }, { "target": "bigint", @@ -149,7 +157,10 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "maximum": 100 + } } ] ] @@ -202,7 +213,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -241,7 +253,10 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "minimum": 0 + } } ] ] @@ -285,7 +300,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -324,7 +340,10 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "maximum": 100 + } } ] ] @@ -368,7 +387,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } @@ -404,7 +424,10 @@ "value": "3" }, "validate": "$input % 3n === 0n", - "exclusive": true + "exclusive": true, + "schema": { + "multipleOf": 3 + } } ] ] diff --git a/test/schemas/reflect/metadata/CommentTagDefault.json b/test/schemas/reflect/metadata/CommentTagDefault.json index e72c243e46..097bb4f13f 100644 --- a/test/schemas/reflect/metadata/CommentTagDefault.json +++ b/test/schemas/reflect/metadata/CommentTagDefault.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagDefault" + { + "name": "CommentTagDefault", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -106,7 +110,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -172,7 +177,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -238,7 +244,8 @@ "type": "string", "values": [ { - "value": "text" + "value": "text", + "tags": [] } ] } @@ -304,7 +311,8 @@ "type": "string", "values": [ { - "value": "boolean_and_number_and_string" + "value": "boolean_and_number_and_string", + "tags": [] } ] } @@ -396,7 +404,8 @@ "type": "string", "values": [ { - "value": "union_but_boolean" + "value": "union_but_boolean", + "tags": [] } ] } @@ -470,7 +479,8 @@ "type": "string", "values": [ { - "value": "union_but_number" + "value": "union_but_number", + "tags": [] } ] } @@ -544,7 +554,8 @@ "type": "string", "values": [ { - "value": "union_but_string" + "value": "union_but_string", + "tags": [] } ] } @@ -618,7 +629,8 @@ "type": "string", "values": [ { - "value": "vulnerable_range" + "value": "vulnerable_range", + "tags": [] } ] } @@ -733,7 +745,8 @@ "type": "string", "values": [ { - "value": "boolean_and_number_and_template" + "value": "boolean_and_number_and_template", + "tags": [] } ] } @@ -781,7 +794,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -821,7 +835,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/CommentTagFormat.json b/test/schemas/reflect/metadata/CommentTagFormat.json index b24dbcc1b8..a688d57e24 100644 --- a/test/schemas/reflect/metadata/CommentTagFormat.json +++ b/test/schemas/reflect/metadata/CommentTagFormat.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagFormat" + { + "name": "CommentTagFormat", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "byte" + "value": "byte", + "tags": [] } ] } @@ -120,7 +124,8 @@ "type": "string", "values": [ { - "value": "password" + "value": "password", + "tags": [] } ] } @@ -200,7 +205,8 @@ "type": "string", "values": [ { - "value": "regex" + "value": "regex", + "tags": [] } ] } @@ -280,7 +286,8 @@ "type": "string", "values": [ { - "value": "uuid" + "value": "uuid", + "tags": [] } ] } @@ -360,7 +367,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -440,7 +448,8 @@ "type": "string", "values": [ { - "value": "hostname" + "value": "hostname", + "tags": [] } ] } @@ -520,7 +529,8 @@ "type": "string", "values": [ { - "value": "idnEmail" + "value": "idnEmail", + "tags": [] } ] } @@ -600,7 +610,8 @@ "type": "string", "values": [ { - "value": "idnHostname" + "value": "idnHostname", + "tags": [] } ] } @@ -680,7 +691,8 @@ "type": "string", "values": [ { - "value": "iri" + "value": "iri", + "tags": [] } ] } @@ -760,7 +772,8 @@ "type": "string", "values": [ { - "value": "iriReference" + "value": "iriReference", + "tags": [] } ] } @@ -840,7 +853,8 @@ "type": "string", "values": [ { - "value": "ipv4" + "value": "ipv4", + "tags": [] } ] } @@ -920,7 +934,8 @@ "type": "string", "values": [ { - "value": "ipv6" + "value": "ipv6", + "tags": [] } ] } @@ -1000,7 +1015,8 @@ "type": "string", "values": [ { - "value": "uri" + "value": "uri", + "tags": [] } ] } @@ -1080,7 +1096,8 @@ "type": "string", "values": [ { - "value": "uriReference" + "value": "uriReference", + "tags": [] } ] } @@ -1160,7 +1177,8 @@ "type": "string", "values": [ { - "value": "uriTemplate" + "value": "uriTemplate", + "tags": [] } ] } @@ -1240,7 +1258,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -1320,7 +1339,8 @@ "type": "string", "values": [ { - "value": "datetime" + "value": "datetime", + "tags": [] } ] } @@ -1400,7 +1420,8 @@ "type": "string", "values": [ { - "value": "date" + "value": "date", + "tags": [] } ] } @@ -1480,7 +1501,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -1560,7 +1582,8 @@ "type": "string", "values": [ { - "value": "duration" + "value": "duration", + "tags": [] } ] } @@ -1640,7 +1663,8 @@ "type": "string", "values": [ { - "value": "jsonPointer" + "value": "jsonPointer", + "tags": [] } ] } @@ -1720,7 +1744,8 @@ "type": "string", "values": [ { - "value": "relativeJsonPointer" + "value": "relativeJsonPointer", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/CommentTagInfinite.json b/test/schemas/reflect/metadata/CommentTagInfinite.json index bb36394fc2..cdc2e613e9 100644 --- a/test/schemas/reflect/metadata/CommentTagInfinite.json +++ b/test/schemas/reflect/metadata/CommentTagInfinite.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagInfinite" + { + "name": "CommentTagInfinite", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "ranged" + "value": "ranged", + "tags": [] } ] } @@ -202,7 +207,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -285,7 +291,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -368,7 +375,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } @@ -448,7 +456,8 @@ "type": "string", "values": [ { - "value": "typed" + "value": "typed", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/CommentTagLength.json b/test/schemas/reflect/metadata/CommentTagLength.json index 72d836d40a..6f4a0e6bdf 100644 --- a/test/schemas/reflect/metadata/CommentTagLength.json +++ b/test/schemas/reflect/metadata/CommentTagLength.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagLength" + { + "name": "CommentTagLength", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "fixed" + "value": "fixed", + "tags": [] } ] } @@ -198,7 +203,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -278,7 +284,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -358,7 +365,8 @@ "type": "string", "values": [ { - "value": "minimum_and_maximum" + "value": "minimum_and_maximum", + "tags": [] } ] } @@ -458,7 +466,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -572,7 +581,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagLength.Type" + { + "name": "CommentTagLength.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagNaN.json b/test/schemas/reflect/metadata/CommentTagNaN.json index 760eabd78a..0f6489b944 100644 --- a/test/schemas/reflect/metadata/CommentTagNaN.json +++ b/test/schemas/reflect/metadata/CommentTagNaN.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagNaN" + { + "name": "CommentTagNaN", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "ranged" + "value": "ranged", + "tags": [] } ] } @@ -202,7 +207,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -285,7 +291,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -368,7 +375,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } @@ -448,7 +456,8 @@ "type": "string", "values": [ { - "value": "typed" + "value": "typed", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/CommentTagObjectUnion.json b/test/schemas/reflect/metadata/CommentTagObjectUnion.json index 6d5bc13595..b1bfb4c8af 100644 --- a/test/schemas/reflect/metadata/CommentTagObjectUnion.json +++ b/test/schemas/reflect/metadata/CommentTagObjectUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -137,7 +138,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -251,8 +253,14 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagObjectUnion.Literal", - "CommentTagObjectUnion.Numeric" + { + "name": "CommentTagObjectUnion.Literal", + "tags": [] + }, + { + "name": "CommentTagObjectUnion.Numeric", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagPattern.json b/test/schemas/reflect/metadata/CommentTagPattern.json index c7f407d2c0..dad5abc915 100644 --- a/test/schemas/reflect/metadata/CommentTagPattern.json +++ b/test/schemas/reflect/metadata/CommentTagPattern.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagPattern" + { + "name": "CommentTagPattern", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "uuid" + "value": "uuid", + "tags": [] } ] } @@ -122,7 +126,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -204,7 +209,8 @@ "type": "string", "values": [ { - "value": "ipv4" + "value": "ipv4", + "tags": [] } ] } @@ -286,7 +292,8 @@ "type": "string", "values": [ { - "value": "ipv6" + "value": "ipv6", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/CommentTagRange.json b/test/schemas/reflect/metadata/CommentTagRange.json index f2092f7ffd..d8eba6e84f 100644 --- a/test/schemas/reflect/metadata/CommentTagRange.json +++ b/test/schemas/reflect/metadata/CommentTagRange.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagRange" + { + "name": "CommentTagRange", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "greater" + "value": "greater", + "tags": [] } ] } @@ -211,7 +216,8 @@ "type": "string", "values": [ { - "value": "greater_equal" + "value": "greater_equal", + "tags": [] } ] } @@ -314,7 +320,8 @@ "type": "string", "values": [ { - "value": "less" + "value": "less", + "tags": [] } ] } @@ -418,7 +425,8 @@ "type": "string", "values": [ { - "value": "less_equal" + "value": "less_equal", + "tags": [] } ] } @@ -521,7 +529,8 @@ "type": "string", "values": [ { - "value": "greater_less" + "value": "greater_less", + "tags": [] } ] } @@ -649,7 +658,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less" + "value": "greater_equal_less", + "tags": [] } ] } @@ -776,7 +786,8 @@ "type": "string", "values": [ { - "value": "greater_less_equal" + "value": "greater_less_equal", + "tags": [] } ] } @@ -903,7 +914,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less_equal" + "value": "greater_equal_less_equal", + "tags": [] } ] } @@ -1029,7 +1041,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -1169,7 +1182,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagRange.Type" + { + "name": "CommentTagRange.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagRangeBigInt.json b/test/schemas/reflect/metadata/CommentTagRangeBigInt.json index 86b077a969..eabd1d75d0 100644 --- a/test/schemas/reflect/metadata/CommentTagRangeBigInt.json +++ b/test/schemas/reflect/metadata/CommentTagRangeBigInt.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagRangeBigInt" + { + "name": "CommentTagRangeBigInt", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "greater" + "value": "greater", + "tags": [] } ] } @@ -146,7 +151,11 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "exclusiveMinimum": true, + "minimum": 3 + } } ] ] @@ -190,7 +199,8 @@ "type": "string", "values": [ { - "value": "greater_equal" + "value": "greater_equal", + "tags": [] } ] } @@ -229,7 +239,10 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "minimum": 3 + } } ] ] @@ -273,7 +286,8 @@ "type": "string", "values": [ { - "value": "less" + "value": "less", + "tags": [] } ] } @@ -312,7 +326,11 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "exclusiveMaximum": true, + "maximum": 7 + } } ] ] @@ -356,7 +374,8 @@ "type": "string", "values": [ { - "value": "less_equal" + "value": "less_equal", + "tags": [] } ] } @@ -395,7 +414,10 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "maximum": 7 + } } ] ] @@ -439,7 +461,8 @@ "type": "string", "values": [ { - "value": "greater_less" + "value": "greater_less", + "tags": [] } ] } @@ -478,7 +501,11 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "exclusiveMinimum": true, + "minimum": 3 + } }, { "target": "bigint", @@ -492,7 +519,11 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "exclusiveMaximum": true, + "maximum": 7 + } } ] ] @@ -545,7 +576,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less" + "value": "greater_equal_less", + "tags": [] } ] } @@ -584,7 +616,10 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "minimum": 3 + } }, { "target": "bigint", @@ -598,7 +633,11 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "exclusiveMaximum": true, + "maximum": 7 + } } ] ] @@ -651,7 +690,8 @@ "type": "string", "values": [ { - "value": "greater_less_equal" + "value": "greater_less_equal", + "tags": [] } ] } @@ -690,7 +730,11 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "exclusiveMinimum": true, + "minimum": 3 + } }, { "target": "bigint", @@ -704,7 +748,10 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "maximum": 7 + } } ] ] @@ -757,7 +804,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less_equal" + "value": "greater_equal_less_equal", + "tags": [] } ] } @@ -796,7 +844,10 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "minimum": 3 + } }, { "target": "bigint", @@ -810,7 +861,10 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "maximum": 7 + } } ] ] @@ -863,7 +917,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -902,7 +957,10 @@ "exclusive": [ "minimum", "exclusiveMinimum" - ] + ], + "schema": { + "minimum": 10 + } }, { "target": "bigint", @@ -916,7 +974,10 @@ "exclusive": [ "maximum", "exclusiveMaximum" - ] + ], + "schema": { + "maximum": 10 + } } ] ] @@ -983,7 +1044,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagRangeBigInt.Type" + { + "name": "CommentTagRangeBigInt.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagType.json b/test/schemas/reflect/metadata/CommentTagType.json index 0f070c06b2..7f640a2c0b 100644 --- a/test/schemas/reflect/metadata/CommentTagType.json +++ b/test/schemas/reflect/metadata/CommentTagType.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagType" + { + "name": "CommentTagType", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "int" + "value": "int", + "tags": [] } ] } @@ -187,7 +192,8 @@ "type": "string", "values": [ { - "value": "uint" + "value": "uint", + "tags": [] } ] } @@ -267,7 +273,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -347,7 +354,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -427,7 +435,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -507,7 +516,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -587,7 +597,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -678,7 +689,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagType.Type" + { + "name": "CommentTagType.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/CommentTagTypeBigInt.json b/test/schemas/reflect/metadata/CommentTagTypeBigInt.json index e099263ef9..6870a971b3 100644 --- a/test/schemas/reflect/metadata/CommentTagTypeBigInt.json +++ b/test/schemas/reflect/metadata/CommentTagTypeBigInt.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "CommentTagTypeBigInt" + { + "name": "CommentTagTypeBigInt", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "in64" + "value": "in64", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -129,7 +134,10 @@ "kind": "type", "value": "uint64", "validate": "BigInt(0) <= $input", - "exclusive": true + "exclusive": true, + "schema": { + "minimum": 0 + } } ] ] diff --git a/test/schemas/reflect/metadata/ConstantAtomicAbsorbed.json b/test/schemas/reflect/metadata/ConstantAtomicAbsorbed.json index 10409a578c..e070f0803a 100644 --- a/test/schemas/reflect/metadata/ConstantAtomicAbsorbed.json +++ b/test/schemas/reflect/metadata/ConstantAtomicAbsorbed.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ConstantAtomicAbsorbed" + { + "name": "ConstantAtomicAbsorbed", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -109,7 +113,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ConstantAtomicTagged.json b/test/schemas/reflect/metadata/ConstantAtomicTagged.json index d253ebe313..44a736c3a5 100644 --- a/test/schemas/reflect/metadata/ConstantAtomicTagged.json +++ b/test/schemas/reflect/metadata/ConstantAtomicTagged.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ConstantAtomicTagged" + { + "name": "ConstantAtomicTagged", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -123,7 +127,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -155,7 +160,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" diff --git a/test/schemas/reflect/metadata/ConstantAtomicUnion.json b/test/schemas/reflect/metadata/ConstantAtomicUnion.json index badfa3e3b6..a260df660c 100644 --- a/test/schemas/reflect/metadata/ConstantAtomicUnion.json +++ b/test/schemas/reflect/metadata/ConstantAtomicUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "key" + "value": "key", + "tags": [] } ] } @@ -154,7 +155,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ConstantAtomicWrapper.json b/test/schemas/reflect/metadata/ConstantAtomicWrapper.json index 8cb5316078..ca536f011b 100644 --- a/test/schemas/reflect/metadata/ConstantAtomicWrapper.json +++ b/test/schemas/reflect/metadata/ConstantAtomicWrapper.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -110,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -177,7 +179,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -250,7 +253,10 @@ "arrays": [], "tuples": [], "objects": [ - "ConstantAtomicWrapper.IPointer" + { + "name": "ConstantAtomicWrapper.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -271,7 +277,10 @@ "arrays": [], "tuples": [], "objects": [ - "ConstantAtomicWrapper.IPointer" + { + "name": "ConstantAtomicWrapper.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -292,7 +301,10 @@ "arrays": [], "tuples": [], "objects": [ - "ConstantAtomicWrapper.IPointer" + { + "name": "ConstantAtomicWrapper.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicArray.json b/test/schemas/reflect/metadata/DynamicArray.json index a5aee9ff25..cf582b9dc4 100644 --- a/test/schemas/reflect/metadata/DynamicArray.json +++ b/test/schemas/reflect/metadata/DynamicArray.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicArray" + { + "name": "DynamicArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicComposite.json b/test/schemas/reflect/metadata/DynamicComposite.json index b91f774204..71c438ca0e 100644 --- a/test/schemas/reflect/metadata/DynamicComposite.json +++ b/test/schemas/reflect/metadata/DynamicComposite.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicComposite" + { + "name": "DynamicComposite", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -215,7 +220,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -255,7 +261,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -343,7 +350,8 @@ "type": "string", "values": [ { - "value": "_postfix" + "value": "_postfix", + "tags": [] } ] } @@ -359,7 +367,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -423,7 +432,8 @@ "type": "string", "values": [ { - "value": "value_" + "value": "value_", + "tags": [] } ] } @@ -463,7 +473,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -535,7 +546,8 @@ "type": "string", "values": [ { - "value": "between_" + "value": "between_", + "tags": [] } ] } @@ -587,7 +599,8 @@ "type": "string", "values": [ { - "value": "_and_" + "value": "_and_", + "tags": [] } ] } @@ -627,7 +640,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/DynamicConstant.json b/test/schemas/reflect/metadata/DynamicConstant.json index 7a7a250139..6ff703abfc 100644 --- a/test/schemas/reflect/metadata/DynamicConstant.json +++ b/test/schemas/reflect/metadata/DynamicConstant.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicConstant" + { + "name": "DynamicConstant", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], @@ -104,7 +111,8 @@ "type": "string", "values": [ { - "value": "a" + "value": "a", + "tags": [] } ] } @@ -160,7 +168,8 @@ "type": "string", "values": [ { - "value": "b" + "value": "b", + "tags": [] } ] } @@ -216,7 +225,8 @@ "type": "string", "values": [ { - "value": "c" + "value": "c", + "tags": [] } ] } @@ -272,7 +282,8 @@ "type": "string", "values": [ { - "value": "d" + "value": "d", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/DynamicEnumeration.json b/test/schemas/reflect/metadata/DynamicEnumeration.json index eff38ca823..57b0f5848d 100644 --- a/test/schemas/reflect/metadata/DynamicEnumeration.json +++ b/test/schemas/reflect/metadata/DynamicEnumeration.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicEnumeration" + { + "name": "DynamicEnumeration", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], @@ -104,7 +111,8 @@ "type": "string", "values": [ { - "value": "ar" + "value": "ar", + "tags": [] } ] } @@ -160,7 +168,8 @@ "type": "string", "values": [ { - "value": "zh-Hans" + "value": "zh-Hans", + "tags": [] } ] } @@ -216,7 +225,8 @@ "type": "string", "values": [ { - "value": "zh-Hant" + "value": "zh-Hant", + "tags": [] } ] } @@ -272,7 +282,8 @@ "type": "string", "values": [ { - "value": "en" + "value": "en", + "tags": [] } ] } @@ -328,7 +339,8 @@ "type": "string", "values": [ { - "value": "fr" + "value": "fr", + "tags": [] } ] } @@ -384,7 +396,8 @@ "type": "string", "values": [ { - "value": "de" + "value": "de", + "tags": [] } ] } @@ -440,7 +453,8 @@ "type": "string", "values": [ { - "value": "ja" + "value": "ja", + "tags": [] } ] } @@ -496,7 +510,8 @@ "type": "string", "values": [ { - "value": "ko" + "value": "ko", + "tags": [] } ] } @@ -552,7 +567,8 @@ "type": "string", "values": [ { - "value": "pt" + "value": "pt", + "tags": [] } ] } @@ -608,7 +624,8 @@ "type": "string", "values": [ { - "value": "ru" + "value": "ru", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/DynamicJsonValue.json b/test/schemas/reflect/metadata/DynamicJsonValue.json index 258e660cec..741704a2d6 100644 --- a/test/schemas/reflect/metadata/DynamicJsonValue.json +++ b/test/schemas/reflect/metadata/DynamicJsonValue.json @@ -32,7 +32,10 @@ ], "tuples": [], "objects": [ - "DynamicJsonValue.JsonObject" + { + "name": "DynamicJsonValue.JsonObject", + "tags": [] + } ], "aliases": [], "natives": [], @@ -102,7 +105,10 @@ ], "tuples": [], "objects": [ - "DynamicJsonValue.JsonObject" + { + "name": "DynamicJsonValue.JsonObject", + "tags": [] + } ], "aliases": [], "natives": [], @@ -157,7 +163,10 @@ ], "tuples": [], "objects": [ - "DynamicJsonValue.JsonObject" + { + "name": "DynamicJsonValue.JsonObject", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicNever.json b/test/schemas/reflect/metadata/DynamicNever.json index 45551c10fb..b5e75faadc 100644 --- a/test/schemas/reflect/metadata/DynamicNever.json +++ b/test/schemas/reflect/metadata/DynamicNever.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicNever" + { + "name": "DynamicNever", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicSimple.json b/test/schemas/reflect/metadata/DynamicSimple.json index 56f71da9b3..647cc51956 100644 --- a/test/schemas/reflect/metadata/DynamicSimple.json +++ b/test/schemas/reflect/metadata/DynamicSimple.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicSimple" + { + "name": "DynamicSimple", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicTag.json b/test/schemas/reflect/metadata/DynamicTag.json index 8b61ed80a0..2f81aa66d4 100644 --- a/test/schemas/reflect/metadata/DynamicTag.json +++ b/test/schemas/reflect/metadata/DynamicTag.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicTag" + { + "name": "DynamicTag", + "tags": [] + } ], "aliases": [], "natives": [], @@ -142,7 +145,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -183,7 +186,7 @@ "name": "Format<\"email\">", "kind": "format", "value": "email", - "validate": "/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test($input)", + "validate": "$importInternal(\"isFormatEmail\")($input)", "exclusive": [ "format", "pattern" diff --git a/test/schemas/reflect/metadata/DynamicTemplate.json b/test/schemas/reflect/metadata/DynamicTemplate.json index 6995cec4eb..21f868e05f 100644 --- a/test/schemas/reflect/metadata/DynamicTemplate.json +++ b/test/schemas/reflect/metadata/DynamicTemplate.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicTemplate" + { + "name": "DynamicTemplate", + "tags": [] + } ], "aliases": [], "natives": [], @@ -51,7 +54,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -91,7 +95,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -179,7 +184,8 @@ "type": "string", "values": [ { - "value": "_postfix" + "value": "_postfix", + "tags": [] } ] } @@ -195,7 +201,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -259,7 +266,8 @@ "type": "string", "values": [ { - "value": "value_" + "value": "value_", + "tags": [] } ] } @@ -299,7 +307,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -363,7 +372,8 @@ "type": "string", "values": [ { - "value": "between_" + "value": "between_", + "tags": [] } ] } @@ -415,7 +425,8 @@ "type": "string", "values": [ { - "value": "_and_" + "value": "_and_", + "tags": [] } ] } @@ -455,7 +466,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/DynamicTree.json b/test/schemas/reflect/metadata/DynamicTree.json index 38fbb94253..29796dedfb 100644 --- a/test/schemas/reflect/metadata/DynamicTree.json +++ b/test/schemas/reflect/metadata/DynamicTree.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicTree" + { + "name": "DynamicTree", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "sequence" + "value": "sequence", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "children" + "value": "children", + "tags": [] } ] } @@ -182,7 +188,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -242,7 +251,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicTree" + { + "name": "DynamicTree", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicUndefined.json b/test/schemas/reflect/metadata/DynamicUndefined.json index f5da489a0e..27f034dc30 100644 --- a/test/schemas/reflect/metadata/DynamicUndefined.json +++ b/test/schemas/reflect/metadata/DynamicUndefined.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicUndefined" + { + "name": "DynamicUndefined", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/DynamicUnion.json b/test/schemas/reflect/metadata/DynamicUnion.json index 97dac6748a..573b60a051 100644 --- a/test/schemas/reflect/metadata/DynamicUnion.json +++ b/test/schemas/reflect/metadata/DynamicUnion.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "DynamicUnion" + { + "name": "DynamicUnion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -103,7 +106,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -143,7 +147,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -231,7 +236,8 @@ "type": "string", "values": [ { - "value": "_postfix" + "value": "_postfix", + "tags": [] } ] } @@ -247,7 +253,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -311,7 +318,8 @@ "type": "string", "values": [ { - "value": "value_between_" + "value": "value_between_", + "tags": [] } ] } @@ -363,7 +371,8 @@ "type": "string", "values": [ { - "value": "_and_" + "value": "_and_", + "tags": [] } ] } @@ -403,7 +412,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/FunctionalObjectUnion.json b/test/schemas/reflect/metadata/FunctionalObjectUnion.json index c86e87dfc7..9d8847b698 100644 --- a/test/schemas/reflect/metadata/FunctionalObjectUnion.json +++ b/test/schemas/reflect/metadata/FunctionalObjectUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "distance" + "value": "distance", + "tags": [] } ] } @@ -195,7 +198,10 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalObjectUnion.IPoint" + { + "name": "FunctionalObjectUnion.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -273,7 +279,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -303,7 +310,10 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalObjectUnion.IPoint" + { + "name": "FunctionalObjectUnion.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -326,7 +336,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -356,7 +367,10 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalObjectUnion.IPoint" + { + "name": "FunctionalObjectUnion.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -379,7 +393,8 @@ "type": "string", "values": [ { - "value": "length" + "value": "length", + "tags": [] } ] } @@ -470,7 +485,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -526,7 +542,8 @@ "type": "string", "values": [ { - "value": "length" + "value": "length", + "tags": [] } ] } @@ -617,7 +634,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -673,7 +691,8 @@ "type": "string", "values": [ { - "value": "length" + "value": "length", + "tags": [] } ] } @@ -753,7 +772,8 @@ "type": "string", "values": [ { - "value": "area" + "value": "area", + "tags": [] } ] } @@ -847,10 +867,22 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalObjectUnion.IPoint", - "FunctionalObjectUnion.ILine", - "FunctionalObjectUnion.IPolyline", - "FunctionalObjectUnion.IPolygon" + { + "name": "FunctionalObjectUnion.IPoint", + "tags": [] + }, + { + "name": "FunctionalObjectUnion.ILine", + "tags": [] + }, + { + "name": "FunctionalObjectUnion.IPolyline", + "tags": [] + }, + { + "name": "FunctionalObjectUnion.IPolygon", + "tags": [] + } ], "aliases": [], "natives": [], @@ -879,7 +911,10 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalObjectUnion.IPoint" + { + "name": "FunctionalObjectUnion.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/FunctionalProperty.json b/test/schemas/reflect/metadata/FunctionalProperty.json index 5ad41b898c..bf9fbdf564 100644 --- a/test/schemas/reflect/metadata/FunctionalProperty.json +++ b/test/schemas/reflect/metadata/FunctionalProperty.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalProperty" + { + "name": "FunctionalProperty", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "closure" + "value": "closure", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/FunctionalPropertyUnion.json b/test/schemas/reflect/metadata/FunctionalPropertyUnion.json index 7f8af4ca0d..291075727f 100644 --- a/test/schemas/reflect/metadata/FunctionalPropertyUnion.json +++ b/test/schemas/reflect/metadata/FunctionalPropertyUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "closure" + "value": "closure", + "tags": [] } ] } @@ -227,7 +229,10 @@ "arrays": [], "tuples": [], "objects": [ - "FunctionalPropertyUnion.IUnion" + { + "name": "FunctionalPropertyUnion.IUnion", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/InstanceUnion.json b/test/schemas/reflect/metadata/InstanceUnion.json index 6482a54783..e85ae5e046 100644 --- a/test/schemas/reflect/metadata/InstanceUnion.json +++ b/test/schemas/reflect/metadata/InstanceUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "scale" + "value": "scale", + "tags": [] } ] } @@ -73,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "position" + "value": "position", + "tags": [] } ] } @@ -126,7 +131,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -149,7 +157,8 @@ "type": "string", "values": [ { - "value": "rotate" + "value": "rotate", + "tags": [] } ] } @@ -179,7 +188,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -202,7 +214,8 @@ "type": "string", "values": [ { - "value": "pivot" + "value": "pivot", + "tags": [] } ] } @@ -232,7 +245,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -266,7 +282,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -322,7 +339,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -378,7 +396,8 @@ "type": "string", "values": [ { - "value": "z" + "value": "z", + "tags": [] } ] } @@ -445,7 +464,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -501,7 +521,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -557,7 +578,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -629,7 +651,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -659,7 +682,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -682,7 +708,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -712,7 +739,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -735,7 +765,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -807,7 +838,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -863,7 +895,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -930,7 +963,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -960,7 +994,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -983,7 +1020,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -1013,7 +1051,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1036,7 +1077,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -1066,7 +1108,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1089,7 +1134,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1161,7 +1207,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -1191,7 +1238,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1214,7 +1264,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -1244,7 +1295,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1267,7 +1321,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -1297,7 +1352,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1320,7 +1378,8 @@ "type": "string", "values": [ { - "value": "p4" + "value": "p4", + "tags": [] } ] } @@ -1350,7 +1409,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1373,7 +1435,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1445,7 +1508,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1501,7 +1565,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1573,7 +1638,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -1603,7 +1669,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPolyline" + { + "name": "ObjectUnionExplicit.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1626,7 +1695,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -1682,7 +1752,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1754,7 +1825,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1821,7 +1893,8 @@ "type": "string", "values": [ { - "value": "centroid" + "value": "centroid", + "tags": [] } ] } @@ -1851,7 +1924,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1874,7 +1950,8 @@ "type": "string", "values": [ { - "value": "radius" + "value": "radius", + "tags": [] } ] } @@ -1930,7 +2007,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -2009,11 +2087,11 @@ "rest": null, "arrays": [ { - "name": "Array", + "name": "Array", "tags": [] }, { - "name": "Array", + "name": "Array", "tags": [] }, { @@ -2036,36 +2114,45 @@ } ], "objects": [ - "ObjectSimple.IBox3D" + { + "name": "ObjectSimple.IBox3D", + "tags": [] + } ], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "boolean", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "boolean", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [ @@ -2107,7 +2194,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -2118,7 +2206,7 @@ "index": null }, { - "name": "Array", + "name": "Array", "value": { "any": false, "required": true, @@ -2127,7 +2215,7 @@ "functions": [], "atomics": [ { - "type": "boolean", + "type": "number", "tags": [] } ], @@ -2150,7 +2238,7 @@ "index": null }, { - "name": "Array", + "name": "Array", "value": { "any": false, "required": true, @@ -2159,7 +2247,7 @@ "functions": [], "atomics": [ { - "type": "number", + "type": "boolean", "tags": [] } ], @@ -2197,13 +2285,34 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.Discriminator<\"point\", ObjectUnionExplicit.IPoint>", - "ObjectUnionExplicit.Discriminator<\"line\", ObjectUnionExplicit.ILine>", - "ObjectUnionExplicit.Discriminator<\"triangle\", ObjectUnionExplicit.ITriangle>", - "ObjectUnionExplicit.Discriminator<\"rectangle\", ObjectUnionExplicit.IRectangle>", - "ObjectUnionExplicit.Discriminator<\"polyline\", ObjectUnionExplicit.IPolyline>", - "ObjectUnionExplicit.Discriminator<\"polygon\", ObjectUnionExplicit.IPolygon>", - "ObjectUnionExplicit.Discriminator<\"circle\", ObjectUnionExplicit.ICircle>" + { + "name": "ObjectUnionExplicit.Discriminator<\"point\", ObjectUnionExplicit.IPoint>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"line\", ObjectUnionExplicit.ILine>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"triangle\", ObjectUnionExplicit.ITriangle>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"rectangle\", ObjectUnionExplicit.IRectangle>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"polyline\", ObjectUnionExplicit.IPolyline>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"polygon\", ObjectUnionExplicit.IPolygon>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"circle\", ObjectUnionExplicit.ICircle>", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2232,7 +2341,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2261,7 +2373,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPolyline" + { + "name": "ObjectUnionExplicit.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/MapAlias.json b/test/schemas/reflect/metadata/MapAlias.json index 6f5fb59324..30151803db 100644 --- a/test/schemas/reflect/metadata/MapAlias.json +++ b/test/schemas/reflect/metadata/MapAlias.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapAlias" + { + "name": "MapAlias", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -122,7 +126,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -142,7 +147,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -224,7 +230,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -244,7 +251,8 @@ "type": "string", "values": [ { - "value": "strings" + "value": "strings", + "tags": [] } ] } @@ -326,7 +334,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -346,7 +355,8 @@ "type": "string", "values": [ { - "value": "arrays" + "value": "arrays", + "tags": [] } ] } @@ -428,7 +438,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -448,7 +459,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -497,7 +509,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapAlias.Person" + { + "name": "MapAlias.Person", + "tags": [] + } ], "aliases": [], "natives": [], @@ -527,7 +542,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -558,7 +574,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -614,7 +631,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -670,7 +688,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/MapSimple.json b/test/schemas/reflect/metadata/MapSimple.json index 376abf0397..b4ca701399 100644 --- a/test/schemas/reflect/metadata/MapSimple.json +++ b/test/schemas/reflect/metadata/MapSimple.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimple" + { + "name": "MapSimple", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -122,7 +126,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -142,7 +147,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -224,7 +230,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -244,7 +251,8 @@ "type": "string", "values": [ { - "value": "strings" + "value": "strings", + "tags": [] } ] } @@ -326,7 +334,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -346,7 +355,8 @@ "type": "string", "values": [ { - "value": "arrays" + "value": "arrays", + "tags": [] } ] } @@ -428,7 +438,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -448,7 +459,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -497,7 +509,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimple.Person" + { + "name": "MapSimple.Person", + "tags": [] + } ], "aliases": [], "natives": [], @@ -527,7 +542,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -558,7 +574,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -614,7 +631,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -670,7 +688,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/MapSimpleProtobuf.json b/test/schemas/reflect/metadata/MapSimpleProtobuf.json index 59b5a971d1..0a3ba2f243 100644 --- a/test/schemas/reflect/metadata/MapSimpleProtobuf.json +++ b/test/schemas/reflect/metadata/MapSimpleProtobuf.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimpleProtobuf" + { + "name": "MapSimpleProtobuf", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -122,7 +126,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -142,7 +147,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -217,7 +223,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -238,7 +244,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -258,7 +265,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -340,7 +348,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -360,7 +369,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -442,7 +452,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -462,7 +473,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -558,7 +570,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -578,7 +591,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -653,11 +667,15 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -677,7 +695,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -750,13 +769,17 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimpleProtobuf" + { + "name": "MapSimpleProtobuf", + "tags": [] + } ], "aliases": [], "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, diff --git a/test/schemas/reflect/metadata/MapSimpleProtobufNullable.json b/test/schemas/reflect/metadata/MapSimpleProtobufNullable.json index 25bd186d8e..37f3e7eb32 100644 --- a/test/schemas/reflect/metadata/MapSimpleProtobufNullable.json +++ b/test/schemas/reflect/metadata/MapSimpleProtobufNullable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimpleProtobufNullable" + { + "name": "MapSimpleProtobufNullable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -122,7 +126,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -142,7 +147,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -217,7 +223,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -238,7 +244,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -258,7 +265,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -340,7 +348,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -360,7 +369,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -442,7 +452,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -462,7 +473,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -558,7 +570,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -578,7 +591,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -653,11 +667,15 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -677,7 +695,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -750,13 +769,17 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimpleProtobufNullable" + { + "name": "MapSimpleProtobufNullable", + "tags": [] + } ], "aliases": [], "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, diff --git a/test/schemas/reflect/metadata/MapSimpleProtobufOptional.json b/test/schemas/reflect/metadata/MapSimpleProtobufOptional.json index 75ea5d4e02..d7f6352b28 100644 --- a/test/schemas/reflect/metadata/MapSimpleProtobufOptional.json +++ b/test/schemas/reflect/metadata/MapSimpleProtobufOptional.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimpleProtobufOptional" + { + "name": "MapSimpleProtobufOptional", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -122,7 +126,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -142,7 +147,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -217,7 +223,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -238,7 +244,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -258,7 +265,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -340,7 +348,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -360,7 +369,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -442,7 +452,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -462,7 +473,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -558,7 +570,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -578,7 +591,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -653,11 +667,15 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, @@ -677,7 +695,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -750,13 +769,17 @@ "arrays": [], "tuples": [], "objects": [ - "MapSimpleProtobufOptional" + { + "name": "MapSimpleProtobufOptional", + "tags": [] + } ], "aliases": [], "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, diff --git a/test/schemas/reflect/metadata/MapUnion.json b/test/schemas/reflect/metadata/MapUnion.json index 69207e868b..0fbcb2e0eb 100644 --- a/test/schemas/reflect/metadata/MapUnion.json +++ b/test/schemas/reflect/metadata/MapUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -238,7 +241,7 @@ "functions": [], "atomics": [ { - "type": "boolean", + "type": "string", "tags": [] } ], @@ -277,7 +280,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] }, { "key": { @@ -288,7 +292,7 @@ "functions": [], "atomics": [ { - "type": "number", + "type": "boolean", "tags": [] } ], @@ -327,7 +331,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] }, { "key": { @@ -338,7 +343,7 @@ "functions": [], "atomics": [ { - "type": "string", + "type": "number", "tags": [] } ], @@ -377,7 +382,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] }, { "key": { @@ -427,7 +433,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] }, { "key": { @@ -444,7 +451,10 @@ "arrays": [], "tuples": [], "objects": [ - "MapUnion.Person" + { + "name": "MapUnion.Person", + "tags": [] + } ], "aliases": [], "natives": [], @@ -474,7 +484,8 @@ "natives": [], "sets": [], "maps": [] - } + }, + "tags": [] } ] }, diff --git a/test/schemas/reflect/metadata/NativeAlias.json b/test/schemas/reflect/metadata/NativeAlias.json index 9a87f89897..b833533637 100644 --- a/test/schemas/reflect/metadata/NativeAlias.json +++ b/test/schemas/reflect/metadata/NativeAlias.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "NativeAlias" + { + "name": "NativeAlias", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "date" + "value": "date", + "tags": [] } ] } @@ -82,7 +86,10 @@ "objects": [], "aliases": [], "natives": [ - "Date" + { + "name": "Date", + "tags": [] + } ], "sets": [], "maps": [] @@ -137,7 +144,8 @@ "type": "string", "values": [ { - "value": "uint8Array" + "value": "uint8Array", + "tags": [] } ] } @@ -169,7 +177,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -190,7 +201,8 @@ "type": "string", "values": [ { - "value": "uint8ClampedArray" + "value": "uint8ClampedArray", + "tags": [] } ] } @@ -222,7 +234,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8ClampedArray" + { + "name": "Uint8ClampedArray", + "tags": [] + } ], "sets": [], "maps": [] @@ -243,7 +258,8 @@ "type": "string", "values": [ { - "value": "uint16Array" + "value": "uint16Array", + "tags": [] } ] } @@ -275,7 +291,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint16Array" + { + "name": "Uint16Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -296,7 +315,8 @@ "type": "string", "values": [ { - "value": "uint32Array" + "value": "uint32Array", + "tags": [] } ] } @@ -328,7 +348,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint32Array" + { + "name": "Uint32Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -349,7 +372,8 @@ "type": "string", "values": [ { - "value": "bigUint64Array" + "value": "bigUint64Array", + "tags": [] } ] } @@ -381,7 +405,10 @@ "objects": [], "aliases": [], "natives": [ - "BigUint64Array" + { + "name": "BigUint64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -402,7 +429,8 @@ "type": "string", "values": [ { - "value": "int8Array" + "value": "int8Array", + "tags": [] } ] } @@ -434,7 +462,10 @@ "objects": [], "aliases": [], "natives": [ - "Int8Array" + { + "name": "Int8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -455,7 +486,8 @@ "type": "string", "values": [ { - "value": "int16Array" + "value": "int16Array", + "tags": [] } ] } @@ -487,7 +519,10 @@ "objects": [], "aliases": [], "natives": [ - "Int16Array" + { + "name": "Int16Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -508,7 +543,8 @@ "type": "string", "values": [ { - "value": "int32Array" + "value": "int32Array", + "tags": [] } ] } @@ -540,7 +576,10 @@ "objects": [], "aliases": [], "natives": [ - "Int32Array" + { + "name": "Int32Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -561,7 +600,8 @@ "type": "string", "values": [ { - "value": "bigInt64Array" + "value": "bigInt64Array", + "tags": [] } ] } @@ -593,7 +633,10 @@ "objects": [], "aliases": [], "natives": [ - "BigInt64Array" + { + "name": "BigInt64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -614,7 +657,8 @@ "type": "string", "values": [ { - "value": "float32Array" + "value": "float32Array", + "tags": [] } ] } @@ -646,7 +690,10 @@ "objects": [], "aliases": [], "natives": [ - "Float32Array" + { + "name": "Float32Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -667,7 +714,8 @@ "type": "string", "values": [ { - "value": "float64Array" + "value": "float64Array", + "tags": [] } ] } @@ -699,7 +747,10 @@ "objects": [], "aliases": [], "natives": [ - "Float64Array" + { + "name": "Float64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -720,7 +771,8 @@ "type": "string", "values": [ { - "value": "arrayBuffer" + "value": "arrayBuffer", + "tags": [] } ] } @@ -752,7 +804,10 @@ "objects": [], "aliases": [], "natives": [ - "ArrayBuffer" + { + "name": "ArrayBuffer", + "tags": [] + } ], "sets": [], "maps": [] @@ -773,7 +828,8 @@ "type": "string", "values": [ { - "value": "sharedArrayBuffer" + "value": "sharedArrayBuffer", + "tags": [] } ] } @@ -805,7 +861,10 @@ "objects": [], "aliases": [], "natives": [ - "SharedArrayBuffer" + { + "name": "SharedArrayBuffer", + "tags": [] + } ], "sets": [], "maps": [] @@ -826,7 +885,8 @@ "type": "string", "values": [ { - "value": "dataView" + "value": "dataView", + "tags": [] } ] } @@ -858,7 +918,10 @@ "objects": [], "aliases": [], "natives": [ - "DataView" + { + "name": "DataView", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/NativeSimple.json b/test/schemas/reflect/metadata/NativeSimple.json index dbf33f71c5..c56c066078 100644 --- a/test/schemas/reflect/metadata/NativeSimple.json +++ b/test/schemas/reflect/metadata/NativeSimple.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "NativeSimple" + { + "name": "NativeSimple", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "date" + "value": "date", + "tags": [] } ] } @@ -82,7 +86,10 @@ "objects": [], "aliases": [], "natives": [ - "Date" + { + "name": "Date", + "tags": [] + } ], "sets": [], "maps": [] @@ -137,7 +144,8 @@ "type": "string", "values": [ { - "value": "uint8Array" + "value": "uint8Array", + "tags": [] } ] } @@ -169,7 +177,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -190,7 +201,8 @@ "type": "string", "values": [ { - "value": "uint8ClampedArray" + "value": "uint8ClampedArray", + "tags": [] } ] } @@ -222,7 +234,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8ClampedArray" + { + "name": "Uint8ClampedArray", + "tags": [] + } ], "sets": [], "maps": [] @@ -243,7 +258,8 @@ "type": "string", "values": [ { - "value": "uint16Array" + "value": "uint16Array", + "tags": [] } ] } @@ -275,7 +291,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint16Array" + { + "name": "Uint16Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -296,7 +315,8 @@ "type": "string", "values": [ { - "value": "uint32Array" + "value": "uint32Array", + "tags": [] } ] } @@ -328,7 +348,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint32Array" + { + "name": "Uint32Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -349,7 +372,8 @@ "type": "string", "values": [ { - "value": "bigUint64Array" + "value": "bigUint64Array", + "tags": [] } ] } @@ -381,7 +405,10 @@ "objects": [], "aliases": [], "natives": [ - "BigUint64Array" + { + "name": "BigUint64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -402,7 +429,8 @@ "type": "string", "values": [ { - "value": "int8Array" + "value": "int8Array", + "tags": [] } ] } @@ -434,7 +462,10 @@ "objects": [], "aliases": [], "natives": [ - "Int8Array" + { + "name": "Int8Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -455,7 +486,8 @@ "type": "string", "values": [ { - "value": "int16Array" + "value": "int16Array", + "tags": [] } ] } @@ -487,7 +519,10 @@ "objects": [], "aliases": [], "natives": [ - "Int16Array" + { + "name": "Int16Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -508,7 +543,8 @@ "type": "string", "values": [ { - "value": "int32Array" + "value": "int32Array", + "tags": [] } ] } @@ -540,7 +576,10 @@ "objects": [], "aliases": [], "natives": [ - "Int32Array" + { + "name": "Int32Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -561,7 +600,8 @@ "type": "string", "values": [ { - "value": "bigInt64Array" + "value": "bigInt64Array", + "tags": [] } ] } @@ -593,7 +633,10 @@ "objects": [], "aliases": [], "natives": [ - "BigInt64Array" + { + "name": "BigInt64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -614,7 +657,8 @@ "type": "string", "values": [ { - "value": "float32Array" + "value": "float32Array", + "tags": [] } ] } @@ -646,7 +690,10 @@ "objects": [], "aliases": [], "natives": [ - "Float32Array" + { + "name": "Float32Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -667,7 +714,8 @@ "type": "string", "values": [ { - "value": "float64Array" + "value": "float64Array", + "tags": [] } ] } @@ -699,7 +747,10 @@ "objects": [], "aliases": [], "natives": [ - "Float64Array" + { + "name": "Float64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -720,7 +771,8 @@ "type": "string", "values": [ { - "value": "arrayBuffer" + "value": "arrayBuffer", + "tags": [] } ] } @@ -752,7 +804,10 @@ "objects": [], "aliases": [], "natives": [ - "ArrayBuffer" + { + "name": "ArrayBuffer", + "tags": [] + } ], "sets": [], "maps": [] @@ -773,7 +828,8 @@ "type": "string", "values": [ { - "value": "sharedArrayBuffer" + "value": "sharedArrayBuffer", + "tags": [] } ] } @@ -805,7 +861,10 @@ "objects": [], "aliases": [], "natives": [ - "SharedArrayBuffer" + { + "name": "SharedArrayBuffer", + "tags": [] + } ], "sets": [], "maps": [] @@ -826,7 +885,8 @@ "type": "string", "values": [ { - "value": "dataView" + "value": "dataView", + "tags": [] } ] } @@ -858,7 +918,10 @@ "objects": [], "aliases": [], "natives": [ - "DataView" + { + "name": "DataView", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/NativeUnion.json b/test/schemas/reflect/metadata/NativeUnion.json index 9e823ff2d9..d185154992 100644 --- a/test/schemas/reflect/metadata/NativeUnion.json +++ b/test/schemas/reflect/metadata/NativeUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "date" + "value": "date", + "tags": [] } ] } @@ -85,7 +86,10 @@ "objects": [], "aliases": [], "natives": [ - "Date" + { + "name": "Date", + "tags": [] + } ], "sets": [], "maps": [] @@ -140,7 +144,8 @@ "type": "string", "values": [ { - "value": "unsigned" + "value": "unsigned", + "tags": [] } ] } @@ -172,11 +177,26 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array", - "Uint8ClampedArray", - "Uint16Array", - "Uint32Array", - "BigUint64Array" + { + "name": "Uint8Array", + "tags": [] + }, + { + "name": "Uint8ClampedArray", + "tags": [] + }, + { + "name": "Uint16Array", + "tags": [] + }, + { + "name": "Uint32Array", + "tags": [] + }, + { + "name": "BigUint64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -197,7 +217,8 @@ "type": "string", "values": [ { - "value": "signed" + "value": "signed", + "tags": [] } ] } @@ -229,10 +250,22 @@ "objects": [], "aliases": [], "natives": [ - "Int8Array", - "Int16Array", - "Int32Array", - "BigInt64Array" + { + "name": "Int8Array", + "tags": [] + }, + { + "name": "Int16Array", + "tags": [] + }, + { + "name": "Int32Array", + "tags": [] + }, + { + "name": "BigInt64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -253,7 +286,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -285,8 +319,14 @@ "objects": [], "aliases": [], "natives": [ - "Float32Array", - "Float64Array" + { + "name": "Float32Array", + "tags": [] + }, + { + "name": "Float64Array", + "tags": [] + } ], "sets": [], "maps": [] @@ -307,7 +347,8 @@ "type": "string", "values": [ { - "value": "buffer" + "value": "buffer", + "tags": [] } ] } @@ -339,8 +380,14 @@ "objects": [], "aliases": [], "natives": [ - "ArrayBuffer", - "SharedArrayBuffer" + { + "name": "ArrayBuffer", + "tags": [] + }, + { + "name": "SharedArrayBuffer", + "tags": [] + } ], "sets": [], "maps": [] @@ -375,7 +422,10 @@ "arrays": [], "tuples": [], "objects": [ - "NativeUnion.Union" + { + "name": "NativeUnion.Union", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectAlias.json b/test/schemas/reflect/metadata/ObjectAlias.json index b1558ba147..1d210dedf5 100644 --- a/test/schemas/reflect/metadata/ObjectAlias.json +++ b/test/schemas/reflect/metadata/ObjectAlias.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -211,7 +214,8 @@ "type": "string", "values": [ { - "value": "sex" + "value": "sex", + "tags": [] } ] } @@ -289,7 +293,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -345,7 +350,8 @@ "type": "string", "values": [ { - "value": "dead" + "value": "dead", + "tags": [] } ] } @@ -415,7 +421,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectAlias.IMember" + { + "name": "ObjectAlias.IMember", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectClosure.json b/test/schemas/reflect/metadata/ObjectClosure.json index 62f2fe30ce..89a71c1596 100644 --- a/test/schemas/reflect/metadata/ObjectClosure.json +++ b/test/schemas/reflect/metadata/ObjectClosure.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectClosure.IRecord" + { + "name": "ObjectClosure.IRecord", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "open" + "value": "open", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectDate.json b/test/schemas/reflect/metadata/ObjectDate.json index 3a2506515c..97dcbcea65 100644 --- a/test/schemas/reflect/metadata/ObjectDate.json +++ b/test/schemas/reflect/metadata/ObjectDate.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectDate" + { + "name": "ObjectDate", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "classDate" + "value": "classDate", + "tags": [] } ] } @@ -82,7 +86,10 @@ "objects": [], "aliases": [], "natives": [ - "Date" + { + "name": "Date", + "tags": [] + } ], "sets": [], "maps": [] @@ -137,7 +144,8 @@ "type": "string", "values": [ { - "value": "date" + "value": "date", + "tags": [] } ] } @@ -169,7 +177,7 @@ "name": "Format<\"date\">", "kind": "format", "value": "date", - "validate": "/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test($input)", + "validate": "$importInternal(\"isFormatDate\")($input)", "exclusive": [ "format", "pattern" @@ -210,7 +218,8 @@ "type": "string", "values": [ { - "value": "datetime" + "value": "datetime", + "tags": [] } ] } @@ -242,7 +251,7 @@ "name": "Format<\"date-time\">", "kind": "format", "value": "date-time", - "validate": "/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test($input)", + "validate": "$importInternal(\"isFormatDateTime\")($input)", "exclusive": [ "format", "pattern" @@ -283,7 +292,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -315,7 +325,7 @@ "name": "Format<\"time\">", "kind": "format", "value": "time", - "validate": "/^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test($input)", + "validate": "$importInternal(\"isFormatTime\")($input)", "exclusive": [ "format", "pattern" @@ -356,7 +366,8 @@ "type": "string", "values": [ { - "value": "duration" + "value": "duration", + "tags": [] } ] } @@ -388,7 +399,7 @@ "name": "Format<\"duration\">", "kind": "format", "value": "duration", - "validate": "/^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/.test($input)", + "validate": "$importInternal(\"isFormatDuration\")($input)", "exclusive": [ "format", "pattern" diff --git a/test/schemas/reflect/metadata/ObjectDescription.json b/test/schemas/reflect/metadata/ObjectDescription.json index 9158e2f143..c0fbcd3d93 100644 --- a/test/schemas/reflect/metadata/ObjectDescription.json +++ b/test/schemas/reflect/metadata/ObjectDescription.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectDescription" + { + "name": "ObjectDescription", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -123,7 +127,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -183,7 +188,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -249,7 +255,8 @@ "type": "string", "values": [ { - "value": "descriptions" + "value": "descriptions", + "tags": [] } ] } @@ -305,7 +312,8 @@ "type": "string", "values": [ { - "value": "newLine" + "value": "newLine", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectDynamic.json b/test/schemas/reflect/metadata/ObjectDynamic.json index 94bcb1b2c5..6db2da5abc 100644 --- a/test/schemas/reflect/metadata/ObjectDynamic.json +++ b/test/schemas/reflect/metadata/ObjectDynamic.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectDynamic" + { + "name": "ObjectDynamic", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectGeneric.json b/test/schemas/reflect/metadata/ObjectGeneric.json index a591eeaad8..bc0d826462 100644 --- a/test/schemas/reflect/metadata/ObjectGeneric.json +++ b/test/schemas/reflect/metadata/ObjectGeneric.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "child" + "value": "child", + "tags": [] } ] } @@ -129,7 +131,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.IChild" + { + "name": "ObjectGeneric.IChild", + "tags": [] + } ], "aliases": [], "natives": [], @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "elements" + "value": "elements", + "tags": [] } ] } @@ -219,7 +225,8 @@ "type": "string", "values": [ { - "value": "child_value" + "value": "child_value", + "tags": [] } ] } @@ -275,7 +282,8 @@ "type": "string", "values": [ { - "value": "child_next" + "value": "child_next", + "tags": [] } ] } @@ -342,7 +350,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -398,7 +407,8 @@ "type": "string", "values": [ { - "value": "child" + "value": "child", + "tags": [] } ] } @@ -428,7 +438,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.IChild" + { + "name": "ObjectGeneric.IChild", + "tags": [] + } ], "aliases": [], "natives": [], @@ -451,7 +464,8 @@ "type": "string", "values": [ { - "value": "elements" + "value": "elements", + "tags": [] } ] } @@ -518,7 +532,8 @@ "type": "string", "values": [ { - "value": "child_value" + "value": "child_value", + "tags": [] } ] } @@ -574,7 +589,8 @@ "type": "string", "values": [ { - "value": "child_next" + "value": "child_next", + "tags": [] } ] } @@ -641,7 +657,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -697,7 +714,8 @@ "type": "string", "values": [ { - "value": "child" + "value": "child", + "tags": [] } ] } @@ -727,7 +745,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.IChild" + { + "name": "ObjectGeneric.IChild", + "tags": [] + } ], "aliases": [], "natives": [], @@ -750,7 +771,8 @@ "type": "string", "values": [ { - "value": "elements" + "value": "elements", + "tags": [] } ] } @@ -817,7 +839,8 @@ "type": "string", "values": [ { - "value": "child_value" + "value": "child_value", + "tags": [] } ] } @@ -873,7 +896,8 @@ "type": "string", "values": [ { - "value": "child_next" + "value": "child_next", + "tags": [] } ] } @@ -943,7 +967,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.IChild" + { + "name": "ObjectGeneric.IChild", + "tags": [] + } ], "aliases": [], "natives": [], @@ -972,7 +999,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.IChild" + { + "name": "ObjectGeneric.IChild", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1001,7 +1031,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.IChild" + { + "name": "ObjectGeneric.IChild", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1034,7 +1067,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.ISomething" + { + "name": "ObjectGeneric.ISomething", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1055,7 +1091,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.ISomething" + { + "name": "ObjectGeneric.ISomething", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1076,7 +1115,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGeneric.ISomething" + { + "name": "ObjectGeneric.ISomething", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectGenericAlias.json b/test/schemas/reflect/metadata/ObjectGenericAlias.json index 4010167a98..456ccea562 100644 --- a/test/schemas/reflect/metadata/ObjectGenericAlias.json +++ b/test/schemas/reflect/metadata/ObjectGenericAlias.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericAlias.Alias" + { + "name": "ObjectGenericAlias.Alias", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectGenericArray.json b/test/schemas/reflect/metadata/ObjectGenericArray.json index b91fd5b959..5cb0617bf3 100644 --- a/test/schemas/reflect/metadata/ObjectGenericArray.json +++ b/test/schemas/reflect/metadata/ObjectGenericArray.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericArray" + { + "name": "ObjectGenericArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "pagination" + "value": "pagination", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericArray.IPagination" + { + "name": "ObjectGenericArray.IPagination", + "tags": [] + } ], "aliases": [], "natives": [], @@ -93,7 +100,8 @@ "type": "string", "values": [ { - "value": "data" + "value": "data", + "tags": [] } ] } @@ -160,7 +168,8 @@ "type": "string", "values": [ { - "value": "page" + "value": "page", + "tags": [] } ] } @@ -216,7 +225,8 @@ "type": "string", "values": [ { - "value": "limit" + "value": "limit", + "tags": [] } ] } @@ -272,7 +282,8 @@ "type": "string", "values": [ { - "value": "total_count" + "value": "total_count", + "tags": [] } ] } @@ -328,7 +339,8 @@ "type": "string", "values": [ { - "value": "total_pages" + "value": "total_pages", + "tags": [] } ] } @@ -395,7 +407,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -451,7 +464,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -521,7 +535,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericArray.IPerson" + { + "name": "ObjectGenericArray.IPerson", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectGenericUnion.json b/test/schemas/reflect/metadata/ObjectGenericUnion.json index bc411d1a97..50b4b3e549 100644 --- a/test/schemas/reflect/metadata/ObjectGenericUnion.json +++ b/test/schemas/reflect/metadata/ObjectGenericUnion.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion" + { + "name": "ObjectGenericUnion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -70,8 +74,14 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion.ISaleReview", - "ObjectGenericUnion.ISaleQuestion" + { + "name": "ObjectGenericUnion.ISaleReview", + "tags": [] + }, + { + "name": "ObjectGenericUnion.ISaleQuestion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -105,7 +115,8 @@ "type": "string", "values": [ { - "value": "writer" + "value": "writer", + "tags": [] } ] } @@ -161,7 +172,8 @@ "type": "string", "values": [ { - "value": "answer" + "value": "answer", + "tags": [] } ] } @@ -191,7 +203,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion.ISaleAnswer" + { + "name": "ObjectGenericUnion.ISaleAnswer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -214,7 +229,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -270,7 +286,8 @@ "type": "string", "values": [ { - "value": "hit" + "value": "hit", + "tags": [] } ] } @@ -326,7 +343,8 @@ "type": "string", "values": [ { - "value": "contents" + "value": "contents", + "tags": [] } ] } @@ -382,7 +400,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -449,7 +468,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -505,7 +525,8 @@ "type": "string", "values": [ { - "value": "hit" + "value": "hit", + "tags": [] } ] } @@ -561,7 +582,8 @@ "type": "string", "values": [ { - "value": "contents" + "value": "contents", + "tags": [] } ] } @@ -617,7 +639,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -684,7 +707,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -740,7 +764,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -796,7 +821,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -852,7 +878,8 @@ "type": "string", "values": [ { - "value": "body" + "value": "body", + "tags": [] } ] } @@ -908,7 +935,8 @@ "type": "string", "values": [ { - "value": "files" + "value": "files", + "tags": [] } ] } @@ -975,7 +1003,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1031,7 +1060,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -1087,7 +1117,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -1154,7 +1185,8 @@ "type": "string", "values": [ { - "value": "writer" + "value": "writer", + "tags": [] } ] } @@ -1210,7 +1242,8 @@ "type": "string", "values": [ { - "value": "answer" + "value": "answer", + "tags": [] } ] } @@ -1240,7 +1273,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion.ISaleAnswer" + { + "name": "ObjectGenericUnion.ISaleAnswer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1263,7 +1299,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1319,7 +1356,8 @@ "type": "string", "values": [ { - "value": "hit" + "value": "hit", + "tags": [] } ] } @@ -1375,7 +1413,8 @@ "type": "string", "values": [ { - "value": "contents" + "value": "contents", + "tags": [] } ] } @@ -1431,7 +1470,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -1498,7 +1538,8 @@ "type": "string", "values": [ { - "value": "score" + "value": "score", + "tags": [] } ] } @@ -1554,7 +1595,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1610,7 +1652,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -1666,7 +1709,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -1722,7 +1766,8 @@ "type": "string", "values": [ { - "value": "body" + "value": "body", + "tags": [] } ] } @@ -1778,7 +1823,8 @@ "type": "string", "values": [ { - "value": "files" + "value": "files", + "tags": [] } ] } @@ -1848,7 +1894,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion.ISaleArticle.IContent" + { + "name": "ObjectGenericUnion.ISaleArticle.IContent", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1877,7 +1926,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion.IAttachmentFile" + { + "name": "ObjectGenericUnion.IAttachmentFile", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1906,7 +1958,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectGenericUnion.ISaleReview.IContent" + { + "name": "ObjectGenericUnion.ISaleReview.IContent", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectHierarchical.json b/test/schemas/reflect/metadata/ObjectHierarchical.json index df57d01d57..3d235ca072 100644 --- a/test/schemas/reflect/metadata/ObjectHierarchical.json +++ b/test/schemas/reflect/metadata/ObjectHierarchical.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.ICustomer" + { + "name": "ObjectHierarchical.ICustomer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "channel" + "value": "channel", + "tags": [] } ] } @@ -126,7 +131,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.IChannel" + { + "name": "ObjectHierarchical.IChannel", + "tags": [] + } ], "aliases": [], "natives": [], @@ -149,7 +157,8 @@ "type": "string", "values": [ { - "value": "member" + "value": "member", + "tags": [] } ] } @@ -179,7 +188,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.IMember" + { + "name": "ObjectHierarchical.IMember", + "tags": [] + } ], "aliases": [], "natives": [], @@ -202,7 +214,8 @@ "type": "string", "values": [ { - "value": "account" + "value": "account", + "tags": [] } ] } @@ -232,7 +245,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.IAccount" + { + "name": "ObjectHierarchical.IAccount", + "tags": [] + } ], "aliases": [], "natives": [], @@ -255,7 +271,8 @@ "type": "string", "values": [ { - "value": "href" + "value": "href", + "tags": [] } ] } @@ -311,7 +328,8 @@ "type": "string", "values": [ { - "value": "referrer" + "value": "referrer", + "tags": [] } ] } @@ -367,7 +385,8 @@ "type": "string", "values": [ { - "value": "ip" + "value": "ip", + "tags": [] } ] } @@ -423,7 +442,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -453,7 +473,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.ITimestamp" + { + "name": "ObjectHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -487,7 +510,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -543,7 +567,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -599,7 +624,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -655,7 +681,8 @@ "type": "string", "values": [ { - "value": "sequence" + "value": "sequence", + "tags": [] } ] } @@ -711,7 +738,8 @@ "type": "string", "values": [ { - "value": "exclusive" + "value": "exclusive", + "tags": [] } ] } @@ -767,7 +795,8 @@ "type": "string", "values": [ { - "value": "priority" + "value": "priority", + "tags": [] } ] } @@ -823,7 +852,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -853,7 +883,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.ITimestamp" + { + "name": "ObjectHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -887,7 +920,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -943,7 +977,8 @@ "type": "string", "values": [ { - "value": "zone" + "value": "zone", + "tags": [] } ] } @@ -1010,7 +1045,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1066,7 +1102,8 @@ "type": "string", "values": [ { - "value": "account" + "value": "account", + "tags": [] } ] } @@ -1096,7 +1133,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.IAccount" + { + "name": "ObjectHierarchical.IAccount", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1119,7 +1159,8 @@ "type": "string", "values": [ { - "value": "enterprise" + "value": "enterprise", + "tags": [] } ] } @@ -1149,7 +1190,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.IEnterprise" + { + "name": "ObjectHierarchical.IEnterprise", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1172,7 +1216,8 @@ "type": "string", "values": [ { - "value": "emails" + "value": "emails", + "tags": [] } ] } @@ -1228,7 +1273,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -1258,7 +1304,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.ITimestamp" + { + "name": "ObjectHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1281,7 +1330,8 @@ "type": "string", "values": [ { - "value": "authorized" + "value": "authorized", + "tags": [] } ] } @@ -1348,7 +1398,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1404,7 +1455,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -1460,7 +1512,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -1490,7 +1543,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.ITimestamp" + { + "name": "ObjectHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1525,7 +1581,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -1581,7 +1638,8 @@ "type": "string", "values": [ { - "value": "account" + "value": "account", + "tags": [] } ] } @@ -1611,7 +1669,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.IAccount" + { + "name": "ObjectHierarchical.IAccount", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1634,7 +1695,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -1690,7 +1752,8 @@ "type": "string", "values": [ { - "value": "grade" + "value": "grade", + "tags": [] } ] } @@ -1746,7 +1809,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -1776,7 +1840,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHierarchical.ITimestamp" + { + "name": "ObjectHierarchical.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectHttpArray.json b/test/schemas/reflect/metadata/ObjectHttpArray.json index 35a0a60043..7108365eae 100644 --- a/test/schemas/reflect/metadata/ObjectHttpArray.json +++ b/test/schemas/reflect/metadata/ObjectHttpArray.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpArray" + { + "name": "ObjectHttpArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "booleans" + "value": "booleans", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "bigints" + "value": "bigints", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "numbers" + "value": "numbers", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "strings" + "value": "strings", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "templates" + "value": "templates", + "tags": [] } ] } @@ -471,7 +479,8 @@ "type": "string", "values": [ { - "value": "something_" + "value": "something_", + "tags": [] } ] } @@ -511,7 +520,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/ObjectHttpAtomic.json b/test/schemas/reflect/metadata/ObjectHttpAtomic.json index e0b9c5d35c..bbaa821a86 100644 --- a/test/schemas/reflect/metadata/ObjectHttpAtomic.json +++ b/test/schemas/reflect/metadata/ObjectHttpAtomic.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpAtomic" + { + "name": "ObjectHttpAtomic", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectHttpCommentTag.json b/test/schemas/reflect/metadata/ObjectHttpCommentTag.json index 1b9f46aacf..2131370eca 100644 --- a/test/schemas/reflect/metadata/ObjectHttpCommentTag.json +++ b/test/schemas/reflect/metadata/ObjectHttpCommentTag.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpCommentTag" + { + "name": "ObjectHttpCommentTag", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "int" + "value": "int", + "tags": [] } ] } @@ -120,7 +124,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -153,7 +158,10 @@ "kind": "type", "value": "uint64", "validate": "BigInt(0) <= $input", - "exclusive": true + "exclusive": true, + "schema": { + "minimum": 0 + } } ] ] @@ -197,7 +205,8 @@ "type": "string", "values": [ { - "value": "uuid" + "value": "uuid", + "tags": [] } ] } @@ -277,7 +286,8 @@ "type": "string", "values": [ { - "value": "items" + "value": "items", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectHttpConstant.json b/test/schemas/reflect/metadata/ObjectHttpConstant.json index 724f63aafd..34200f66b3 100644 --- a/test/schemas/reflect/metadata/ObjectHttpConstant.json +++ b/test/schemas/reflect/metadata/ObjectHttpConstant.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpConstant" + { + "name": "ObjectHttpConstant", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -101,7 +105,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -166,7 +171,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -231,7 +237,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -300,7 +307,8 @@ "type": "string", "values": [ { - "value": "template" + "value": "template", + "tags": [] } ] } @@ -339,7 +347,8 @@ "type": "string", "values": [ { - "value": "abcd_" + "value": "abcd_", + "tags": [] } ] } @@ -379,7 +388,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/ObjectHttpFormData.json b/test/schemas/reflect/metadata/ObjectHttpFormData.json index 80717c9e00..6c9d42309b 100644 --- a/test/schemas/reflect/metadata/ObjectHttpFormData.json +++ b/test/schemas/reflect/metadata/ObjectHttpFormData.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpFormData" + { + "name": "ObjectHttpFormData", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -113,7 +117,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -169,7 +174,8 @@ "type": "string", "values": [ { - "value": "integers" + "value": "integers", + "tags": [] } ] } @@ -225,7 +231,8 @@ "type": "string", "values": [ { - "value": "blob" + "value": "blob", + "tags": [] } ] } @@ -257,7 +264,10 @@ "objects": [], "aliases": [], "natives": [ - "Blob" + { + "name": "Blob", + "tags": [] + } ], "sets": [], "maps": [] @@ -278,7 +288,8 @@ "type": "string", "values": [ { - "value": "blobs" + "value": "blobs", + "tags": [] } ] } @@ -334,7 +345,8 @@ "type": "string", "values": [ { - "value": "file" + "value": "file", + "tags": [] } ] } @@ -366,7 +378,10 @@ "objects": [], "aliases": [], "natives": [ - "File" + { + "name": "File", + "tags": [] + } ], "sets": [], "maps": [] @@ -387,7 +402,8 @@ "type": "string", "values": [ { - "value": "files" + "value": "files", + "tags": [] } ] } @@ -459,7 +475,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -505,7 +521,10 @@ "objects": [], "aliases": [], "natives": [ - "Blob" + { + "name": "Blob", + "tags": [] + } ], "sets": [], "maps": [] @@ -534,7 +553,10 @@ "objects": [], "aliases": [], "natives": [ - "File" + { + "name": "File", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/ObjectHttpNullable.json b/test/schemas/reflect/metadata/ObjectHttpNullable.json index a745a2b5f5..fea21d0ed4 100644 --- a/test/schemas/reflect/metadata/ObjectHttpNullable.json +++ b/test/schemas/reflect/metadata/ObjectHttpNullable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpNullable" + { + "name": "ObjectHttpNullable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -225,7 +231,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -281,7 +288,8 @@ "type": "string", "values": [ { - "value": "constantBoolean" + "value": "constantBoolean", + "tags": [] } ] } @@ -342,7 +350,8 @@ "type": "string", "values": [ { - "value": "constantBigint" + "value": "constantBigint", + "tags": [] } ] } @@ -411,7 +420,8 @@ "type": "string", "values": [ { - "value": "constantNumber" + "value": "constantNumber", + "tags": [] } ] } @@ -480,7 +490,8 @@ "type": "string", "values": [ { - "value": "constantString" + "value": "constantString", + "tags": [] } ] } @@ -508,7 +519,7 @@ "type": "string", "values": [ { - "value": "three", + "value": "one", "tags": [] }, { @@ -516,7 +527,7 @@ "tags": [] }, { - "value": "one", + "value": "three", "tags": [] } ] @@ -549,7 +560,8 @@ "type": "string", "values": [ { - "value": "nullableArray" + "value": "nullableArray", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectHttpTypeTag.json b/test/schemas/reflect/metadata/ObjectHttpTypeTag.json index b410b65f4d..22467f4bff 100644 --- a/test/schemas/reflect/metadata/ObjectHttpTypeTag.json +++ b/test/schemas/reflect/metadata/ObjectHttpTypeTag.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpTypeTag" + { + "name": "ObjectHttpTypeTag", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -110,7 +114,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -180,7 +185,8 @@ "type": "string", "values": [ { - "value": "uuid" + "value": "uuid", + "tags": [] } ] } @@ -212,7 +218,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -253,7 +259,8 @@ "type": "string", "values": [ { - "value": "range" + "value": "range", + "tags": [] } ] } @@ -334,7 +341,8 @@ "type": "string", "values": [ { - "value": "length" + "value": "length", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectHttpUndefindable.json b/test/schemas/reflect/metadata/ObjectHttpUndefindable.json index 7403257b0b..57f8114422 100644 --- a/test/schemas/reflect/metadata/ObjectHttpUndefindable.json +++ b/test/schemas/reflect/metadata/ObjectHttpUndefindable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectHttpUndefindable" + { + "name": "ObjectHttpUndefindable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "bigint" + "value": "bigint", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "constantBoolean" + "value": "constantBoolean", + "tags": [] } ] } @@ -325,7 +333,8 @@ "type": "string", "values": [ { - "value": "constantBigint" + "value": "constantBigint", + "tags": [] } ] } @@ -394,7 +403,8 @@ "type": "string", "values": [ { - "value": "constantNumber" + "value": "constantNumber", + "tags": [] } ] } @@ -463,7 +473,8 @@ "type": "string", "values": [ { - "value": "constantString" + "value": "constantString", + "tags": [] } ] } @@ -491,7 +502,7 @@ "type": "string", "values": [ { - "value": "three", + "value": "one", "tags": [] }, { @@ -499,7 +510,7 @@ "tags": [] }, { - "value": "one", + "value": "three", "tags": [] } ] diff --git a/test/schemas/reflect/metadata/ObjectInternal.json b/test/schemas/reflect/metadata/ObjectInternal.json index e61fc83240..f487eff348 100644 --- a/test/schemas/reflect/metadata/ObjectInternal.json +++ b/test/schemas/reflect/metadata/ObjectInternal.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectInternal" + { + "name": "ObjectInternal", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectIntersection.json b/test/schemas/reflect/metadata/ObjectIntersection.json index 89a8234f94..c804be4557 100644 --- a/test/schemas/reflect/metadata/ObjectIntersection.json +++ b/test/schemas/reflect/metadata/ObjectIntersection.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectIntersection" + { + "name": "ObjectIntersection", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "vulnerable" + "value": "vulnerable", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectJsonTag.json b/test/schemas/reflect/metadata/ObjectJsonTag.json index 316c0f1398..fa3fc93f15 100644 --- a/test/schemas/reflect/metadata/ObjectJsonTag.json +++ b/test/schemas/reflect/metadata/ObjectJsonTag.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectJsonTag" + { + "name": "ObjectJsonTag", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "vulnerable" + "value": "vulnerable", + "tags": [] } ] } @@ -100,7 +104,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -156,7 +161,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -222,7 +228,8 @@ "type": "string", "values": [ { - "value": "complicate_title" + "value": "complicate_title", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectLiteralProperty.json b/test/schemas/reflect/metadata/ObjectLiteralProperty.json index 5faf4af5b1..d02481ada6 100644 --- a/test/schemas/reflect/metadata/ObjectLiteralProperty.json +++ b/test/schemas/reflect/metadata/ObjectLiteralProperty.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectLiteralProperty.ISomething" + { + "name": "ObjectLiteralProperty.ISomething", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "something-interesting-do-you-want?" + "value": "something-interesting-do-you-want?", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "or-something-crazy-do-you-want?" + "value": "or-something-crazy-do-you-want?", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectLiteralType.json b/test/schemas/reflect/metadata/ObjectLiteralType.json index 06308b5d5a..e5936efbc5 100644 --- a/test/schemas/reflect/metadata/ObjectLiteralType.json +++ b/test/schemas/reflect/metadata/ObjectLiteralType.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "__object" + { + "name": "__object", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectNullable.json b/test/schemas/reflect/metadata/ObjectNullable.json index 830673aa04..e3a7a6cca8 100644 --- a/test/schemas/reflect/metadata/ObjectNullable.json +++ b/test/schemas/reflect/metadata/ObjectNullable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectNullable" + { + "name": "ObjectNullable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -163,7 +168,8 @@ "type": "string", "values": [ { - "value": "manufacturer" + "value": "manufacturer", + "tags": [] } ] } @@ -193,7 +199,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectNullable.IManufacturer" + { + "name": "ObjectNullable.IManufacturer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -216,7 +225,8 @@ "type": "string", "values": [ { - "value": "brand" + "value": "brand", + "tags": [] } ] } @@ -246,7 +256,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectNullable.IBrand" + { + "name": "ObjectNullable.IBrand", + "tags": [] + } ], "aliases": [], "natives": [], @@ -269,7 +282,8 @@ "type": "string", "values": [ { - "value": "similar" + "value": "similar", + "tags": [] } ] } @@ -299,8 +313,14 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectNullable.IBrand", - "ObjectNullable.IManufacturer" + { + "name": "ObjectNullable.IBrand", + "tags": [] + }, + { + "name": "ObjectNullable.IManufacturer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -334,7 +354,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -395,7 +416,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -463,7 +485,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -524,7 +547,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -594,7 +618,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectNullable.IProduct" + { + "name": "ObjectNullable.IProduct", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectOptional.json b/test/schemas/reflect/metadata/ObjectOptional.json index 78e038fc58..f98210ba49 100644 --- a/test/schemas/reflect/metadata/ObjectOptional.json +++ b/test/schemas/reflect/metadata/ObjectOptional.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectOptional" + { + "name": "ObjectOptional", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "sequence" + "value": "sequence", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectPartial.json b/test/schemas/reflect/metadata/ObjectPartial.json index f911d9ee5a..75664ebb8b 100644 --- a/test/schemas/reflect/metadata/ObjectPartial.json +++ b/test/schemas/reflect/metadata/ObjectPartial.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "Partial" + { + "name": "Partial", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "array" + "value": "array", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -294,7 +302,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPartial.IBase" + { + "name": "ObjectPartial.IBase", + "tags": [] + } ], "aliases": [], "natives": [], @@ -329,7 +340,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -385,7 +397,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -441,7 +454,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -497,7 +511,8 @@ "type": "string", "values": [ { - "value": "array" + "value": "array", + "tags": [] } ] } @@ -553,7 +568,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -583,7 +599,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPartial.IBase" + { + "name": "ObjectPartial.IBase", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectPartialAndRequired.json b/test/schemas/reflect/metadata/ObjectPartialAndRequired.json index cdeeec6928..4e4aaa18cc 100644 --- a/test/schemas/reflect/metadata/ObjectPartialAndRequired.json +++ b/test/schemas/reflect/metadata/ObjectPartialAndRequired.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPartialAndRequired" + { + "name": "ObjectPartialAndRequired", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -238,7 +245,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPartialAndRequired" + { + "name": "ObjectPartialAndRequired", + "tags": [] + } ], "aliases": [], "natives": [], @@ -261,7 +271,8 @@ "type": "string", "values": [ { - "value": "array" + "value": "array", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectPrimitive.json b/test/schemas/reflect/metadata/ObjectPrimitive.json index 03dd06b516..44705dce12 100644 --- a/test/schemas/reflect/metadata/ObjectPrimitive.json +++ b/test/schemas/reflect/metadata/ObjectPrimitive.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPrimitive.IArticle" + { + "name": "ObjectPrimitive.IArticle", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -165,7 +170,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -221,7 +227,8 @@ "type": "string", "values": [ { - "value": "body" + "value": "body", + "tags": [] } ] } @@ -277,7 +284,8 @@ "type": "string", "values": [ { - "value": "files" + "value": "files", + "tags": [] } ] } @@ -333,7 +341,8 @@ "type": "string", "values": [ { - "value": "secret" + "value": "secret", + "tags": [] } ] } @@ -389,7 +398,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -456,7 +466,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -512,7 +523,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -568,7 +580,8 @@ "type": "string", "values": [ { - "value": "extension" + "value": "extension", + "tags": [] } ] } @@ -624,7 +637,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -680,7 +694,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -750,7 +765,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPrimitive.IFile" + { + "name": "ObjectPrimitive.IFile", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectPropertyNullable.json b/test/schemas/reflect/metadata/ObjectPropertyNullable.json index a030f57567..e2bbb62bc9 100644 --- a/test/schemas/reflect/metadata/ObjectPropertyNullable.json +++ b/test/schemas/reflect/metadata/ObjectPropertyNullable.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -110,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -177,7 +179,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -244,7 +247,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -274,7 +278,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPropertyNullable.IMember" + { + "name": "ObjectPropertyNullable.IMember", + "tags": [] + } ], "aliases": [], "natives": [], @@ -308,7 +315,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -364,7 +372,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -420,7 +429,8 @@ "type": "string", "values": [ { - "value": "grade" + "value": "grade", + "tags": [] } ] } @@ -476,7 +486,8 @@ "type": "string", "values": [ { - "value": "serial" + "value": "serial", + "tags": [] } ] } @@ -532,7 +543,8 @@ "type": "string", "values": [ { - "value": "activated" + "value": "activated", + "tags": [] } ] } @@ -602,7 +614,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPropertyNullable.IPointer" + { + "name": "ObjectPropertyNullable.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -631,7 +646,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPropertyNullable.IPointer" + { + "name": "ObjectPropertyNullable.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -660,7 +678,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPropertyNullable.IPointer" + { + "name": "ObjectPropertyNullable.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -689,7 +710,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectPropertyNullable.IPointer" + { + "name": "ObjectPropertyNullable.IPointer", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectRecursive.json b/test/schemas/reflect/metadata/ObjectRecursive.json index ce42cf0ea7..f892b43335 100644 --- a/test/schemas/reflect/metadata/ObjectRecursive.json +++ b/test/schemas/reflect/metadata/ObjectRecursive.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectRecursive.IDepartment" + { + "name": "ObjectRecursive.IDepartment", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "parent" + "value": "parent", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectRecursive.IDepartment" + { + "name": "ObjectRecursive.IDepartment", + "tags": [] + } ], "aliases": [], "natives": [], @@ -93,7 +100,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -149,7 +157,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -205,7 +214,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -261,7 +271,8 @@ "type": "string", "values": [ { - "value": "sequence" + "value": "sequence", + "tags": [] } ] } @@ -317,7 +328,8 @@ "type": "string", "values": [ { - "value": "created_at" + "value": "created_at", + "tags": [] } ] } @@ -347,7 +359,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectRecursive.ITimestamp" + { + "name": "ObjectRecursive.ITimestamp", + "tags": [] + } ], "aliases": [], "natives": [], @@ -382,7 +397,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -438,7 +454,8 @@ "type": "string", "values": [ { - "value": "zone" + "value": "zone", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectRequired.json b/test/schemas/reflect/metadata/ObjectRequired.json index e8d2714f33..1ea38a4554 100644 --- a/test/schemas/reflect/metadata/ObjectRequired.json +++ b/test/schemas/reflect/metadata/ObjectRequired.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "Required" + { + "name": "Required", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -152,7 +157,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -208,7 +214,8 @@ "type": "string", "values": [ { - "value": "array" + "value": "array", + "tags": [] } ] } @@ -264,7 +271,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -294,7 +302,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectRequired.IBase" + { + "name": "ObjectRequired.IBase", + "tags": [] + } ], "aliases": [], "natives": [], @@ -329,7 +340,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -385,7 +397,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -441,7 +454,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -497,7 +511,8 @@ "type": "string", "values": [ { - "value": "array" + "value": "array", + "tags": [] } ] } @@ -553,7 +568,8 @@ "type": "string", "values": [ { - "value": "object" + "value": "object", + "tags": [] } ] } @@ -583,7 +599,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectRequired.IBase" + { + "name": "ObjectRequired.IBase", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectSequenceProtobuf.json b/test/schemas/reflect/metadata/ObjectSequenceProtobuf.json new file mode 100644 index 0000000000..a1c844ced6 --- /dev/null +++ b/test/schemas/reflect/metadata/ObjectSequenceProtobuf.json @@ -0,0 +1,971 @@ +{ + "metadatas": [ + { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "ObjectSequenceProtobuf", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + } + ], + "components": { + "objects": [ + { + "name": "ObjectSequenceProtobuf", + "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "value", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": "Reference of the value.", + "jsDocTags": [] + } + ], + "description": "Pointer referencing value.", + "jsDocTags": [], + "index": 0, + "recursive": false, + "nullables": [ + false + ] + }, + { + "name": "ObjectSequenceProtobuf.IMember", + "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "id", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Sequence<11>", + "kind": "sequence", + "value": 11, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 11 + } + } + ] + ] + }, + { + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"uint64\">", + "kind": "type", + "value": "uint64", + "validate": "$importInternal(\"isTypeUint64\")($input)", + "exclusive": true, + "schema": { + "type": "integer" + } + }, + { + "target": "number", + "name": "Sequence<12>", + "kind": "sequence", + "value": 12, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 12 + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [ + { + "name": "Uint8Array", + "tags": [ + [ + { + "target": "object", + "name": "Sequence<13>", + "kind": "sequence", + "value": 13, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 13 + } + } + ] + ] + } + ], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "name", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": true, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Sequence<20>", + "kind": "sequence", + "value": 20, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 20 + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "children", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [ + [ + { + "target": "array", + "name": "Sequence<30>", + "kind": "sequence", + "value": 30, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 30 + } + } + ] + ] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "keywords", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [ + [ + { + "target": "object", + "name": "Sequence<40>", + "kind": "sequence", + "value": 40, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 40 + } + } + ] + ] + } + ] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "thumbnail", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Format<\"uri\">", + "kind": "format", + "value": "uri", + "validate": "$importInternal(\"isFormatUri\")($input)", + "exclusive": [ + "format", + "pattern" + ], + "schema": { + "format": "uri" + } + }, + { + "target": "string", + "name": "ContentMediaType<\"image/*\">", + "kind": "contentMediaType", + "exclusive": false, + "schema": { + "contentMediaType": "image/*" + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [ + { + "name": "Uint8Array", + "tags": [] + } + ], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "email", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Format<\"email\">", + "kind": "format", + "value": "email", + "validate": "$importInternal(\"isFormatEmail\")($input)", + "exclusive": [ + "format", + "pattern" + ], + "schema": { + "format": "email" + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "hobbies", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + } + ], + "jsDocTags": [], + "index": 1, + "recursive": true, + "nullables": [ + false + ] + }, + { + "name": "ObjectSequenceProtobuf.IHobby", + "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "id", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Format<\"uuid\">", + "kind": "format", + "value": "uuid", + "validate": "$importInternal(\"isFormatUuid\")($input)", + "exclusive": [ + "format", + "pattern" + ], + "schema": { + "format": "uuid" + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "name", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "valid", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "boolean", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + } + ], + "jsDocTags": [], + "index": 2, + "recursive": false, + "nullables": [ + false + ] + } + ], + "aliases": [], + "arrays": [ + { + "name": "Array", + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "ObjectSequenceProtobuf.IMember", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "nullables": [ + false + ], + "recursive": false, + "index": null + }, + { + "name": "Array", + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "ObjectSequenceProtobuf.IHobby", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "nullables": [ + false + ], + "recursive": false, + "index": null + } + ], + "tuples": [] + } +} \ No newline at end of file diff --git a/test/schemas/reflect/metadata/ObjectSimple.json b/test/schemas/reflect/metadata/ObjectSimple.json index c86cd3d5d3..47317adc37 100644 --- a/test/schemas/reflect/metadata/ObjectSimple.json +++ b/test/schemas/reflect/metadata/ObjectSimple.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IBox3D" + { + "name": "ObjectSimple.IBox3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "scale" + "value": "scale", + "tags": [] } ] } @@ -70,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -93,7 +100,8 @@ "type": "string", "values": [ { - "value": "position" + "value": "position", + "tags": [] } ] } @@ -123,7 +131,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -146,7 +157,8 @@ "type": "string", "values": [ { - "value": "rotate" + "value": "rotate", + "tags": [] } ] } @@ -176,7 +188,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -199,7 +214,8 @@ "type": "string", "values": [ { - "value": "pivot" + "value": "pivot", + "tags": [] } ] } @@ -229,7 +245,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimple.IPoint3D" + { + "name": "ObjectSimple.IPoint3D", + "tags": [] + } ], "aliases": [], "natives": [], @@ -263,7 +282,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -319,7 +339,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -375,7 +396,8 @@ "type": "string", "values": [ { - "value": "z" + "value": "z", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ObjectSimpleProtobuf.json b/test/schemas/reflect/metadata/ObjectSimpleProtobuf.json index 1fa54c94d7..3cd8a7d522 100644 --- a/test/schemas/reflect/metadata/ObjectSimpleProtobuf.json +++ b/test/schemas/reflect/metadata/ObjectSimpleProtobuf.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimpleProtobuf" + { + "name": "ObjectSimpleProtobuf", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "bool" + "value": "bool", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -128,7 +133,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -166,7 +171,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -198,7 +204,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -236,7 +242,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -292,7 +299,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -362,7 +370,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -394,7 +403,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -432,7 +441,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -502,7 +512,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -558,7 +569,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -590,7 +602,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/ObjectSimpleProtobufNullable.json b/test/schemas/reflect/metadata/ObjectSimpleProtobufNullable.json index 3499c9baf8..6de08d26c6 100644 --- a/test/schemas/reflect/metadata/ObjectSimpleProtobufNullable.json +++ b/test/schemas/reflect/metadata/ObjectSimpleProtobufNullable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimpleProtobufNullable" + { + "name": "ObjectSimpleProtobufNullable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "bool" + "value": "bool", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -128,7 +133,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -166,7 +171,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -198,7 +204,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -236,7 +242,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -292,7 +299,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -362,7 +370,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -394,7 +403,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -432,7 +441,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -502,7 +512,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -558,7 +569,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -590,7 +602,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/ObjectSimpleProtobufOptional.json b/test/schemas/reflect/metadata/ObjectSimpleProtobufOptional.json index 89a38dca02..48e5fda0ac 100644 --- a/test/schemas/reflect/metadata/ObjectSimpleProtobufOptional.json +++ b/test/schemas/reflect/metadata/ObjectSimpleProtobufOptional.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectSimpleProtobufOptional" + { + "name": "ObjectSimpleProtobufOptional", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "bool" + "value": "bool", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -128,7 +133,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -166,7 +171,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -198,7 +204,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -236,7 +242,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -292,7 +299,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -362,7 +370,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -394,7 +403,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -432,7 +441,8 @@ "type": "string", "values": [ { - "value": "double" + "value": "double", + "tags": [] } ] } @@ -502,7 +512,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -558,7 +569,8 @@ "type": "string", "values": [ { - "value": "bytes" + "value": "bytes", + "tags": [] } ] } @@ -590,7 +602,10 @@ "objects": [], "aliases": [], "natives": [ - "Uint8Array" + { + "name": "Uint8Array", + "tags": [] + } ], "sets": [], "maps": [] diff --git a/test/schemas/reflect/metadata/ObjectTuple.json b/test/schemas/reflect/metadata/ObjectTuple.json index a5ced872e9..07fe998176 100644 --- a/test/schemas/reflect/metadata/ObjectTuple.json +++ b/test/schemas/reflect/metadata/ObjectTuple.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -222,7 +225,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -278,7 +282,8 @@ "type": "string", "values": [ { - "value": "mobile" + "value": "mobile", + "tags": [] } ] } @@ -334,7 +339,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -407,7 +413,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectTuple.ISection" + { + "name": "ObjectTuple.ISection", + "tags": [] + } ], "aliases": [], "natives": [], @@ -428,7 +437,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectTuple.ICitizen" + { + "name": "ObjectTuple.ICitizen", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUndefined.json b/test/schemas/reflect/metadata/ObjectUndefined.json index daf37219a7..164cbe7dca 100644 --- a/test/schemas/reflect/metadata/ObjectUndefined.json +++ b/test/schemas/reflect/metadata/ObjectUndefined.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "professor" + "value": "professor", + "tags": [] } ] } @@ -159,7 +161,8 @@ "type": "string", "values": [ { - "value": "classroom" + "value": "classroom", + "tags": [] } ] } @@ -189,7 +192,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUndefined.IClassroom" + { + "name": "ObjectUndefined.IClassroom", + "tags": [] + } ], "aliases": [], "natives": [], @@ -212,7 +218,8 @@ "type": "string", "values": [ { - "value": "grade" + "value": "grade", + "tags": [] } ] } @@ -268,7 +275,8 @@ "type": "string", "values": [ { - "value": "nothing" + "value": "nothing", + "tags": [] } ] } @@ -319,7 +327,8 @@ "type": "string", "values": [ { - "value": "unknown" + "value": "unknown", + "tags": [] } ] } @@ -370,7 +379,8 @@ "type": "string", "values": [ { - "value": "never" + "value": "never", + "tags": [] } ] } @@ -432,7 +442,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -488,7 +499,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -558,7 +570,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUndefined.ILecture" + { + "name": "ObjectUndefined.ILecture", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionComposite.json b/test/schemas/reflect/metadata/ObjectUnionComposite.json index e6af2a3412..1ddfe90e07 100644 --- a/test/schemas/reflect/metadata/ObjectUnionComposite.json +++ b/test/schemas/reflect/metadata/ObjectUnionComposite.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -166,7 +168,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -196,7 +199,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -219,7 +225,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -249,7 +256,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -283,7 +293,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -313,7 +324,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -336,7 +350,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -366,7 +381,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -389,7 +407,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -419,7 +438,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -453,7 +475,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -483,7 +506,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -506,7 +532,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -536,7 +563,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -559,7 +589,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -589,7 +620,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -612,7 +646,8 @@ "type": "string", "values": [ { - "value": "p4" + "value": "p4", + "tags": [] } ] } @@ -642,7 +677,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -676,7 +714,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -743,7 +782,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -773,7 +813,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPolyline" + { + "name": "ObjectUnionComposite.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], @@ -796,7 +839,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -863,7 +907,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -919,7 +964,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -949,7 +995,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -983,7 +1032,8 @@ "type": "string", "values": [ { - "value": "centroid" + "value": "centroid", + "tags": [] } ] } @@ -1013,7 +1063,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1036,7 +1089,8 @@ "type": "string", "values": [ { - "value": "radius" + "value": "radius", + "tags": [] } ] } @@ -1106,14 +1160,38 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint", - "ObjectUnionComposite.ILine", - "ObjectUnionComposite.ITriangle", - "ObjectUnionComposite.IRectangle", - "ObjectUnionComposite.IPolyline", - "ObjectUnionComposite.IPointedShape", - "ObjectUnionComposite.IPolygon", - "ObjectUnionComposite.ICircle" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + }, + { + "name": "ObjectUnionComposite.ILine", + "tags": [] + }, + { + "name": "ObjectUnionComposite.ITriangle", + "tags": [] + }, + { + "name": "ObjectUnionComposite.IRectangle", + "tags": [] + }, + { + "name": "ObjectUnionComposite.IPolyline", + "tags": [] + }, + { + "name": "ObjectUnionComposite.IPointedShape", + "tags": [] + }, + { + "name": "ObjectUnionComposite.IPolygon", + "tags": [] + }, + { + "name": "ObjectUnionComposite.ICircle", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1142,7 +1220,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPoint" + { + "name": "ObjectUnionComposite.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1171,7 +1252,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionComposite.IPolyline" + { + "name": "ObjectUnionComposite.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionCompositePointer.json b/test/schemas/reflect/metadata/ObjectUnionCompositePointer.json index 7861d89a4d..50167080b6 100644 --- a/test/schemas/reflect/metadata/ObjectUnionCompositePointer.json +++ b/test/schemas/reflect/metadata/ObjectUnionCompositePointer.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer" + { + "name": "ObjectUnionCompositePointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -137,14 +142,38 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint", - "ObjectUnionCompositePointer.ILine", - "ObjectUnionCompositePointer.ITriangle", - "ObjectUnionCompositePointer.IRectangle", - "ObjectUnionCompositePointer.IPolyline", - "ObjectUnionCompositePointer.IPointedShape", - "ObjectUnionCompositePointer.IPolygon", - "ObjectUnionCompositePointer.ICircle" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.ILine", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.ITriangle", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.IRectangle", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.IPolyline", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.IPointedShape", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.IPolygon", + "tags": [] + }, + { + "name": "ObjectUnionCompositePointer.ICircle", + "tags": [] + } ], "aliases": [], "natives": [], @@ -178,7 +207,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -234,7 +264,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -301,7 +332,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -331,7 +363,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -354,7 +389,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -384,7 +420,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -418,7 +457,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -448,7 +488,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -471,7 +514,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -501,7 +545,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -524,7 +571,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -554,7 +602,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -588,7 +639,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -618,7 +670,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -641,7 +696,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -671,7 +727,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -694,7 +753,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -724,7 +784,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -747,7 +810,8 @@ "type": "string", "values": [ { - "value": "p4" + "value": "p4", + "tags": [] } ] } @@ -777,7 +841,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -811,7 +878,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -878,7 +946,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -908,7 +977,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPolyline" + { + "name": "ObjectUnionCompositePointer.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], @@ -931,7 +1003,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -998,7 +1071,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -1054,7 +1128,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -1084,7 +1159,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1118,7 +1196,8 @@ "type": "string", "values": [ { - "value": "centroid" + "value": "centroid", + "tags": [] } ] } @@ -1148,7 +1227,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1171,7 +1253,8 @@ "type": "string", "values": [ { - "value": "radius" + "value": "radius", + "tags": [] } ] } @@ -1241,7 +1324,10 @@ "arrays": [], "tuples": [], "objects": [ - "IPointer" + { + "name": "IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1270,7 +1356,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPoint" + { + "name": "ObjectUnionCompositePointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1299,7 +1388,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionCompositePointer.IPolyline" + { + "name": "ObjectUnionCompositePointer.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionDouble.json b/test/schemas/reflect/metadata/ObjectUnionDouble.json index d958597d3c..7cab9e70de 100644 --- a/test/schemas/reflect/metadata/ObjectUnionDouble.json +++ b/test/schemas/reflect/metadata/ObjectUnionDouble.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -73,7 +74,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "child" + "value": "child", + "tags": [] } ] } @@ -126,8 +131,14 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionDouble.IAB", - "ObjectUnionDouble.IAA" + { + "name": "ObjectUnionDouble.IAB", + "tags": [] + }, + { + "name": "ObjectUnionDouble.IAA", + "tags": [] + } ], "aliases": [], "natives": [], @@ -161,7 +172,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -228,7 +240,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -258,7 +271,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type.o1" + { + "name": "__type.o1", + "tags": [] + } ], "aliases": [], "natives": [], @@ -292,7 +308,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -359,7 +376,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -389,7 +407,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type.o2" + { + "name": "__type.o2", + "tags": [] + } ], "aliases": [], "natives": [], @@ -423,7 +444,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -490,7 +512,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -520,7 +543,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type.o3" + { + "name": "__type.o3", + "tags": [] + } ], "aliases": [], "natives": [], @@ -543,7 +569,8 @@ "type": "string", "values": [ { - "value": "child" + "value": "child", + "tags": [] } ] } @@ -573,8 +600,14 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionDouble.IBB", - "ObjectUnionDouble.IBA" + { + "name": "ObjectUnionDouble.IBB", + "tags": [] + }, + { + "name": "ObjectUnionDouble.IBA", + "tags": [] + } ], "aliases": [], "natives": [], @@ -608,7 +641,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -675,7 +709,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -705,7 +740,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type.o4" + { + "name": "__type.o4", + "tags": [] + } ], "aliases": [], "natives": [], @@ -739,7 +777,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -806,7 +845,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -836,7 +876,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type.o5" + { + "name": "__type.o5", + "tags": [] + } ], "aliases": [], "natives": [], @@ -870,7 +913,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -940,8 +984,14 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionDouble.IB", - "ObjectUnionDouble.IA" + { + "name": "ObjectUnionDouble.IB", + "tags": [] + }, + { + "name": "ObjectUnionDouble.IA", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionExplicit.json b/test/schemas/reflect/metadata/ObjectUnionExplicit.json index d99aec5dd3..c37eed3b57 100644 --- a/test/schemas/reflect/metadata/ObjectUnionExplicit.json +++ b/test/schemas/reflect/metadata/ObjectUnionExplicit.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -227,7 +230,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -257,7 +261,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -280,7 +287,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -310,7 +318,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -333,7 +344,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -405,7 +417,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -461,7 +474,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -528,7 +542,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -558,7 +573,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -581,7 +599,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -611,7 +630,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -634,7 +656,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -664,7 +687,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -687,7 +713,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -759,7 +786,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -789,7 +817,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -812,7 +843,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -842,7 +874,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -865,7 +900,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -895,7 +931,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -918,7 +957,8 @@ "type": "string", "values": [ { - "value": "p4" + "value": "p4", + "tags": [] } ] } @@ -948,7 +988,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -971,7 +1014,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1043,7 +1087,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1099,7 +1144,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1171,7 +1217,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -1201,7 +1248,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPolyline" + { + "name": "ObjectUnionExplicit.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1224,7 +1274,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -1280,7 +1331,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1352,7 +1404,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1419,7 +1472,8 @@ "type": "string", "values": [ { - "value": "centroid" + "value": "centroid", + "tags": [] } ] } @@ -1449,7 +1503,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1472,7 +1529,8 @@ "type": "string", "values": [ { - "value": "radius" + "value": "radius", + "tags": [] } ] } @@ -1528,7 +1586,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1603,13 +1662,34 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.Discriminator<\"point\", ObjectUnionExplicit.IPoint>", - "ObjectUnionExplicit.Discriminator<\"line\", ObjectUnionExplicit.ILine>", - "ObjectUnionExplicit.Discriminator<\"triangle\", ObjectUnionExplicit.ITriangle>", - "ObjectUnionExplicit.Discriminator<\"rectangle\", ObjectUnionExplicit.IRectangle>", - "ObjectUnionExplicit.Discriminator<\"polyline\", ObjectUnionExplicit.IPolyline>", - "ObjectUnionExplicit.Discriminator<\"polygon\", ObjectUnionExplicit.IPolygon>", - "ObjectUnionExplicit.Discriminator<\"circle\", ObjectUnionExplicit.ICircle>" + { + "name": "ObjectUnionExplicit.Discriminator<\"point\", ObjectUnionExplicit.IPoint>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"line\", ObjectUnionExplicit.ILine>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"triangle\", ObjectUnionExplicit.ITriangle>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"rectangle\", ObjectUnionExplicit.IRectangle>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"polyline\", ObjectUnionExplicit.IPolyline>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"polygon\", ObjectUnionExplicit.IPolygon>", + "tags": [] + }, + { + "name": "ObjectUnionExplicit.Discriminator<\"circle\", ObjectUnionExplicit.ICircle>", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1638,7 +1718,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPoint" + { + "name": "ObjectUnionExplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1667,7 +1750,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicit.IPolyline" + { + "name": "ObjectUnionExplicit.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionExplicitPointer.json b/test/schemas/reflect/metadata/ObjectUnionExplicitPointer.json index 53d4e3ec09..f05a9b9f02 100644 --- a/test/schemas/reflect/metadata/ObjectUnionExplicitPointer.json +++ b/test/schemas/reflect/metadata/ObjectUnionExplicitPointer.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer" + { + "name": "ObjectUnionExplicitPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -137,13 +142,34 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.Discriminator<\"point\", ObjectUnionExplicitPointer.IPoint>", - "ObjectUnionExplicitPointer.Discriminator<\"line\", ObjectUnionExplicitPointer.ILine>", - "ObjectUnionExplicitPointer.Discriminator<\"triangle\", ObjectUnionExplicitPointer.ITriangle>", - "ObjectUnionExplicitPointer.Discriminator<\"rectangle\", ObjectUnionExplicitPointer.IRectangle>", - "ObjectUnionExplicitPointer.Discriminator<\"polyline\", ObjectUnionExplicitPointer.IPolyline>", - "ObjectUnionExplicitPointer.Discriminator<\"polygon\", ObjectUnionExplicitPointer.IPolygon>", - "ObjectUnionExplicitPointer.Discriminator<\"circle\", ObjectUnionExplicitPointer.ICircle>" + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"point\", ObjectUnionExplicitPointer.IPoint>", + "tags": [] + }, + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"line\", ObjectUnionExplicitPointer.ILine>", + "tags": [] + }, + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"triangle\", ObjectUnionExplicitPointer.ITriangle>", + "tags": [] + }, + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"rectangle\", ObjectUnionExplicitPointer.IRectangle>", + "tags": [] + }, + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"polyline\", ObjectUnionExplicitPointer.IPolyline>", + "tags": [] + }, + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"polygon\", ObjectUnionExplicitPointer.IPolygon>", + "tags": [] + }, + { + "name": "ObjectUnionExplicitPointer.Discriminator<\"circle\", ObjectUnionExplicitPointer.ICircle>", + "tags": [] + } ], "aliases": [], "natives": [], @@ -177,7 +203,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -233,7 +260,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -289,7 +317,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -361,7 +390,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -391,7 +421,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -414,7 +447,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -444,7 +478,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -467,7 +504,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -539,7 +577,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -595,7 +634,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -662,7 +702,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -692,7 +733,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -715,7 +759,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -745,7 +790,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -768,7 +816,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -798,7 +847,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -821,7 +873,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -893,7 +946,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -923,7 +977,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -946,7 +1003,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -976,7 +1034,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -999,7 +1060,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -1029,7 +1091,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1052,7 +1117,8 @@ "type": "string", "values": [ { - "value": "p4" + "value": "p4", + "tags": [] } ] } @@ -1082,7 +1148,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1105,7 +1174,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1177,7 +1247,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1233,7 +1304,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1305,7 +1377,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -1335,7 +1408,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPolyline" + { + "name": "ObjectUnionExplicitPointer.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1358,7 +1434,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -1414,7 +1491,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1486,7 +1564,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1553,7 +1632,8 @@ "type": "string", "values": [ { - "value": "centroid" + "value": "centroid", + "tags": [] } ] } @@ -1583,7 +1663,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1606,7 +1689,8 @@ "type": "string", "values": [ { - "value": "radius" + "value": "radius", + "tags": [] } ] } @@ -1662,7 +1746,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1737,7 +1822,10 @@ "arrays": [], "tuples": [], "objects": [ - "IPointer" + { + "name": "IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1766,7 +1854,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPoint" + { + "name": "ObjectUnionExplicitPointer.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1795,7 +1886,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionExplicitPointer.IPolyline" + { + "name": "ObjectUnionExplicitPointer.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionImplicit.json b/test/schemas/reflect/metadata/ObjectUnionImplicit.json index 867dc22f7c..68c7a6c6ae 100644 --- a/test/schemas/reflect/metadata/ObjectUnionImplicit.json +++ b/test/schemas/reflect/metadata/ObjectUnionImplicit.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "x" + "value": "x", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "y" + "value": "y", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "slope" + "value": "slope", + "tags": [] } ] } @@ -222,7 +225,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -252,7 +256,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -275,7 +282,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -305,7 +313,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -328,7 +339,8 @@ "type": "string", "values": [ { - "value": "width" + "value": "width", + "tags": [] } ] } @@ -384,7 +396,8 @@ "type": "string", "values": [ { - "value": "distance" + "value": "distance", + "tags": [] } ] } @@ -451,7 +464,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -481,7 +495,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -504,7 +521,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -534,7 +552,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -557,7 +578,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -587,7 +609,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -610,7 +635,8 @@ "type": "string", "values": [ { - "value": "width" + "value": "width", + "tags": [] } ] } @@ -666,7 +692,8 @@ "type": "string", "values": [ { - "value": "height" + "value": "height", + "tags": [] } ] } @@ -722,7 +749,8 @@ "type": "string", "values": [ { - "value": "area" + "value": "area", + "tags": [] } ] } @@ -789,7 +817,8 @@ "type": "string", "values": [ { - "value": "p1" + "value": "p1", + "tags": [] } ] } @@ -819,7 +848,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -842,7 +874,8 @@ "type": "string", "values": [ { - "value": "p2" + "value": "p2", + "tags": [] } ] } @@ -872,7 +905,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -895,7 +931,8 @@ "type": "string", "values": [ { - "value": "p3" + "value": "p3", + "tags": [] } ] } @@ -925,7 +962,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -948,7 +988,8 @@ "type": "string", "values": [ { - "value": "p4" + "value": "p4", + "tags": [] } ] } @@ -978,7 +1019,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1001,7 +1045,8 @@ "type": "string", "values": [ { - "value": "width" + "value": "width", + "tags": [] } ] } @@ -1057,7 +1102,8 @@ "type": "string", "values": [ { - "value": "height" + "value": "height", + "tags": [] } ] } @@ -1113,7 +1159,8 @@ "type": "string", "values": [ { - "value": "area" + "value": "area", + "tags": [] } ] } @@ -1180,7 +1227,8 @@ "type": "string", "values": [ { - "value": "points" + "value": "points", + "tags": [] } ] } @@ -1236,7 +1284,8 @@ "type": "string", "values": [ { - "value": "length" + "value": "length", + "tags": [] } ] } @@ -1303,7 +1352,8 @@ "type": "string", "values": [ { - "value": "outer" + "value": "outer", + "tags": [] } ] } @@ -1333,7 +1383,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPolyline" + { + "name": "ObjectUnionImplicit.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1356,7 +1409,8 @@ "type": "string", "values": [ { - "value": "inner" + "value": "inner", + "tags": [] } ] } @@ -1412,7 +1466,8 @@ "type": "string", "values": [ { - "value": "area" + "value": "area", + "tags": [] } ] } @@ -1479,7 +1534,8 @@ "type": "string", "values": [ { - "value": "radius" + "value": "radius", + "tags": [] } ] } @@ -1535,7 +1591,8 @@ "type": "string", "values": [ { - "value": "centroid" + "value": "centroid", + "tags": [] } ] } @@ -1565,7 +1622,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1588,7 +1648,8 @@ "type": "string", "values": [ { - "value": "area" + "value": "area", + "tags": [] } ] } @@ -1658,13 +1719,34 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint", - "ObjectUnionImplicit.ILine", - "ObjectUnionImplicit.ITriangle", - "ObjectUnionImplicit.IRectangle", - "ObjectUnionImplicit.IPolyline", - "ObjectUnionImplicit.IPolygon", - "ObjectUnionImplicit.ICircle" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + }, + { + "name": "ObjectUnionImplicit.ILine", + "tags": [] + }, + { + "name": "ObjectUnionImplicit.ITriangle", + "tags": [] + }, + { + "name": "ObjectUnionImplicit.IRectangle", + "tags": [] + }, + { + "name": "ObjectUnionImplicit.IPolyline", + "tags": [] + }, + { + "name": "ObjectUnionImplicit.IPolygon", + "tags": [] + }, + { + "name": "ObjectUnionImplicit.ICircle", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1693,7 +1775,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPoint" + { + "name": "ObjectUnionImplicit.IPoint", + "tags": [] + } ], "aliases": [], "natives": [], @@ -1722,7 +1807,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionImplicit.IPolyline" + { + "name": "ObjectUnionImplicit.IPolyline", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ObjectUnionNonPredictable.json b/test/schemas/reflect/metadata/ObjectUnionNonPredictable.json index a6684bf877..591abc5f5a 100644 --- a/test/schemas/reflect/metadata/ObjectUnionNonPredictable.json +++ b/test/schemas/reflect/metadata/ObjectUnionNonPredictable.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionNonPredictable" + { + "name": "ObjectUnionNonPredictable", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -137,7 +142,10 @@ "arrays": [], "tuples": [], "objects": [ - "IPointer" + { + "name": "IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -171,7 +179,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -201,9 +210,18 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionNonPredictable.IWrapper", - "ObjectUnionNonPredictable.IWrapper", - "ObjectUnionNonPredictable.IWrapper" + { + "name": "ObjectUnionNonPredictable.IWrapper", + "tags": [] + }, + { + "name": "ObjectUnionNonPredictable.IWrapper", + "tags": [] + }, + { + "name": "ObjectUnionNonPredictable.IWrapper", + "tags": [] + } ], "aliases": [], "natives": [], @@ -237,7 +255,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -267,7 +286,10 @@ "arrays": [], "tuples": [], "objects": [ - "IPointer" + { + "name": "IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -301,7 +323,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -368,7 +391,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -398,7 +422,10 @@ "arrays": [], "tuples": [], "objects": [ - "IPointer" + { + "name": "IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -432,7 +459,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -499,7 +527,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -529,7 +558,10 @@ "arrays": [], "tuples": [], "objects": [ - "IPointer" + { + "name": "IPointer", + "tags": [] + } ], "aliases": [], "natives": [], @@ -563,7 +595,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -633,7 +666,10 @@ "arrays": [], "tuples": [], "objects": [ - "ObjectUnionNonPredictable.IWrapper" + { + "name": "ObjectUnionNonPredictable.IWrapper", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/SetAlias.json b/test/schemas/reflect/metadata/SetAlias.json index ac1630e02b..d3c688d675 100644 --- a/test/schemas/reflect/metadata/SetAlias.json +++ b/test/schemas/reflect/metadata/SetAlias.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "SetAlias" + { + "name": "SetAlias", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "booleans" + "value": "booleans", + "tags": [] } ] } @@ -74,28 +78,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "boolean", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "boolean", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -116,7 +123,8 @@ "type": "string", "values": [ { - "value": "numbers" + "value": "numbers", + "tags": [] } ] } @@ -150,28 +158,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "number", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "number", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -192,7 +203,8 @@ "type": "string", "values": [ { - "value": "strings" + "value": "strings", + "tags": [] } ] } @@ -226,28 +238,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "string", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -268,7 +283,8 @@ "type": "string", "values": [ { - "value": "arrays" + "value": "arrays", + "tags": [] } ] } @@ -302,28 +318,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [ - { - "name": "Array", - "tags": [] - } - ], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -344,7 +363,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -378,25 +398,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [ - "SetAlias.Person" - ], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "SetAlias.Person", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -428,7 +454,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -484,7 +511,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -540,7 +568,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/SetSimple.json b/test/schemas/reflect/metadata/SetSimple.json index f1ebaf18df..7eaf66b719 100644 --- a/test/schemas/reflect/metadata/SetSimple.json +++ b/test/schemas/reflect/metadata/SetSimple.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "SetSimple" + { + "name": "SetSimple", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "booleans" + "value": "booleans", + "tags": [] } ] } @@ -74,28 +78,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "boolean", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "boolean", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -116,7 +123,8 @@ "type": "string", "values": [ { - "value": "numbers" + "value": "numbers", + "tags": [] } ] } @@ -150,28 +158,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "number", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "number", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -192,7 +203,8 @@ "type": "string", "values": [ { - "value": "strings" + "value": "strings", + "tags": [] } ] } @@ -226,28 +238,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "string", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -268,7 +283,8 @@ "type": "string", "values": [ { - "value": "arrays" + "value": "arrays", + "tags": [] } ] } @@ -302,28 +318,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [ - { - "name": "Array", - "tags": [] - } - ], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -344,7 +363,8 @@ "type": "string", "values": [ { - "value": "objects" + "value": "objects", + "tags": [] } ] } @@ -378,25 +398,31 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [ - "SetSimple.Person" - ], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "SetSimple.Person", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] @@ -428,7 +454,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -484,7 +511,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -540,7 +568,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/SetUnion.json b/test/schemas/reflect/metadata/SetUnion.json index 625cb347db..535b58d0c2 100644 --- a/test/schemas/reflect/metadata/SetUnion.json +++ b/test/schemas/reflect/metadata/SetUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "age" + "value": "age", + "tags": [] } ] } @@ -229,121 +232,139 @@ "natives": [], "sets": [ { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "boolean", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "number", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] }, { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "number", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "boolean", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] }, { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "string", - "tags": [] - } - ], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] }, { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [ - { - "name": "Array", - "tags": [] - } - ], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] }, { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [ - "SetUnion.Person" - ], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "SetUnion.Person", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [] } ], "maps": [] diff --git a/test/schemas/reflect/metadata/TemplateAtomic.json b/test/schemas/reflect/metadata/TemplateAtomic.json index 41489d7d50..5b937bf1b1 100644 --- a/test/schemas/reflect/metadata/TemplateAtomic.json +++ b/test/schemas/reflect/metadata/TemplateAtomic.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TemplateAtomic" + { + "name": "TemplateAtomic", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "prefix" + "value": "prefix", + "tags": [] } ] } @@ -79,7 +83,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -119,7 +124,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -148,7 +154,8 @@ "type": "string", "values": [ { - "value": "postfix" + "value": "postfix", + "tags": [] } ] } @@ -211,7 +218,8 @@ "type": "string", "values": [ { - "value": "_postfix" + "value": "_postfix", + "tags": [] } ] } @@ -227,7 +235,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -256,7 +265,8 @@ "type": "string", "values": [ { - "value": "middle_string" + "value": "middle_string", + "tags": [] } ] } @@ -295,7 +305,8 @@ "type": "string", "values": [ { - "value": "the_" + "value": "the_", + "tags": [] } ] } @@ -347,7 +358,8 @@ "type": "string", "values": [ { - "value": "_value" + "value": "_value", + "tags": [] } ] } @@ -363,7 +375,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -392,7 +405,8 @@ "type": "string", "values": [ { - "value": "middle_string_empty" + "value": "middle_string_empty", + "tags": [] } ] } @@ -431,7 +445,8 @@ "type": "string", "values": [ { - "value": "the_" + "value": "the_", + "tags": [] } ] } @@ -483,7 +498,8 @@ "type": "string", "values": [ { - "value": "_value" + "value": "_value", + "tags": [] } ] } @@ -499,7 +515,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -528,7 +545,8 @@ "type": "string", "values": [ { - "value": "middle_numeric" + "value": "middle_numeric", + "tags": [] } ] } @@ -567,7 +585,8 @@ "type": "string", "values": [ { - "value": "the_" + "value": "the_", + "tags": [] } ] } @@ -619,7 +638,8 @@ "type": "string", "values": [ { - "value": "_value" + "value": "_value", + "tags": [] } ] } @@ -635,7 +655,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -664,7 +685,8 @@ "type": "string", "values": [ { - "value": "middle_boolean" + "value": "middle_boolean", + "tags": [] } ] } @@ -729,7 +751,8 @@ "type": "string", "values": [ { - "value": "ipv4" + "value": "ipv4", + "tags": [] } ] } @@ -792,7 +815,8 @@ "type": "string", "values": [ { - "value": "." + "value": ".", + "tags": [] } ] } @@ -844,7 +868,8 @@ "type": "string", "values": [ { - "value": "." + "value": ".", + "tags": [] } ] } @@ -896,7 +921,8 @@ "type": "string", "values": [ { - "value": "." + "value": ".", + "tags": [] } ] } @@ -936,7 +962,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -965,7 +992,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -1028,7 +1056,8 @@ "type": "string", "values": [ { - "value": "@" + "value": "@", + "tags": [] } ] } @@ -1080,7 +1109,8 @@ "type": "string", "values": [ { - "value": "." + "value": ".", + "tags": [] } ] } @@ -1120,7 +1150,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/TemplateConstant.json b/test/schemas/reflect/metadata/TemplateConstant.json index cbce748ff5..a5e58a00a2 100644 --- a/test/schemas/reflect/metadata/TemplateConstant.json +++ b/test/schemas/reflect/metadata/TemplateConstant.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TemplateConstant" + { + "name": "TemplateConstant", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "prefix" + "value": "prefix", + "tags": [] } ] } @@ -176,7 +181,8 @@ "type": "string", "values": [ { - "value": "postfix" + "value": "postfix", + "tags": [] } ] } @@ -245,7 +251,8 @@ "type": "string", "values": [ { - "value": "combined" + "value": "combined", + "tags": [] } ] } @@ -352,7 +359,10 @@ "arrays": [], "tuples": [], "objects": [ - "TemplateConstant.Type" + { + "name": "TemplateConstant.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TemplateUnion.json b/test/schemas/reflect/metadata/TemplateUnion.json index fae32ed3d7..3ab3b6d313 100644 --- a/test/schemas/reflect/metadata/TemplateUnion.json +++ b/test/schemas/reflect/metadata/TemplateUnion.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TemplateUnion" + { + "name": "TemplateUnion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "prefix" + "value": "prefix", + "tags": [] } ] } @@ -146,7 +151,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -186,7 +192,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] }, { "row": [ @@ -202,7 +209,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -242,7 +250,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -271,7 +280,8 @@ "type": "string", "values": [ { - "value": "postfix" + "value": "postfix", + "tags": [] } ] } @@ -334,7 +344,8 @@ "type": "string", "values": [ { - "value": "_postfix" + "value": "_postfix", + "tags": [] } ] } @@ -350,7 +361,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] }, { "row": [ @@ -390,7 +402,8 @@ "type": "string", "values": [ { - "value": "_postfix" + "value": "_postfix", + "tags": [] } ] } @@ -406,7 +419,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -435,7 +449,8 @@ "type": "string", "values": [ { - "value": "middle" + "value": "middle", + "tags": [] } ] } @@ -488,7 +503,8 @@ "type": "string", "values": [ { - "value": "the_" + "value": "the_", + "tags": [] } ] } @@ -540,7 +556,8 @@ "type": "string", "values": [ { - "value": "_value" + "value": "_value", + "tags": [] } ] } @@ -556,7 +573,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -585,7 +603,8 @@ "type": "string", "values": [ { - "value": "mixed" + "value": "mixed", + "tags": [] } ] } @@ -647,7 +666,8 @@ "type": "string", "values": [ { - "value": "the_" + "value": "the_", + "tags": [] } ] } @@ -699,7 +719,8 @@ "type": "string", "values": [ { - "value": "_value" + "value": "_value", + "tags": [] } ] } @@ -715,7 +736,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, @@ -723,7 +745,10 @@ "arrays": [], "tuples": [], "objects": [ - "__type" + { + "name": "__type", + "tags": [] + } ], "aliases": [], "natives": [], @@ -757,7 +782,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -827,7 +853,10 @@ "arrays": [], "tuples": [], "objects": [ - "TemplateUnion.Type" + { + "name": "TemplateUnion.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ToJsonArray.json b/test/schemas/reflect/metadata/ToJsonArray.json index 99d4e76248..58b9ca85ed 100644 --- a/test/schemas/reflect/metadata/ToJsonArray.json +++ b/test/schemas/reflect/metadata/ToJsonArray.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -134,7 +135,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -225,7 +227,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -316,7 +319,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -407,7 +411,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -573,7 +578,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonArray.IObject" + { + "name": "ToJsonArray.IObject", + "tags": [] + } ], "aliases": [], "natives": [], @@ -616,7 +624,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonArray.IArray" + { + "name": "ToJsonArray.IArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -681,7 +692,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonArray.IArray" + { + "name": "ToJsonArray.IArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -746,7 +760,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonArray.IArray" + { + "name": "ToJsonArray.IArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -811,7 +828,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonArray.IArray" + { + "name": "ToJsonArray.IArray", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ToJsonAtomicSimple.json b/test/schemas/reflect/metadata/ToJsonAtomicSimple.json index 10857437a7..66f5962e1d 100644 --- a/test/schemas/reflect/metadata/ToJsonAtomicSimple.json +++ b/test/schemas/reflect/metadata/ToJsonAtomicSimple.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -134,7 +135,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -225,7 +227,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -332,7 +335,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonAtomicSimple.IToJson" + { + "name": "ToJsonAtomicSimple.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], @@ -397,7 +403,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonAtomicSimple.IToJson" + { + "name": "ToJsonAtomicSimple.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], @@ -462,7 +471,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonAtomicSimple.IToJson" + { + "name": "ToJsonAtomicSimple.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ToJsonAtomicUnion.json b/test/schemas/reflect/metadata/ToJsonAtomicUnion.json index c8222e56ea..7521c4cb00 100644 --- a/test/schemas/reflect/metadata/ToJsonAtomicUnion.json +++ b/test/schemas/reflect/metadata/ToJsonAtomicUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -155,7 +156,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonAtomicUnion.IToJson" + { + "name": "ToJsonAtomicUnion.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ToJsonDouble.json b/test/schemas/reflect/metadata/ToJsonDouble.json index 4d60dce5eb..2a08b74ce4 100644 --- a/test/schemas/reflect/metadata/ToJsonDouble.json +++ b/test/schemas/reflect/metadata/ToJsonDouble.json @@ -24,7 +24,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonDouble.Parent" + { + "name": "ToJsonDouble.Parent", + "tags": [] + } ], "aliases": [], "natives": [], @@ -45,7 +48,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonDouble.Child" + { + "name": "ToJsonDouble.Child", + "tags": [] + } ], "aliases": [], "natives": [], @@ -81,7 +87,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -129,7 +136,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonDouble.Child" + { + "name": "ToJsonDouble.Child", + "tags": [] + } ], "aliases": [], "natives": [], @@ -150,7 +160,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonDouble.IBrand" + { + "name": "ToJsonDouble.IBrand", + "tags": [] + } ], "aliases": [], "natives": [], @@ -210,7 +223,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -266,7 +280,8 @@ "type": "string", "values": [ { - "value": "flag" + "value": "flag", + "tags": [] } ] } @@ -333,7 +348,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -389,7 +405,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ToJsonNull.json b/test/schemas/reflect/metadata/ToJsonNull.json index 1e6cbfed70..bea4e18a3c 100644 --- a/test/schemas/reflect/metadata/ToJsonNull.json +++ b/test/schemas/reflect/metadata/ToJsonNull.json @@ -24,7 +24,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonNull" + { + "name": "ToJsonNull", + "tags": [] + } ], "aliases": [], "natives": [], @@ -79,7 +82,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/ToJsonTuple.json b/test/schemas/reflect/metadata/ToJsonTuple.json index 979d736592..b3575e6750 100644 --- a/test/schemas/reflect/metadata/ToJsonTuple.json +++ b/test/schemas/reflect/metadata/ToJsonTuple.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -134,7 +135,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -225,7 +227,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -316,7 +319,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -354,7 +358,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonTuple.IHobby" + { + "name": "ToJsonTuple.IHobby", + "tags": [] + } ], "aliases": [], "natives": [], @@ -404,7 +411,8 @@ "type": "string", "values": [ { - "value": "code" + "value": "code", + "tags": [] } ] } @@ -460,7 +468,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -543,7 +552,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonTuple.IToJson" + { + "name": "ToJsonTuple.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], @@ -608,7 +620,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonTuple.IToJson" + { + "name": "ToJsonTuple.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], @@ -673,7 +688,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonTuple.IToJson" + { + "name": "ToJsonTuple.IToJson", + "tags": [] + } ], "aliases": [], "natives": [], @@ -738,7 +756,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonTuple.IObject" + { + "name": "ToJsonTuple.IObject", + "tags": [] + } ], "aliases": [], "natives": [], @@ -759,7 +780,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonTuple.IHobby" + { + "name": "ToJsonTuple.IHobby", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/ToJsonUnion.json b/test/schemas/reflect/metadata/ToJsonUnion.json index 27373c392a..70611d3f5a 100644 --- a/test/schemas/reflect/metadata/ToJsonUnion.json +++ b/test/schemas/reflect/metadata/ToJsonUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -99,7 +100,8 @@ "type": "string", "values": [ { - "value": "mobile" + "value": "mobile", + "tags": [] } ] } @@ -155,7 +157,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -222,7 +225,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -313,7 +317,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -351,7 +356,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonUnion.ICitizen" + { + "name": "ToJsonUnion.ICitizen", + "tags": [] + } ], "aliases": [], "natives": [], @@ -401,7 +409,8 @@ "type": "string", "values": [ { - "value": "toJSON" + "value": "toJSON", + "tags": [] } ] } @@ -439,7 +448,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonUnion.IProduct" + { + "name": "ToJsonUnion.IProduct", + "tags": [] + } ], "aliases": [], "natives": [], @@ -489,7 +501,8 @@ "type": "string", "values": [ { - "value": "manufacturer" + "value": "manufacturer", + "tags": [] } ] } @@ -545,7 +558,8 @@ "type": "string", "values": [ { - "value": "brand" + "value": "brand", + "tags": [] } ] } @@ -601,7 +615,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -690,9 +705,18 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonUnion.IWrapper", - "ToJsonUnion.IWrapper", - "ToJsonUnion.IWrapper" + { + "name": "ToJsonUnion.IWrapper", + "tags": [] + }, + { + "name": "ToJsonUnion.IWrapper", + "tags": [] + }, + { + "name": "ToJsonUnion.IWrapper", + "tags": [] + } ], "aliases": [], "natives": [], @@ -718,8 +742,14 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonUnion.ICitizen", - "ToJsonUnion.IProduct" + { + "name": "ToJsonUnion.ICitizen", + "tags": [] + }, + { + "name": "ToJsonUnion.IProduct", + "tags": [] + } ], "aliases": [], "natives": [], @@ -731,7 +761,10 @@ "arrays": [], "tuples": [], "objects": [ - "ToJsonUnion.ICitizen" + { + "name": "ToJsonUnion.ICitizen", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TupleRestObject.json b/test/schemas/reflect/metadata/TupleRestObject.json index a9bc560974..6dd07accf3 100644 --- a/test/schemas/reflect/metadata/TupleRestObject.json +++ b/test/schemas/reflect/metadata/TupleRestObject.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -174,7 +175,10 @@ "arrays": [], "tuples": [], "objects": [ - "TupleRestObject.IObject" + { + "name": "TupleRestObject.IObject", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagArray.json b/test/schemas/reflect/metadata/TypeTagArray.json index 16013566c3..22906b754f 100644 --- a/test/schemas/reflect/metadata/TypeTagArray.json +++ b/test/schemas/reflect/metadata/TypeTagArray.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagArray" + { + "name": "TypeTagArray", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "items" + "value": "items", + "tags": [] } ] } @@ -188,7 +193,8 @@ "type": "string", "values": [ { - "value": "minItems" + "value": "minItems", + "tags": [] } ] } @@ -258,7 +264,8 @@ "type": "string", "values": [ { - "value": "both" + "value": "both", + "tags": [] } ] } @@ -339,7 +346,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -420,7 +428,8 @@ "type": "string", "values": [ { - "value": "unique" + "value": "unique", + "tags": [] } ] } @@ -457,7 +466,7 @@ "name": "UniqueItems", "kind": "uniqueItems", "value": true, - "validate": "$input.length <= 1 || ($input.length === new Set($input).size)", + "validate": "$importInternal(\"isUniqueItems\")($input)", "exclusive": true, "schema": { "uniqueItems": true @@ -504,7 +513,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagArray.Type" + { + "name": "TypeTagArray.Type", + "tags": [] + } ], "aliases": [], "natives": [], @@ -535,7 +547,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" diff --git a/test/schemas/reflect/metadata/TypeTagArrayUnion.json b/test/schemas/reflect/metadata/TypeTagArrayUnion.json index 3f9cd59a94..b3b9a81043 100644 --- a/test/schemas/reflect/metadata/TypeTagArrayUnion.json +++ b/test/schemas/reflect/metadata/TypeTagArrayUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "items" + "value": "items", + "tags": [] } ] } @@ -124,7 +125,8 @@ "type": "string", "values": [ { - "value": "minItems" + "value": "minItems", + "tags": [] } ] } @@ -194,7 +196,8 @@ "type": "string", "values": [ { - "value": "maxItems" + "value": "maxItems", + "tags": [] } ] } @@ -264,7 +267,8 @@ "type": "string", "values": [ { - "value": "both" + "value": "both", + "tags": [] } ] } @@ -359,7 +363,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagArrayUnion.Type" + { + "name": "TypeTagArrayUnion.Type", + "tags": [] + } ], "aliases": [], "natives": [], @@ -390,7 +397,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" diff --git a/test/schemas/reflect/metadata/TypeTagAtomicUnion.json b/test/schemas/reflect/metadata/TypeTagAtomicUnion.json index 7444fcfb66..e3f9c68e98 100644 --- a/test/schemas/reflect/metadata/TypeTagAtomicUnion.json +++ b/test/schemas/reflect/metadata/TypeTagAtomicUnion.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagAtomicUnion" + { + "name": "TypeTagAtomicUnion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -223,7 +228,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagAtomicUnion.Type" + { + "name": "TypeTagAtomicUnion.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagBigInt.json b/test/schemas/reflect/metadata/TypeTagBigInt.json index 5e401212ea..3967971317 100644 --- a/test/schemas/reflect/metadata/TypeTagBigInt.json +++ b/test/schemas/reflect/metadata/TypeTagBigInt.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagBigInt" + { + "name": "TypeTagBigInt", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "ranged" + "value": "ranged", + "tags": [] } ] } @@ -189,7 +194,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -265,7 +271,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -341,7 +348,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/TypeTagCustom.json b/test/schemas/reflect/metadata/TypeTagCustom.json index 168098762c..2340bfbac2 100644 --- a/test/schemas/reflect/metadata/TypeTagCustom.json +++ b/test/schemas/reflect/metadata/TypeTagCustom.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagCustom" + { + "name": "TypeTagCustom", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "id" + "value": "id", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -113,7 +117,8 @@ "type": "string", "values": [ { - "value": "dollar" + "value": "dollar", + "tags": [] } ] } @@ -183,7 +188,8 @@ "type": "string", "values": [ { - "value": "postfix" + "value": "postfix", + "tags": [] } ] } @@ -253,7 +259,8 @@ "type": "string", "values": [ { - "value": "powerOf" + "value": "powerOf", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/TypeTagDefault.json b/test/schemas/reflect/metadata/TypeTagDefault.json index b71eef203a..419f00ea8e 100644 --- a/test/schemas/reflect/metadata/TypeTagDefault.json +++ b/test/schemas/reflect/metadata/TypeTagDefault.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagDefault" + { + "name": "TypeTagDefault", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "boolean" + "value": "boolean", + "tags": [] } ] } @@ -65,20 +69,7 @@ "atomics": [ { "type": "boolean", - "tags": [ - [ - { - "target": "boolean", - "name": "Default", - "kind": "default", - "value": false, - "exclusive": true, - "schema": { - "default": false - } - } - ] - ] + "tags": [] } ], "constants": [], @@ -109,7 +100,8 @@ "type": "string", "values": [ { - "value": "number" + "value": "number", + "tags": [] } ] } @@ -178,7 +170,8 @@ "type": "string", "values": [ { - "value": "string" + "value": "string", + "tags": [] } ] } @@ -247,7 +240,8 @@ "type": "string", "values": [ { - "value": "text" + "value": "text", + "tags": [] } ] } @@ -316,7 +310,8 @@ "type": "string", "values": [ { - "value": "boolean_and_number_and_string" + "value": "boolean_and_number_and_string", + "tags": [] } ] } @@ -375,20 +370,7 @@ }, { "type": "boolean", - "tags": [ - [ - { - "target": "boolean", - "name": "Default", - "kind": "default", - "value": false, - "exclusive": true, - "schema": { - "default": false - } - } - ] - ] + "tags": [] } ], "constants": [], @@ -419,7 +401,8 @@ "type": "string", "values": [ { - "value": "union_but_boolean" + "value": "union_but_boolean", + "tags": [] } ] } @@ -452,20 +435,7 @@ }, { "type": "boolean", - "tags": [ - [ - { - "target": "boolean", - "name": "Default", - "kind": "default", - "value": false, - "exclusive": true, - "schema": { - "default": false - } - } - ] - ] + "tags": [] } ], "constants": [], @@ -496,7 +466,8 @@ "type": "string", "values": [ { - "value": "union_but_number" + "value": "union_but_number", + "tags": [] } ] } @@ -573,7 +544,8 @@ "type": "string", "values": [ { - "value": "union_but_string" + "value": "union_but_string", + "tags": [] } ] } @@ -650,7 +622,8 @@ "type": "string", "values": [ { - "value": "boolean_and_number_and_template" + "value": "boolean_and_number_and_template", + "tags": [] } ] } @@ -692,20 +665,7 @@ }, { "type": "boolean", - "tags": [ - [ - { - "target": "boolean", - "name": "Default", - "kind": "default", - "value": false, - "exclusive": true, - "schema": { - "default": false - } - } - ] - ] + "tags": [] } ], "constants": [], @@ -724,7 +684,8 @@ "type": "string", "values": [ { - "value": "prefix_" + "value": "prefix_", + "tags": [] } ] } @@ -764,7 +725,8 @@ "sets": [], "maps": [] } - ] + ], + "tags": [] } ], "escaped": null, diff --git a/test/schemas/reflect/metadata/TypeTagFormat.json b/test/schemas/reflect/metadata/TypeTagFormat.json index 9558488f8f..d1801dca5b 100644 --- a/test/schemas/reflect/metadata/TypeTagFormat.json +++ b/test/schemas/reflect/metadata/TypeTagFormat.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagFormat" + { + "name": "TypeTagFormat", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "byte" + "value": "byte", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Format<\"byte\">", "kind": "format", "value": "byte", - "validate": "/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm.test($input)", + "validate": "$importInternal(\"isFormatByte\")($input)", "exclusive": [ "format", "pattern" @@ -113,7 +117,8 @@ "type": "string", "values": [ { - "value": "password" + "value": "password", + "tags": [] } ] } @@ -145,7 +150,7 @@ "name": "Format<\"password\">", "kind": "format", "value": "password", - "validate": "true", + "validate": "$importInternal(\"isFormatPassword\")($input)", "exclusive": [ "format", "pattern" @@ -186,7 +191,8 @@ "type": "string", "values": [ { - "value": "regex" + "value": "regex", + "tags": [] } ] } @@ -218,7 +224,7 @@ "name": "Format<\"regex\">", "kind": "format", "value": "regex", - "validate": "(() => { try { new RegExp($input); return true; } catch { return false; } })()", + "validate": "$importInternal(\"isFormatRegex\")($input)", "exclusive": [ "format", "pattern" @@ -259,7 +265,8 @@ "type": "string", "values": [ { - "value": "uuid" + "value": "uuid", + "tags": [] } ] } @@ -291,7 +298,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" @@ -332,7 +339,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -364,7 +372,7 @@ "name": "Format<\"email\">", "kind": "format", "value": "email", - "validate": "/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test($input)", + "validate": "$importInternal(\"isFormatEmail\")($input)", "exclusive": [ "format", "pattern" @@ -405,7 +413,8 @@ "type": "string", "values": [ { - "value": "hostname" + "value": "hostname", + "tags": [] } ] } @@ -437,7 +446,7 @@ "name": "Format<\"hostname\">", "kind": "format", "value": "hostname", - "validate": "/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i.test($input)", + "validate": "$importInternal(\"isFormatHostname\")($input)", "exclusive": [ "format", "pattern" @@ -478,7 +487,8 @@ "type": "string", "values": [ { - "value": "idnEmail" + "value": "idnEmail", + "tags": [] } ] } @@ -510,7 +520,7 @@ "name": "Format<\"idn-email\">", "kind": "format", "value": "idn-email", - "validate": "/^(([^<>()[\\]\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@(([^<>()[\\]\\.,;:\\s@\\\"]+\\.)+[^<>()[\\]\\.,;:\\s@\\\"]{2,})$/i.test($input)", + "validate": "$importInternal(\"isFormatIdnEmail\")($input)", "exclusive": [ "format", "pattern" @@ -551,7 +561,8 @@ "type": "string", "values": [ { - "value": "idnHostname" + "value": "idnHostname", + "tags": [] } ] } @@ -583,7 +594,7 @@ "name": "Format<\"idn-hostname\">", "kind": "format", "value": "idn-hostname", - "validate": "/^([a-z0-9\\u00a1-\\uffff0-9]+(-[a-z0-9\\u00a1-\\uffff0-9]+)*\\.)+[a-z\\u00a1-\\uffff]{2,}$/i.test($input)", + "validate": "$importInternal(\"isFormatIdnHostname\")($input)", "exclusive": [ "format", "pattern" @@ -624,7 +635,8 @@ "type": "string", "values": [ { - "value": "iri" + "value": "iri", + "tags": [] } ] } @@ -656,7 +668,7 @@ "name": "Format<\"iri\">", "kind": "format", "value": "iri", - "validate": "/^[A-Za-z][\\d+-.A-Za-z]*:[^\\u0000-\\u0020\"<>\\\\^`{|}]*$/u.test($input)", + "validate": "$importInternal(\"isFormatIri\")($input)", "exclusive": [ "format", "pattern" @@ -697,7 +709,8 @@ "type": "string", "values": [ { - "value": "iriReference" + "value": "iriReference", + "tags": [] } ] } @@ -729,7 +742,7 @@ "name": "Format<\"iri-reference\">", "kind": "format", "value": "iri-reference", - "validate": "/^[A-Za-z][\\d+-.A-Za-z]*:[^\\u0000-\\u0020\"<>\\\\^`{|}]*$/u.test($input)", + "validate": "$importInternal(\"isFormatIriReference\")($input)", "exclusive": [ "format", "pattern" @@ -770,7 +783,8 @@ "type": "string", "values": [ { - "value": "ipv4" + "value": "ipv4", + "tags": [] } ] } @@ -802,7 +816,7 @@ "name": "Format<\"ipv4\">", "kind": "format", "value": "ipv4", - "validate": "/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/.test($input)", + "validate": "$importInternal(\"isFormatIpv4\")($input)", "exclusive": [ "format", "pattern" @@ -843,7 +857,8 @@ "type": "string", "values": [ { - "value": "ipv6" + "value": "ipv6", + "tags": [] } ] } @@ -875,7 +890,7 @@ "name": "Format<\"ipv6\">", "kind": "format", "value": "ipv6", - "validate": "/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))$/i.test($input)", + "validate": "$importInternal(\"isFormatIpv6\")($input)", "exclusive": [ "format", "pattern" @@ -916,7 +931,8 @@ "type": "string", "values": [ { - "value": "uri" + "value": "uri", + "tags": [] } ] } @@ -948,7 +964,7 @@ "name": "Format<\"uri\">", "kind": "format", "value": "uri", - "validate": "/\\/|:/.test($input) && /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test($input)", + "validate": "$importInternal(\"isFormatUri\")($input)", "exclusive": [ "format", "pattern" @@ -989,7 +1005,8 @@ "type": "string", "values": [ { - "value": "uriReference" + "value": "uriReference", + "tags": [] } ] } @@ -1021,7 +1038,7 @@ "name": "Format<\"uri-reference\">", "kind": "format", "value": "uri-reference", - "validate": "/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test($input)", + "validate": "$importInternal(\"isFormatUriReference\")($input)", "exclusive": [ "format", "pattern" @@ -1062,7 +1079,8 @@ "type": "string", "values": [ { - "value": "uriTemplate" + "value": "uriTemplate", + "tags": [] } ] } @@ -1094,7 +1112,7 @@ "name": "Format<\"uri-template\">", "kind": "format", "value": "uri-template", - "validate": "/^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i.test($input)", + "validate": "$importInternal(\"isFormatUriTemplate\")($input)", "exclusive": [ "format", "pattern" @@ -1135,7 +1153,8 @@ "type": "string", "values": [ { - "value": "url" + "value": "url", + "tags": [] } ] } @@ -1167,7 +1186,7 @@ "name": "Format<\"url\">", "kind": "format", "value": "url", - "validate": "/^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu.test($input)", + "validate": "$importInternal(\"isFormatUrl\")($input)", "exclusive": [ "format", "pattern" @@ -1208,7 +1227,8 @@ "type": "string", "values": [ { - "value": "datetime" + "value": "datetime", + "tags": [] } ] } @@ -1240,7 +1260,7 @@ "name": "Format<\"date-time\">", "kind": "format", "value": "date-time", - "validate": "/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test($input)", + "validate": "$importInternal(\"isFormatDateTime\")($input)", "exclusive": [ "format", "pattern" @@ -1281,7 +1301,8 @@ "type": "string", "values": [ { - "value": "date" + "value": "date", + "tags": [] } ] } @@ -1313,7 +1334,7 @@ "name": "Format<\"date\">", "kind": "format", "value": "date", - "validate": "/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test($input)", + "validate": "$importInternal(\"isFormatDate\")($input)", "exclusive": [ "format", "pattern" @@ -1354,7 +1375,8 @@ "type": "string", "values": [ { - "value": "time" + "value": "time", + "tags": [] } ] } @@ -1386,7 +1408,7 @@ "name": "Format<\"time\">", "kind": "format", "value": "time", - "validate": "/^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test($input)", + "validate": "$importInternal(\"isFormatTime\")($input)", "exclusive": [ "format", "pattern" @@ -1427,7 +1449,8 @@ "type": "string", "values": [ { - "value": "duration" + "value": "duration", + "tags": [] } ] } @@ -1459,7 +1482,7 @@ "name": "Format<\"duration\">", "kind": "format", "value": "duration", - "validate": "/^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/.test($input)", + "validate": "$importInternal(\"isFormatDuration\")($input)", "exclusive": [ "format", "pattern" @@ -1500,7 +1523,8 @@ "type": "string", "values": [ { - "value": "jsonPointer" + "value": "jsonPointer", + "tags": [] } ] } @@ -1532,7 +1556,7 @@ "name": "Format<\"json-pointer\">", "kind": "format", "value": "json-pointer", - "validate": "/^(?:\\/(?:[^~/]|~0|~1)*)*$/.test($input)", + "validate": "$importInternal(\"isFormatJsonPointer\")($input)", "exclusive": [ "format", "pattern" @@ -1573,7 +1597,8 @@ "type": "string", "values": [ { - "value": "relativeJsonPointer" + "value": "relativeJsonPointer", + "tags": [] } ] } @@ -1605,7 +1630,7 @@ "name": "Format<\"relative-json-pointer\">", "kind": "format", "value": "relative-json-pointer", - "validate": "/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/.test($input)", + "validate": "$importInternal(\"isFormatRelativeJsonPointer\")($input)", "exclusive": [ "format", "pattern" diff --git a/test/schemas/reflect/metadata/TypeTagInfinite.json b/test/schemas/reflect/metadata/TypeTagInfinite.json index a8d4a7101b..1202e2fd9b 100644 --- a/test/schemas/reflect/metadata/TypeTagInfinite.json +++ b/test/schemas/reflect/metadata/TypeTagInfinite.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagInfinite" + { + "name": "TypeTagInfinite", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "ranged" + "value": "ranged", + "tags": [] } ] } @@ -183,7 +188,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -256,7 +262,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -329,7 +336,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } @@ -399,7 +407,8 @@ "type": "string", "values": [ { - "value": "typed" + "value": "typed", + "tags": [] } ] } @@ -431,7 +440,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" diff --git a/test/schemas/reflect/metadata/TypeTagLength.json b/test/schemas/reflect/metadata/TypeTagLength.json index ae26b904ff..a9819a5fa2 100644 --- a/test/schemas/reflect/metadata/TypeTagLength.json +++ b/test/schemas/reflect/metadata/TypeTagLength.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagLength" + { + "name": "TypeTagLength", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "fixed" + "value": "fixed", + "tags": [] } ] } @@ -188,7 +193,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -258,7 +264,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -328,7 +335,8 @@ "type": "string", "values": [ { - "value": "minimum_and_maximum" + "value": "minimum_and_maximum", + "tags": [] } ] } @@ -409,7 +417,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -504,7 +513,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagLength.Type" + { + "name": "TypeTagLength.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagMatrix.json b/test/schemas/reflect/metadata/TypeTagMatrix.json index 857301a068..7e86ead681 100644 --- a/test/schemas/reflect/metadata/TypeTagMatrix.json +++ b/test/schemas/reflect/metadata/TypeTagMatrix.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagMatrix" + { + "name": "TypeTagMatrix", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "matrix" + "value": "matrix", + "tags": [] } ] } @@ -194,7 +198,7 @@ "name": "Format<\"uuid\">", "kind": "format", "value": "uuid", - "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "validate": "$importInternal(\"isFormatUuid\")($input)", "exclusive": [ "format", "pattern" diff --git a/test/schemas/reflect/metadata/TypeTagNaN.json b/test/schemas/reflect/metadata/TypeTagNaN.json index 117a1485cf..3cd16fc46e 100644 --- a/test/schemas/reflect/metadata/TypeTagNaN.json +++ b/test/schemas/reflect/metadata/TypeTagNaN.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagNaN" + { + "name": "TypeTagNaN", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "ranged" + "value": "ranged", + "tags": [] } ] } @@ -183,7 +188,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -256,7 +262,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -329,7 +336,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } @@ -399,7 +407,8 @@ "type": "string", "values": [ { - "value": "typed" + "value": "typed", + "tags": [] } ] } @@ -431,7 +440,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" diff --git a/test/schemas/reflect/metadata/TypeTagObjectUnion.json b/test/schemas/reflect/metadata/TypeTagObjectUnion.json index bb5f8421ee..0d17a4224e 100644 --- a/test/schemas/reflect/metadata/TypeTagObjectUnion.json +++ b/test/schemas/reflect/metadata/TypeTagObjectUnion.json @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -127,7 +128,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -222,8 +224,14 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagObjectUnion.Literal", - "TypeTagObjectUnion.Numeric" + { + "name": "TypeTagObjectUnion.Literal", + "tags": [] + }, + { + "name": "TypeTagObjectUnion.Numeric", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagPattern.json b/test/schemas/reflect/metadata/TypeTagPattern.json index eaee501c49..388e1b5b17 100644 --- a/test/schemas/reflect/metadata/TypeTagPattern.json +++ b/test/schemas/reflect/metadata/TypeTagPattern.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagPattern" + { + "name": "TypeTagPattern", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "uuid" + "value": "uuid", + "tags": [] } ] } @@ -113,7 +117,8 @@ "type": "string", "values": [ { - "value": "email" + "value": "email", + "tags": [] } ] } @@ -186,7 +191,8 @@ "type": "string", "values": [ { - "value": "ipv4" + "value": "ipv4", + "tags": [] } ] } @@ -259,7 +265,8 @@ "type": "string", "values": [ { - "value": "ipv6" + "value": "ipv6", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/TypeTagRange.json b/test/schemas/reflect/metadata/TypeTagRange.json index d5bbfce865..0d6ff9293c 100644 --- a/test/schemas/reflect/metadata/TypeTagRange.json +++ b/test/schemas/reflect/metadata/TypeTagRange.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagRange" + { + "name": "TypeTagRange", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "greater" + "value": "greater", + "tags": [] } ] } @@ -139,7 +144,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -192,7 +197,8 @@ "type": "string", "values": [ { - "value": "greater_equal" + "value": "greater_equal", + "tags": [] } ] } @@ -224,7 +230,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -276,7 +282,8 @@ "type": "string", "values": [ { - "value": "less" + "value": "less", + "tags": [] } ] } @@ -308,7 +315,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -361,7 +368,8 @@ "type": "string", "values": [ { - "value": "less_equal" + "value": "less_equal", + "tags": [] } ] } @@ -393,7 +401,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -445,7 +453,8 @@ "type": "string", "values": [ { - "value": "greater_less" + "value": "greater_less", + "tags": [] } ] } @@ -477,7 +486,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -545,7 +554,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less" + "value": "greater_equal_less", + "tags": [] } ] } @@ -577,7 +587,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -644,7 +654,8 @@ "type": "string", "values": [ { - "value": "greater_less_equal" + "value": "greater_less_equal", + "tags": [] } ] } @@ -676,7 +687,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -743,7 +754,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less_equal" + "value": "greater_equal_less_equal", + "tags": [] } ] } @@ -775,7 +787,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -841,7 +853,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -873,7 +886,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -953,7 +966,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagRange.Type" + { + "name": "TypeTagRange.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagRangeBigInt.json b/test/schemas/reflect/metadata/TypeTagRangeBigInt.json index 2bb5b87005..79d7b184fe 100644 --- a/test/schemas/reflect/metadata/TypeTagRangeBigInt.json +++ b/test/schemas/reflect/metadata/TypeTagRangeBigInt.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagRangeBigInt" + { + "name": "TypeTagRangeBigInt", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "greater" + "value": "greater", + "tags": [] } ] } @@ -184,7 +189,8 @@ "type": "string", "values": [ { - "value": "greater_equal" + "value": "greater_equal", + "tags": [] } ] } @@ -260,7 +266,8 @@ "type": "string", "values": [ { - "value": "less" + "value": "less", + "tags": [] } ] } @@ -337,7 +344,8 @@ "type": "string", "values": [ { - "value": "less_equal" + "value": "less_equal", + "tags": [] } ] } @@ -413,7 +421,8 @@ "type": "string", "values": [ { - "value": "greater_less" + "value": "greater_less", + "tags": [] } ] } @@ -508,7 +517,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less" + "value": "greater_equal_less", + "tags": [] } ] } @@ -602,7 +612,8 @@ "type": "string", "values": [ { - "value": "greater_less_equal" + "value": "greater_less_equal", + "tags": [] } ] } @@ -696,7 +707,8 @@ "type": "string", "values": [ { - "value": "greater_equal_less_equal" + "value": "greater_equal_less_equal", + "tags": [] } ] } @@ -789,7 +801,8 @@ "type": "string", "values": [ { - "value": "equal" + "value": "equal", + "tags": [] } ] } @@ -896,7 +909,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagRangeBigInt.Type" + { + "name": "TypeTagRangeBigInt.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagTuple.json b/test/schemas/reflect/metadata/TypeTagTuple.json index f7db75f347..98032ec814 100644 --- a/test/schemas/reflect/metadata/TypeTagTuple.json +++ b/test/schemas/reflect/metadata/TypeTagTuple.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagTuple" + { + "name": "TypeTagTuple", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "tuple" + "value": "tuple", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/TypeTagType.json b/test/schemas/reflect/metadata/TypeTagType.json index cb3929508f..4b661fac85 100644 --- a/test/schemas/reflect/metadata/TypeTagType.json +++ b/test/schemas/reflect/metadata/TypeTagType.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagType" + { + "name": "TypeTagType", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "value" + "value": "value", + "tags": [] } ] } @@ -107,7 +111,8 @@ "type": "string", "values": [ { - "value": "int" + "value": "int", + "tags": [] } ] } @@ -139,7 +144,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -177,7 +182,8 @@ "type": "string", "values": [ { - "value": "uint" + "value": "uint", + "tags": [] } ] } @@ -209,7 +215,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -247,7 +253,8 @@ "type": "string", "values": [ { - "value": "int32" + "value": "int32", + "tags": [] } ] } @@ -279,7 +286,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -317,7 +324,8 @@ "type": "string", "values": [ { - "value": "uint32" + "value": "uint32", + "tags": [] } ] } @@ -349,7 +357,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -387,7 +395,8 @@ "type": "string", "values": [ { - "value": "int64" + "value": "int64", + "tags": [] } ] } @@ -419,7 +428,7 @@ "name": "Type<\"int64\">", "kind": "type", "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "validate": "$importInternal(\"isTypeInt64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -457,7 +466,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } @@ -489,7 +499,7 @@ "name": "Type<\"uint64\">", "kind": "type", "value": "uint64", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "validate": "$importInternal(\"isTypeUint64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -527,7 +537,8 @@ "type": "string", "values": [ { - "value": "float" + "value": "float", + "tags": [] } ] } @@ -559,7 +570,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -611,7 +622,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagType.Type" + { + "name": "TypeTagType.Type", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/schemas/reflect/metadata/TypeTagTypeBigInt.json b/test/schemas/reflect/metadata/TypeTagTypeBigInt.json index 5ad71b1446..912562a4b2 100644 --- a/test/schemas/reflect/metadata/TypeTagTypeBigInt.json +++ b/test/schemas/reflect/metadata/TypeTagTypeBigInt.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagTypeBigInt" + { + "name": "TypeTagTypeBigInt", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "in64" + "value": "in64", + "tags": [] } ] } @@ -96,7 +100,8 @@ "type": "string", "values": [ { - "value": "uint64" + "value": "uint64", + "tags": [] } ] } diff --git a/test/schemas/reflect/metadata/TypeTagTypeUnion.json b/test/schemas/reflect/metadata/TypeTagTypeUnion.json index 50a6a62b2b..73f23ba160 100644 --- a/test/schemas/reflect/metadata/TypeTagTypeUnion.json +++ b/test/schemas/reflect/metadata/TypeTagTypeUnion.json @@ -14,7 +14,10 @@ "arrays": [], "tuples": [], "objects": [ - "TypeTagTypeUnion" + { + "name": "TypeTagTypeUnion", + "tags": [] + } ], "aliases": [], "natives": [], @@ -40,7 +43,8 @@ "type": "string", "values": [ { - "value": "int32_or_uint32" + "value": "int32_or_uint32", + "tags": [] } ] } @@ -72,7 +76,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -85,7 +89,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -123,7 +127,8 @@ "type": "string", "values": [ { - "value": "int32_or_int64" + "value": "int32_or_int64", + "tags": [] } ] } @@ -155,7 +160,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -168,7 +173,7 @@ "name": "Type<\"int64\">", "kind": "type", "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "validate": "$importInternal(\"isTypeInt64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -206,7 +211,8 @@ "type": "string", "values": [ { - "value": "int32_or_uint64" + "value": "int32_or_uint64", + "tags": [] } ] } @@ -238,7 +244,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -251,7 +257,7 @@ "name": "Type<\"uint64\">", "kind": "type", "value": "uint64", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "validate": "$importInternal(\"isTypeUint64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -289,7 +295,8 @@ "type": "string", "values": [ { - "value": "int32_or_float" + "value": "int32_or_float", + "tags": [] } ] } @@ -321,7 +328,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -334,7 +341,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -372,7 +379,8 @@ "type": "string", "values": [ { - "value": "int32_or_double" + "value": "int32_or_double", + "tags": [] } ] } @@ -404,7 +412,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -455,7 +463,8 @@ "type": "string", "values": [ { - "value": "int64_or_uint64" + "value": "int64_or_uint64", + "tags": [] } ] } @@ -487,7 +496,7 @@ "name": "Type<\"int64\">", "kind": "type", "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "validate": "$importInternal(\"isTypeInt64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -500,7 +509,7 @@ "name": "Type<\"uint64\">", "kind": "type", "value": "uint64", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "validate": "$importInternal(\"isTypeUint64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -538,7 +547,8 @@ "type": "string", "values": [ { - "value": "int64_or_float" + "value": "int64_or_float", + "tags": [] } ] } @@ -570,7 +580,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -583,7 +593,7 @@ "name": "Type<\"int64\">", "kind": "type", "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "validate": "$importInternal(\"isTypeInt64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -621,7 +631,8 @@ "type": "string", "values": [ { - "value": "int64_or_double" + "value": "int64_or_double", + "tags": [] } ] } @@ -666,7 +677,7 @@ "name": "Type<\"int64\">", "kind": "type", "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "validate": "$importInternal(\"isTypeInt64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -704,7 +715,8 @@ "type": "string", "values": [ { - "value": "float_or_double" + "value": "float_or_double", + "tags": [] } ] } @@ -736,7 +748,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -787,7 +799,8 @@ "type": "string", "values": [ { - "value": "everything" + "value": "everything", + "tags": [] } ] } @@ -819,7 +832,7 @@ "name": "Type<\"int32\">", "kind": "type", "value": "int32", - "validate": "Math.floor($input) === $input && -2147483648 <= $input && $input <= 2147483647", + "validate": "$importInternal(\"isTypeInt32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -832,7 +845,7 @@ "name": "Type<\"uint32\">", "kind": "type", "value": "uint32", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 4294967295", + "validate": "$importInternal(\"isTypeUint32\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -845,7 +858,7 @@ "name": "Type<\"float\">", "kind": "type", "value": "float", - "validate": "-1.175494351e38 <= $input && $input <= 3.4028235e38", + "validate": "$importInternal(\"isTypeFloat\")($input)", "exclusive": true, "schema": { "type": "number" @@ -871,7 +884,7 @@ "name": "Type<\"int64\">", "kind": "type", "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "validate": "$importInternal(\"isTypeInt64\")($input)", "exclusive": true, "schema": { "type": "integer" @@ -884,7 +897,7 @@ "name": "Type<\"uint64\">", "kind": "type", "value": "uint64", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "validate": "$importInternal(\"isTypeUint64\")($input)", "exclusive": true, "schema": { "type": "integer" diff --git a/test/schemas/reflect/metadata/UltimateUnion.json b/test/schemas/reflect/metadata/UltimateUnion.json index 7e4f35dbb5..cf63680af4 100644 --- a/test/schemas/reflect/metadata/UltimateUnion.json +++ b/test/schemas/reflect/metadata/UltimateUnion.json @@ -28,7 +28,7 @@ "components": { "objects": [ { - "name": "IJsonApplication.IV3_1>", + "name": "IJsonSchemaCollection.IV3_1>", "properties": [ { "key": { @@ -43,7 +43,8 @@ "type": "string", "values": [ { - "value": "version" + "value": "version", + "tags": [] } ] } @@ -104,7 +105,8 @@ "type": "string", "values": [ { - "value": "components" + "value": "components", + "tags": [] } ] } @@ -134,7 +136,10 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IComponents" + { + "name": "OpenApi.IComponents", + "tags": [] + } ], "aliases": [], "natives": [], @@ -157,7 +162,8 @@ "type": "string", "values": [ { - "value": "schemas" + "value": "schemas", + "tags": [] } ] } @@ -213,7 +219,8 @@ "type": "string", "values": [ { - "value": "__types" + "value": "__types", + "tags": [] } ] } @@ -265,7 +272,7 @@ ] }, { - "name": "OpenApi.IComponents", + "name": "OpenApi.IComponents", "properties": [ { "key": { @@ -280,7 +287,8 @@ "type": "string", "values": [ { - "value": "schemas" + "value": "schemas", + "tags": [] } ] } @@ -310,7 +318,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -333,7 +344,8 @@ "type": "string", "values": [ { - "value": "securitySchemes" + "value": "securitySchemes", + "tags": [] } ] } @@ -363,7 +375,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -424,18 +439,54 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IConstant", - "OpenApi.IJsonSchema.IBoolean", - "OpenApi.IJsonSchema.INumber", - "OpenApi.IJsonSchema.IInteger", - "OpenApi.IJsonSchema.IString", - "OpenApi.IJsonSchema.IArray", - "OpenApi.IJsonSchema.ITuple", - "OpenApi.IJsonSchema.IObject", - "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.INull", - "OpenApi.IJsonSchema.IUnknown" + { + "name": "OpenApi.IJsonSchema.IString", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INumber", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IConstant", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IInteger", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IArray", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.ITuple", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IObject", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IReference", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IOneOf", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INull", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IUnknown", + "tags": [] + } ], "aliases": [], "natives": [], @@ -455,7 +506,7 @@ ] }, { - "name": "OpenApi.IJsonSchema.IConstant", + "name": "OpenApi.IJsonSchema.IString", "properties": [ { "key": { @@ -470,7 +521,8 @@ "type": "string", "values": [ { - "value": "const" + "value": "default", + "tags": [] } ] } @@ -489,21 +541,13 @@ "value": { "any": false, "required": true, - "optional": false, + "optional": true, "nullable": false, "functions": [], "atomics": [ { "type": "string", "tags": [] - }, - { - "type": "number", - "tags": [] - }, - { - "type": "boolean", - "tags": [] } ], "constants": [], @@ -518,7 +562,7 @@ "sets": [], "maps": [] }, - "description": "The constant value.", + "description": "Default value.", "jsDocTags": [] }, { @@ -534,7 +578,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "format", + "tags": [] } ] } @@ -574,7 +619,7 @@ "sets": [], "maps": [] }, - "description": "Title of the schema.", + "description": "Format restriction.", "jsDocTags": [] }, { @@ -590,7 +635,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "pattern", + "tags": [] } ] } @@ -630,7 +676,7 @@ "sets": [], "maps": [] }, - "description": "Detailed description of the schema.", + "description": "Pattern restriction.", "jsDocTags": [] }, { @@ -646,7 +692,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "contentMediaType", + "tags": [] } ] } @@ -670,7 +717,7 @@ "functions": [], "atomics": [ { - "type": "boolean", + "type": "string", "tags": [] } ], @@ -686,7 +733,7 @@ "sets": [], "maps": [] }, - "description": "Whether the type is deprecated or not.", + "description": "Content media type restriction.", "jsDocTags": [] }, { @@ -702,7 +749,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "minLength", + "tags": [] } ] } @@ -719,12 +767,31 @@ "maps": [] }, "value": { - "any": true, + "any": false, "required": true, "optional": true, "nullable": false, "functions": [], - "atomics": [], + "atomics": [ + { + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"uint64\">", + "kind": "type", + "value": "uint64", + "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "exclusive": true, + "schema": { + "type": "integer" + } + } + ] + ] + } + ], "constants": [], "templates": [], "escaped": null, @@ -737,8 +804,18 @@ "sets": [], "maps": [] }, - "description": "Example value.", - "jsDocTags": [] + "description": "Minimum length restriction.", + "jsDocTags": [ + { + "name": "type", + "text": [ + { + "text": "uint64", + "kind": "text" + } + ] + } + ] }, { "key": { @@ -753,7 +830,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "maxLength", + "tags": [] } ] } @@ -775,47 +853,24 @@ "optional": true, "nullable": false, "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [ - "Record" - ], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] - }, - "description": "List of example values as key-value pairs.", - "jsDocTags": [] - } - ], - "description": "Constant value type.", - "jsDocTags": [], - "index": 3, - "recursive": false, - "nullables": [ - false - ] - }, - { - "name": "Record", - "properties": [ - { - "key": { - "any": false, - "required": true, - "optional": false, - "nullable": false, - "functions": [], "atomics": [ { - "type": "string", - "tags": [] + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"uint64\">", + "kind": "type", + "value": "uint64", + "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "exclusive": true, + "schema": { + "type": "integer" + } + } + ] + ] } ], "constants": [], @@ -830,40 +885,19 @@ "sets": [], "maps": [] }, - "value": { - "any": true, - "required": true, - "optional": false, - "nullable": false, - "functions": [], - "atomics": [], - "constants": [], - "templates": [], - "escaped": null, - "rest": null, - "arrays": [], - "tuples": [], - "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] - }, - "description": null, - "jsDocTags": [] - } - ], - "description": "Construct a type with a set of properties K of type T", - "jsDocTags": [], - "index": 4, - "recursive": false, - "nullables": [ - false - ] - }, - { - "name": "OpenApi.IJsonSchema.IBoolean", - "properties": [ + "description": "Maximum length restriction.", + "jsDocTags": [ + { + "name": "type", + "text": [ + { + "text": "uint64", + "kind": "text" + } + ] + } + ] + }, { "key": { "any": false, @@ -877,7 +911,8 @@ "type": "string", "values": [ { - "value": "default" + "value": "type", + "tags": [] } ] } @@ -896,16 +931,21 @@ "value": { "any": false, "required": true, - "optional": true, + "optional": false, "nullable": false, "functions": [], - "atomics": [ + "atomics": [], + "constants": [ { - "type": "boolean", - "tags": [] + "type": "string", + "values": [ + { + "value": "string", + "tags": [] + } + ] } ], - "constants": [], "templates": [], "escaped": null, "rest": null, @@ -917,7 +957,7 @@ "sets": [], "maps": [] }, - "description": "The default value.", + "description": "Discriminator value of the type.", "jsDocTags": [] }, { @@ -933,7 +973,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "title", + "tags": [] } ] } @@ -952,21 +993,16 @@ "value": { "any": false, "required": true, - "optional": false, + "optional": true, "nullable": false, "functions": [], - "atomics": [], - "constants": [ + "atomics": [ { "type": "string", - "values": [ - { - "value": "boolean", - "tags": [] - } - ] + "tags": [] } ], + "constants": [], "templates": [], "escaped": null, "rest": null, @@ -978,7 +1014,7 @@ "sets": [], "maps": [] }, - "description": "Discriminator value of the type.", + "description": "Title of the schema.", "jsDocTags": [] }, { @@ -994,7 +1030,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "description", + "tags": [] } ] } @@ -1034,7 +1071,7 @@ "sets": [], "maps": [] }, - "description": "Title of the schema.", + "description": "Detailed description of the schema.", "jsDocTags": [] }, { @@ -1050,7 +1087,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "deprecated", + "tags": [] } ] } @@ -1074,7 +1112,7 @@ "functions": [], "atomics": [ { - "type": "string", + "type": "boolean", "tags": [] } ], @@ -1090,7 +1128,7 @@ "sets": [], "maps": [] }, - "description": "Detailed description of the schema.", + "description": "Whether the type is deprecated or not.", "jsDocTags": [] }, { @@ -1106,7 +1144,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "example", + "tags": [] } ] } @@ -1123,17 +1162,12 @@ "maps": [] }, "value": { - "any": false, + "any": true, "required": true, "optional": true, "nullable": false, "functions": [], - "atomics": [ - { - "type": "boolean", - "tags": [] - } - ], + "atomics": [], "constants": [], "templates": [], "escaped": null, @@ -1146,7 +1180,7 @@ "sets": [], "maps": [] }, - "description": "Whether the type is deprecated or not.", + "description": "Example value.", "jsDocTags": [] }, { @@ -1162,7 +1196,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "examples", + "tags": [] } ] } @@ -1179,7 +1214,7 @@ "maps": [] }, "value": { - "any": true, + "any": false, "required": true, "optional": true, "nullable": false, @@ -1191,15 +1226,32 @@ "rest": null, "arrays": [], "tuples": [], - "objects": [], + "objects": [ + { + "name": "Record", + "tags": [] + } + ], "aliases": [], "natives": [], "sets": [], "maps": [] }, - "description": "Example value.", + "description": "List of example values as key-value pairs.", "jsDocTags": [] - }, + } + ], + "description": "String type info.", + "jsDocTags": [], + "index": 3, + "recursive": false, + "nullables": [ + false + ] + }, + { + "name": "Record", + "properties": [ { "key": { "any": false, @@ -1207,17 +1259,13 @@ "optional": false, "nullable": false, "functions": [], - "atomics": [], - "constants": [ + "atomics": [ { "type": "string", - "values": [ - { - "value": "examples" - } - ] + "tags": [] } ], + "constants": [], "templates": [], "escaped": null, "rest": null, @@ -1230,9 +1278,9 @@ "maps": [] }, "value": { - "any": false, + "any": true, "required": true, - "optional": true, + "optional": false, "nullable": false, "functions": [], "atomics": [], @@ -1242,28 +1290,26 @@ "rest": null, "arrays": [], "tuples": [], - "objects": [ - "Record" - ], + "objects": [], "aliases": [], "natives": [], "sets": [], "maps": [] }, - "description": "List of example values as key-value pairs.", + "description": null, "jsDocTags": [] } ], - "description": "Boolean type info.", + "description": "Construct a type with a set of properties K of type T", "jsDocTags": [], - "index": 5, + "index": 4, "recursive": false, "nullables": [ false ] }, { - "name": "OpenApi.IJsonSchema.IInteger", + "name": "OpenApi.IJsonSchema.INumber", "properties": [ { "key": { @@ -1278,7 +1324,8 @@ "type": "string", "values": [ { - "value": "default" + "value": "default", + "tags": [] } ] } @@ -1303,21 +1350,7 @@ "atomics": [ { "type": "number", - "tags": [ - [ - { - "target": "number", - "name": "Type<\"int64\">", - "kind": "type", - "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", - "exclusive": true, - "schema": { - "type": "integer" - } - } - ] - ] + "tags": [] } ], "constants": [], @@ -1333,17 +1366,7 @@ "maps": [] }, "description": "Default value.", - "jsDocTags": [ - { - "name": "type", - "text": [ - { - "text": "int64", - "kind": "text" - } - ] - } - ] + "jsDocTags": [] }, { "key": { @@ -1358,7 +1381,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "minimum", + "tags": [] } ] } @@ -1369,35 +1393,21 @@ "arrays": [], "tuples": [], "objects": [], - "aliases": [], - "natives": [], - "sets": [], - "maps": [] - }, - "value": { - "any": false, - "required": true, - "optional": true, - "nullable": false, - "functions": [], - "atomics": [ - { - "type": "number", - "tags": [ - [ - { - "target": "number", - "name": "Type<\"int64\">", - "kind": "type", - "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", - "exclusive": true, - "schema": { - "type": "integer" - } - } - ] - ] + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": true, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "number", + "tags": [] } ], "constants": [], @@ -1413,17 +1423,7 @@ "maps": [] }, "description": "Minimum value restriction.", - "jsDocTags": [ - { - "name": "type", - "text": [ - { - "text": "int64", - "kind": "text" - } - ] - } - ] + "jsDocTags": [] }, { "key": { @@ -1438,7 +1438,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "maximum", + "tags": [] } ] } @@ -1463,21 +1464,7 @@ "atomics": [ { "type": "number", - "tags": [ - [ - { - "target": "number", - "name": "Type<\"int64\">", - "kind": "type", - "value": "int64", - "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", - "exclusive": true, - "schema": { - "type": "integer" - } - } - ] - ] + "tags": [] } ], "constants": [], @@ -1493,17 +1480,7 @@ "maps": [] }, "description": "Maximum value restriction.", - "jsDocTags": [ - { - "name": "type", - "text": [ - { - "text": "int64", - "kind": "text" - } - ] - } - ] + "jsDocTags": [] }, { "key": { @@ -1518,7 +1495,8 @@ "type": "string", "values": [ { - "value": "exclusiveMinimum" + "value": "exclusiveMinimum", + "tags": [] } ] } @@ -1558,7 +1536,7 @@ "sets": [], "maps": [] }, - "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property.", + "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property.", "jsDocTags": [] }, { @@ -1574,7 +1552,8 @@ "type": "string", "values": [ { - "value": "exclusiveMaximum" + "value": "exclusiveMaximum", + "tags": [] } ] } @@ -1614,7 +1593,7 @@ "sets": [], "maps": [] }, - "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property.", + "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property.", "jsDocTags": [] }, { @@ -1630,7 +1609,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "multipleOf", + "tags": [] } ] } @@ -1657,17 +1637,6 @@ "type": "number", "tags": [ [ - { - "target": "number", - "name": "Type<\"uint64\">", - "kind": "type", - "value": "uint64", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", - "exclusive": true, - "schema": { - "type": "integer" - } - }, { "target": "number", "name": "ExclusiveMinimum<0>", @@ -1701,15 +1670,6 @@ }, "description": "Multiple of value restriction.", "jsDocTags": [ - { - "name": "type", - "text": [ - { - "text": "uint64", - "kind": "text" - } - ] - }, { "name": "exclusiveMinimum", "text": [ @@ -1734,7 +1694,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -1762,7 +1723,7 @@ "type": "string", "values": [ { - "value": "integer", + "value": "number", "tags": [] } ] @@ -1795,7 +1756,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -1851,7 +1813,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -1907,7 +1870,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -1963,7 +1927,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -2014,7 +1979,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -2044,7 +2010,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2055,16 +2024,16 @@ "jsDocTags": [] } ], - "description": "Integer type info.", + "description": "Number (double) type info.", "jsDocTags": [], - "index": 6, + "index": 5, "recursive": false, "nullables": [ false ] }, { - "name": "OpenApi.IJsonSchema.INumber", + "name": "OpenApi.IJsonSchema.IConstant", "properties": [ { "key": { @@ -2079,7 +2048,8 @@ "type": "string", "values": [ { - "value": "default" + "value": "const", + "tags": [] } ] } @@ -2098,13 +2068,21 @@ "value": { "any": false, "required": true, - "optional": true, + "optional": false, "nullable": false, "functions": [], "atomics": [ + { + "type": "string", + "tags": [] + }, { "type": "number", "tags": [] + }, + { + "type": "boolean", + "tags": [] } ], "constants": [], @@ -2119,7 +2097,7 @@ "sets": [], "maps": [] }, - "description": "Default value.", + "description": "The constant value.", "jsDocTags": [] }, { @@ -2135,7 +2113,8 @@ "type": "string", "values": [ { - "value": "minimum" + "value": "title", + "tags": [] } ] } @@ -2159,7 +2138,7 @@ "functions": [], "atomics": [ { - "type": "number", + "type": "string", "tags": [] } ], @@ -2175,7 +2154,7 @@ "sets": [], "maps": [] }, - "description": "Minimum value restriction.", + "description": "Title of the schema.", "jsDocTags": [] }, { @@ -2191,7 +2170,8 @@ "type": "string", "values": [ { - "value": "maximum" + "value": "description", + "tags": [] } ] } @@ -2215,7 +2195,7 @@ "functions": [], "atomics": [ { - "type": "number", + "type": "string", "tags": [] } ], @@ -2231,7 +2211,7 @@ "sets": [], "maps": [] }, - "description": "Maximum value restriction.", + "description": "Detailed description of the schema.", "jsDocTags": [] }, { @@ -2247,7 +2227,8 @@ "type": "string", "values": [ { - "value": "exclusiveMinimum" + "value": "deprecated", + "tags": [] } ] } @@ -2287,7 +2268,7 @@ "sets": [], "maps": [] }, - "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property.", + "description": "Whether the type is deprecated or not.", "jsDocTags": [] }, { @@ -2303,7 +2284,8 @@ "type": "string", "values": [ { - "value": "exclusiveMaximum" + "value": "example", + "tags": [] } ] } @@ -2320,18 +2302,46 @@ "maps": [] }, "value": { - "any": false, + "any": true, "required": true, "optional": true, "nullable": false, "functions": [], - "atomics": [ + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": "Example value.", + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ { - "type": "boolean", - "tags": [] + "type": "string", + "values": [ + { + "value": "examples", + "tags": [] + } + ] } ], - "constants": [], "templates": [], "escaped": null, "rest": null, @@ -2343,9 +2353,45 @@ "sets": [], "maps": [] }, - "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property.", + "value": { + "any": false, + "required": true, + "optional": true, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "Record", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": "List of example values as key-value pairs.", "jsDocTags": [] - }, + } + ], + "description": "Constant value type.", + "jsDocTags": [], + "index": 6, + "recursive": false, + "nullables": [ + false + ] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "properties": [ { "key": { "any": false, @@ -2359,7 +2405,8 @@ "type": "string", "values": [ { - "value": "multipleOf" + "value": "default", + "tags": [] } ] } @@ -2383,26 +2430,8 @@ "functions": [], "atomics": [ { - "type": "number", - "tags": [ - [ - { - "target": "number", - "name": "ExclusiveMinimum<0>", - "kind": "exclusiveMinimum", - "value": 0, - "validate": "0 < $input", - "exclusive": [ - "minimum", - "exclusiveMinimum" - ], - "schema": { - "exclusiveMinimum": true, - "minimum": 0 - } - } - ] - ] + "type": "boolean", + "tags": [] } ], "constants": [], @@ -2417,18 +2446,8 @@ "sets": [], "maps": [] }, - "description": "Multiple of value restriction.", - "jsDocTags": [ - { - "name": "exclusiveMinimum", - "text": [ - { - "text": "0", - "kind": "text" - } - ] - } - ] + "description": "The default value.", + "jsDocTags": [] }, { "key": { @@ -2443,7 +2462,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -2471,7 +2491,7 @@ "type": "string", "values": [ { - "value": "number", + "value": "boolean", "tags": [] } ] @@ -2504,7 +2524,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -2560,7 +2581,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -2616,7 +2638,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -2672,7 +2695,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -2723,7 +2747,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -2753,7 +2778,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -2764,7 +2792,7 @@ "jsDocTags": [] } ], - "description": "Number (double) type info.", + "description": "Boolean type info.", "jsDocTags": [], "index": 7, "recursive": false, @@ -2773,7 +2801,7 @@ ] }, { - "name": "OpenApi.IJsonSchema.IString", + "name": "OpenApi.IJsonSchema.IInteger", "properties": [ { "key": { @@ -2788,7 +2816,8 @@ "type": "string", "values": [ { - "value": "default" + "value": "default", + "tags": [] } ] } @@ -2812,8 +2841,22 @@ "functions": [], "atomics": [ { - "type": "string", - "tags": [] + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"int64\">", + "kind": "type", + "value": "int64", + "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "exclusive": true, + "schema": { + "type": "integer" + } + } + ] + ] } ], "constants": [], @@ -2829,7 +2872,17 @@ "maps": [] }, "description": "Default value.", - "jsDocTags": [] + "jsDocTags": [ + { + "name": "type", + "text": [ + { + "text": "int64", + "kind": "text" + } + ] + } + ] }, { "key": { @@ -2844,7 +2897,8 @@ "type": "string", "values": [ { - "value": "format" + "value": "minimum", + "tags": [] } ] } @@ -2868,8 +2922,22 @@ "functions": [], "atomics": [ { - "type": "string", - "tags": [] + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"int64\">", + "kind": "type", + "value": "int64", + "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "exclusive": true, + "schema": { + "type": "integer" + } + } + ] + ] } ], "constants": [], @@ -2884,8 +2952,18 @@ "sets": [], "maps": [] }, - "description": "Format restriction.", - "jsDocTags": [] + "description": "Minimum value restriction.", + "jsDocTags": [ + { + "name": "type", + "text": [ + { + "text": "int64", + "kind": "text" + } + ] + } + ] }, { "key": { @@ -2900,7 +2978,8 @@ "type": "string", "values": [ { - "value": "pattern" + "value": "maximum", + "tags": [] } ] } @@ -2924,8 +3003,22 @@ "functions": [], "atomics": [ { - "type": "string", - "tags": [] + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"int64\">", + "kind": "type", + "value": "int64", + "validate": "Math.floor($input) === $input && -9223372036854775808 <= $input && $input <= 9223372036854775807", + "exclusive": true, + "schema": { + "type": "integer" + } + } + ] + ] } ], "constants": [], @@ -2940,8 +3033,18 @@ "sets": [], "maps": [] }, - "description": "Pattern restriction.", - "jsDocTags": [] + "description": "Maximum value restriction.", + "jsDocTags": [ + { + "name": "type", + "text": [ + { + "text": "int64", + "kind": "text" + } + ] + } + ] }, { "key": { @@ -2956,7 +3059,8 @@ "type": "string", "values": [ { - "value": "contentMediaType" + "value": "exclusiveMinimum", + "tags": [] } ] } @@ -2980,7 +3084,7 @@ "functions": [], "atomics": [ { - "type": "string", + "type": "boolean", "tags": [] } ], @@ -2996,7 +3100,7 @@ "sets": [], "maps": [] }, - "description": "Content media type restriction.", + "description": "Exclusive minimum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMinimum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link minimum} property.", "jsDocTags": [] }, { @@ -3012,7 +3116,8 @@ "type": "string", "values": [ { - "value": "minLength" + "value": "exclusiveMaximum", + "tags": [] } ] } @@ -3036,22 +3141,8 @@ "functions": [], "atomics": [ { - "type": "number", - "tags": [ - [ - { - "target": "number", - "name": "Type<\"uint64\">", - "kind": "type", - "value": "uint64", - "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", - "exclusive": true, - "schema": { - "type": "integer" - } - } - ] - ] + "type": "boolean", + "tags": [] } ], "constants": [], @@ -3066,18 +3157,8 @@ "sets": [], "maps": [] }, - "description": "Minimum length restriction.", - "jsDocTags": [ - { - "name": "type", - "text": [ - { - "text": "uint64", - "kind": "text" - } - ] - } - ] + "description": "Exclusive maximum value restriction.\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined the `exclusiveMaximum` value as `number`, {@link OpenApi}\nforcibly converts it to `boolean` type, and assign the numeric value to\nthe {@link maximum} property.", + "jsDocTags": [] }, { "key": { @@ -3092,7 +3173,8 @@ "type": "string", "values": [ { - "value": "maxLength" + "value": "multipleOf", + "tags": [] } ] } @@ -3129,6 +3211,21 @@ "schema": { "type": "integer" } + }, + { + "target": "number", + "name": "ExclusiveMinimum<0>", + "kind": "exclusiveMinimum", + "value": 0, + "validate": "0 < $input", + "exclusive": [ + "minimum", + "exclusiveMinimum" + ], + "schema": { + "exclusiveMinimum": true, + "minimum": 0 + } } ] ] @@ -3146,7 +3243,7 @@ "sets": [], "maps": [] }, - "description": "Maximum length restriction.", + "description": "Multiple of value restriction.", "jsDocTags": [ { "name": "type", @@ -3156,6 +3253,15 @@ "kind": "text" } ] + }, + { + "name": "exclusiveMinimum", + "text": [ + { + "text": "0", + "kind": "text" + } + ] } ] }, @@ -3172,7 +3278,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -3200,7 +3307,7 @@ "type": "string", "values": [ { - "value": "string", + "value": "integer", "tags": [] } ] @@ -3233,7 +3340,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -3289,7 +3397,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -3345,7 +3454,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -3401,7 +3511,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -3452,7 +3563,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -3482,7 +3594,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -3493,7 +3608,7 @@ "jsDocTags": [] } ], - "description": "String type info.", + "description": "Integer type info.", "jsDocTags": [], "index": 8, "recursive": false, @@ -3502,7 +3617,7 @@ ] }, { - "name": "OpenApi.IJsonSchema.IArray", + "name": "OpenApi.IJsonSchema.IArray", "properties": [ { "key": { @@ -3517,7 +3632,8 @@ "type": "string", "values": [ { - "value": "items" + "value": "items", + "tags": [] } ] } @@ -3547,18 +3663,54 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IConstant", - "OpenApi.IJsonSchema.IBoolean", - "OpenApi.IJsonSchema.INumber", - "OpenApi.IJsonSchema.IInteger", - "OpenApi.IJsonSchema.IString", - "OpenApi.IJsonSchema.IArray", - "OpenApi.IJsonSchema.ITuple", - "OpenApi.IJsonSchema.IObject", - "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.INull", - "OpenApi.IJsonSchema.IUnknown" + { + "name": "OpenApi.IJsonSchema.IString", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INumber", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IConstant", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IInteger", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IArray", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.ITuple", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IObject", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IReference", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IOneOf", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INull", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IUnknown", + "tags": [] + } ], "aliases": [], "natives": [], @@ -3581,7 +3733,8 @@ "type": "string", "values": [ { - "value": "uniqueItems" + "value": "uniqueItems", + "tags": [] } ] } @@ -3637,7 +3790,8 @@ "type": "string", "values": [ { - "value": "minItems" + "value": "minItems", + "tags": [] } ] } @@ -3717,7 +3871,8 @@ "type": "string", "values": [ { - "value": "maxItems" + "value": "maxItems", + "tags": [] } ] } @@ -3797,7 +3952,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -3858,7 +4014,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -3914,7 +4071,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -3970,7 +4128,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -4026,7 +4185,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -4077,7 +4237,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -4107,7 +4268,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -4127,7 +4291,7 @@ ] }, { - "name": "OpenApi.IJsonSchema.ITuple", + "name": "OpenApi.IJsonSchema.ITuple", "properties": [ { "key": { @@ -4142,7 +4306,8 @@ "type": "string", "values": [ { - "value": "prefixItems" + "value": "prefixItems", + "tags": [] } ] } @@ -4198,7 +4363,8 @@ "type": "string", "values": [ { - "value": "additionalItems" + "value": "additionalItems", + "tags": [] } ] } @@ -4233,18 +4399,54 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IConstant", - "OpenApi.IJsonSchema.IBoolean", - "OpenApi.IJsonSchema.INumber", - "OpenApi.IJsonSchema.IInteger", - "OpenApi.IJsonSchema.IString", - "OpenApi.IJsonSchema.IArray", - "OpenApi.IJsonSchema.ITuple", - "OpenApi.IJsonSchema.IObject", - "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.INull", - "OpenApi.IJsonSchema.IUnknown" + { + "name": "OpenApi.IJsonSchema.IString", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INumber", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IConstant", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IInteger", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IArray", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.ITuple", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IObject", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IReference", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IOneOf", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INull", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IUnknown", + "tags": [] + } ], "aliases": [], "natives": [], @@ -4267,7 +4469,8 @@ "type": "string", "values": [ { - "value": "uniqueItems" + "value": "uniqueItems", + "tags": [] } ] } @@ -4323,7 +4526,8 @@ "type": "string", "values": [ { - "value": "minItems" + "value": "minItems", + "tags": [] } ] } @@ -4403,7 +4607,8 @@ "type": "string", "values": [ { - "value": "maxItems" + "value": "maxItems", + "tags": [] } ] } @@ -4483,7 +4688,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -4544,7 +4750,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -4600,7 +4807,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -4656,7 +4864,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -4712,7 +4921,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -4763,7 +4973,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -4793,7 +5004,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -4813,7 +5027,7 @@ ] }, { - "name": "OpenApi.IJsonSchema.IObject", + "name": "OpenApi.IJsonSchema.IObject", "properties": [ { "key": { @@ -4828,7 +5042,8 @@ "type": "string", "values": [ { - "value": "properties" + "value": "properties", + "tags": [] } ] } @@ -4858,7 +5073,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -4881,7 +5099,8 @@ "type": "string", "values": [ { - "value": "additionalProperties" + "value": "additionalProperties", + "tags": [] } ] } @@ -4916,18 +5135,54 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IConstant", - "OpenApi.IJsonSchema.IBoolean", - "OpenApi.IJsonSchema.INumber", - "OpenApi.IJsonSchema.IInteger", - "OpenApi.IJsonSchema.IString", - "OpenApi.IJsonSchema.IArray", - "OpenApi.IJsonSchema.ITuple", - "OpenApi.IJsonSchema.IObject", - "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.INull", - "OpenApi.IJsonSchema.IUnknown" + { + "name": "OpenApi.IJsonSchema.IString", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INumber", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IConstant", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IInteger", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IArray", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.ITuple", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IObject", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IReference", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IOneOf", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INull", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IUnknown", + "tags": [] + } ], "aliases": [], "natives": [], @@ -4950,7 +5205,8 @@ "type": "string", "values": [ { - "value": "required" + "value": "required", + "tags": [] } ] } @@ -5006,7 +5262,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -5067,7 +5324,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -5123,7 +5381,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -5179,7 +5438,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -5235,7 +5495,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -5286,7 +5547,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -5316,7 +5578,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -5351,7 +5616,8 @@ "type": "string", "values": [ { - "value": "$ref" + "value": "$ref", + "tags": [] } ] } @@ -5407,7 +5673,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -5463,7 +5730,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -5519,7 +5787,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -5575,7 +5844,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -5626,7 +5896,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -5656,7 +5927,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -5676,7 +5950,7 @@ ] }, { - "name": "OpenApi.IJsonSchema.IOneOf", + "name": "OpenApi.IJsonSchema.IOneOf", "properties": [ { "key": { @@ -5691,7 +5965,8 @@ "type": "string", "values": [ { - "value": "oneOf" + "value": "oneOf", + "tags": [] } ] } @@ -5720,7 +5995,7 @@ "rest": null, "arrays": [ { - "name": "Array | ITuple | IObject<...> | IReference<...> | INull | IUnknown>", + "name": "Array | INull | IUnknown>", "tags": [] } ], @@ -5747,7 +6022,8 @@ "type": "string", "values": [ { - "value": "discriminator" + "value": "discriminator", + "tags": [] } ] } @@ -5777,7 +6053,10 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IOneOf.IDiscriminator" + { + "name": "OpenApi.IJsonSchema.IOneOf.IDiscriminator", + "tags": [] + } ], "aliases": [], "natives": [], @@ -5800,7 +6079,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -5856,7 +6136,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -5912,7 +6193,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -5968,7 +6250,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -6019,7 +6302,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -6049,7 +6333,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -6084,7 +6371,8 @@ "type": "string", "values": [ { - "value": "default" + "value": "default", + "tags": [] } ] } @@ -6135,7 +6423,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -6196,7 +6485,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -6252,7 +6542,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -6308,7 +6599,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -6364,7 +6656,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -6415,7 +6708,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -6445,7 +6739,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -6480,7 +6777,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -6531,7 +6829,8 @@ "type": "string", "values": [ { - "value": "title" + "value": "title", + "tags": [] } ] } @@ -6587,7 +6886,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -6643,7 +6943,8 @@ "type": "string", "values": [ { - "value": "deprecated" + "value": "deprecated", + "tags": [] } ] } @@ -6699,7 +7000,8 @@ "type": "string", "values": [ { - "value": "example" + "value": "example", + "tags": [] } ] } @@ -6750,7 +7052,8 @@ "type": "string", "values": [ { - "value": "examples" + "value": "examples", + "tags": [] } ] } @@ -6780,7 +7083,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -6791,7 +7097,7 @@ "jsDocTags": [] } ], - "description": "Unknown, `any` type.", + "description": "Unknown, the `any` type.", "jsDocTags": [], "index": 15, "recursive": false, @@ -6815,7 +7121,8 @@ "type": "string", "values": [ { - "value": "propertyName" + "value": "propertyName", + "tags": [] } ] } @@ -6871,7 +7178,8 @@ "type": "string", "values": [ { - "value": "mapping" + "value": "mapping", + "tags": [] } ] } @@ -6901,7 +7209,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -7026,11 +7337,26 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.ISecurityScheme.IApiKey", - "OpenApi.ISecurityScheme.IHttpBasic", - "OpenApi.ISecurityScheme.IHttpBearer", - "OpenApi.ISecurityScheme.IOAuth2", - "OpenApi.ISecurityScheme.IOpenId" + { + "name": "OpenApi.ISecurityScheme.IApiKey", + "tags": [] + }, + { + "name": "OpenApi.ISecurityScheme.IHttpBasic", + "tags": [] + }, + { + "name": "OpenApi.ISecurityScheme.IHttpBearer", + "tags": [] + }, + { + "name": "OpenApi.ISecurityScheme.IOAuth2", + "tags": [] + }, + { + "name": "OpenApi.ISecurityScheme.IOpenId", + "tags": [] + } ], "aliases": [], "natives": [], @@ -7065,7 +7391,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -7126,7 +7453,8 @@ "type": "string", "values": [ { - "value": "in" + "value": "in", + "tags": [] } ] } @@ -7195,7 +7523,8 @@ "type": "string", "values": [ { - "value": "name" + "value": "name", + "tags": [] } ] } @@ -7251,7 +7580,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -7319,7 +7649,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -7380,7 +7711,8 @@ "type": "string", "values": [ { - "value": "scheme" + "value": "scheme", + "tags": [] } ] } @@ -7441,7 +7773,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -7509,7 +7842,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -7570,7 +7904,8 @@ "type": "string", "values": [ { - "value": "scheme" + "value": "scheme", + "tags": [] } ] } @@ -7631,7 +7966,8 @@ "type": "string", "values": [ { - "value": "bearerFormat" + "value": "bearerFormat", + "tags": [] } ] } @@ -7687,7 +8023,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -7755,7 +8092,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -7816,7 +8154,8 @@ "type": "string", "values": [ { - "value": "flows" + "value": "flows", + "tags": [] } ] } @@ -7846,7 +8185,10 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.ISecurityScheme.IOAuth2.IFlowSet" + { + "name": "OpenApi.ISecurityScheme.IOAuth2.IFlowSet", + "tags": [] + } ], "aliases": [], "natives": [], @@ -7869,7 +8211,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -7937,7 +8280,8 @@ "type": "string", "values": [ { - "value": "authorizationCode" + "value": "authorizationCode", + "tags": [] } ] } @@ -7967,7 +8311,10 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.ISecurityScheme.IOAuth2.IFlow" + { + "name": "OpenApi.ISecurityScheme.IOAuth2.IFlow", + "tags": [] + } ], "aliases": [], "natives": [], @@ -7990,7 +8337,8 @@ "type": "string", "values": [ { - "value": "implicit" + "value": "implicit", + "tags": [] } ] } @@ -8020,7 +8368,10 @@ "arrays": [], "tuples": [], "objects": [ - "Omit" + { + "name": "Omit", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8043,7 +8394,8 @@ "type": "string", "values": [ { - "value": "password" + "value": "password", + "tags": [] } ] } @@ -8073,7 +8425,10 @@ "arrays": [], "tuples": [], "objects": [ - "Omit" + { + "name": "Omit", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8096,7 +8451,8 @@ "type": "string", "values": [ { - "value": "clientCredentials" + "value": "clientCredentials", + "tags": [] } ] } @@ -8126,7 +8482,10 @@ "arrays": [], "tuples": [], "objects": [ - "Omit" + { + "name": "Omit", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8160,7 +8519,8 @@ "type": "string", "values": [ { - "value": "authorizationUrl" + "value": "authorizationUrl", + "tags": [] } ] } @@ -8216,7 +8576,8 @@ "type": "string", "values": [ { - "value": "tokenUrl" + "value": "tokenUrl", + "tags": [] } ] } @@ -8272,7 +8633,8 @@ "type": "string", "values": [ { - "value": "refreshUrl" + "value": "refreshUrl", + "tags": [] } ] } @@ -8328,7 +8690,8 @@ "type": "string", "values": [ { - "value": "scopes" + "value": "scopes", + "tags": [] } ] } @@ -8358,7 +8721,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8392,7 +8758,8 @@ "type": "string", "values": [ { - "value": "authorizationUrl" + "value": "authorizationUrl", + "tags": [] } ] } @@ -8448,7 +8815,8 @@ "type": "string", "values": [ { - "value": "refreshUrl" + "value": "refreshUrl", + "tags": [] } ] } @@ -8504,7 +8872,8 @@ "type": "string", "values": [ { - "value": "scopes" + "value": "scopes", + "tags": [] } ] } @@ -8534,7 +8903,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8569,7 +8941,8 @@ "type": "string", "values": [ { - "value": "tokenUrl" + "value": "tokenUrl", + "tags": [] } ] } @@ -8625,7 +8998,8 @@ "type": "string", "values": [ { - "value": "refreshUrl" + "value": "refreshUrl", + "tags": [] } ] } @@ -8681,7 +9055,8 @@ "type": "string", "values": [ { - "value": "scopes" + "value": "scopes", + "tags": [] } ] } @@ -8711,7 +9086,10 @@ "arrays": [], "tuples": [], "objects": [ - "Record" + { + "name": "Record", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8746,7 +9124,8 @@ "type": "string", "values": [ { - "value": "type" + "value": "type", + "tags": [] } ] } @@ -8807,7 +9186,8 @@ "type": "string", "values": [ { - "value": "openIdConnectUrl" + "value": "openIdConnectUrl", + "tags": [] } ] } @@ -8863,7 +9243,8 @@ "type": "string", "values": [ { - "value": "description" + "value": "description", + "tags": [] } ] } @@ -8933,7 +9314,10 @@ "arrays": [], "tuples": [], "objects": [ - "IJsonApplication.IV3_1>" + { + "name": "IJsonSchemaCollection.IV3_1>", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8962,18 +9346,54 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IConstant", - "OpenApi.IJsonSchema.IBoolean", - "OpenApi.IJsonSchema.INumber", - "OpenApi.IJsonSchema.IInteger", - "OpenApi.IJsonSchema.IString", - "OpenApi.IJsonSchema.IArray", - "OpenApi.IJsonSchema.ITuple", - "OpenApi.IJsonSchema.IObject", - "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.IOneOf", - "OpenApi.IJsonSchema.INull", - "OpenApi.IJsonSchema.IUnknown" + { + "name": "OpenApi.IJsonSchema.IString", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INumber", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IConstant", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IInteger", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IArray", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.ITuple", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IObject", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IReference", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IOneOf", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INull", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IUnknown", + "tags": [] + } ], "aliases": [], "natives": [], @@ -8987,7 +9407,7 @@ "index": null }, { - "name": "Array | ITuple | IObject<...> | IReference<...> | INull | IUnknown>", + "name": "Array | INull | IUnknown>", "value": { "any": false, "required": true, @@ -9002,17 +9422,50 @@ "arrays": [], "tuples": [], "objects": [ - "OpenApi.IJsonSchema.IConstant", - "OpenApi.IJsonSchema.IBoolean", - "OpenApi.IJsonSchema.INumber", - "OpenApi.IJsonSchema.IInteger", - "OpenApi.IJsonSchema.IString", - "OpenApi.IJsonSchema.IArray", - "OpenApi.IJsonSchema.ITuple", - "OpenApi.IJsonSchema.IObject", - "OpenApi.IJsonSchema.IReference", - "OpenApi.IJsonSchema.INull", - "OpenApi.IJsonSchema.IUnknown" + { + "name": "OpenApi.IJsonSchema.IString", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INumber", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IConstant", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IBoolean", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IInteger", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IArray", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.ITuple", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IObject", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IReference", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.INull", + "tags": [] + }, + { + "name": "OpenApi.IJsonSchema.IUnknown", + "tags": [] + } ], "aliases": [], "natives": [], diff --git a/test/src/debug/example.js b/test/src/debug/example.js new file mode 100644 index 0000000000..14af2b7ae8 --- /dev/null +++ b/test/src/debug/example.js @@ -0,0 +1,192 @@ +import typia from "typia"; + +const app = { + model: "chatgpt", + options: { + reference: false, + separate: null, + }, + functions: [ + { + name: "create", + parameters: { + type: "object", + properties: { + input: { + description: + "Information of the article to create.\n\n------------------------------\n\nDescription of the current {@link IBbsArticle.ICreate} type:\n\n> Information of the article to create.\n\n------------------------------\n\nDescription of the parent {@link IBbsArticle} type:\n\n> Article entity.\n> \n> `IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + type: "object", + properties: { + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, + }, + required: ["title", "body", "thumbnail"], + additionalProperties: false, + }, + }, + required: ["input"], + additionalProperties: false, + $defs: {}, + }, + output: { + description: + "Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + type: "object", + properties: { + id: { + title: "Primary Key", + description: "Primary Key.\n\n\n@format uuid", + type: "string", + }, + created_at: { + title: "Creation time of the article", + description: "Creation time of the article.\n\n\n@format date-time", + type: "string", + }, + updated_at: { + title: "Last updated time of the article", + description: + "Last updated time of the article.\n\n\n@format date-time", + type: "string", + }, + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, + }, + required: [ + "id", + "created_at", + "updated_at", + "title", + "body", + "thumbnail", + ], + additionalProperties: false, + }, + description: + "Create a new article.\n\nWrites a new article and archives it into the DB.", + strict: true, + }, + { + name: "update", + parameters: { + type: "object", + properties: { + id: { + title: "Target article's {@link IBbsArticle.id}", + description: + "Target article's {@link IBbsArticle.id}.\n\n\n@format uuid", + type: "string", + }, + input: { + description: + "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialIBbsArticle.ICreate} type:\n\n> Make all properties in T optional", + type: "object", + properties: { + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, + }, + required: ["title", "body", "thumbnail"], + additionalProperties: false, + }, + }, + required: ["id", "input"], + additionalProperties: false, + $defs: {}, + }, + description: "Update an article.\n\nUpdates an article with new content.", + strict: true, + }, + { + name: "erase", + parameters: { + type: "object", + properties: { + id: { + title: "Target article's {@link IBbsArticle.id}", + description: + "Target article's {@link IBbsArticle.id}.\n\n\n@format uuid", + type: "string", + }, + }, + required: ["id"], + additionalProperties: false, + $defs: {}, + }, + description: "Erase an article.\n\nErases an article from the DB.", + strict: true, + }, + ], +}; +console.log(app); diff --git a/test/src/debug/llm.application.separate.ts b/test/src/debug/llm.application.separate.ts new file mode 100644 index 0000000000..0efda1a7c3 --- /dev/null +++ b/test/src/debug/llm.application.separate.ts @@ -0,0 +1,127 @@ +import { + ClaudeTypeChecker, + ILlmApplication, + ILlmSchema, +} from "@samchon/openapi"; +import typia, { tags } from "typia"; + +const app: ILlmApplication<"claude"> = typia.llm.application< + BbsArticleController, + "claude" +>({ + separate: (schema: ILlmSchema<"claude">) => + ClaudeTypeChecker.isString(schema) && schema.contentMediaType !== undefined, +}); + +console.log(app); + +interface BbsArticleController { + /** + * Create a new article. + * + * Writes a new article and archives it into the DB. + * + * @param props Properties of create function + * @returns Newly created article + */ + create(props: { + /** + * Information of the article to create + */ + input: IBbsArticle.ICreate; + }): Promise; + + /** + * Update an article. + * + * Updates an article with new content. + * + * @param props Properties of update function + * @param input New content to update + */ + update(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + + /** + * New content to update. + */ + input: IBbsArticle.IUpdate; + }): Promise; + + /** + * Erase an article. + * + * Erases an article from the DB. + * + * @param props Properties of erase function + */ + erase(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + }): Promise; +} + +/** + * Article entity. + * + * `IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System). + */ +interface IBbsArticle extends IBbsArticle.ICreate { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of the article. + */ + created_at: string & tags.Format<"date-time">; + + /** + * Last updated time of the article. + */ + updated_at: string & tags.Format<"date-time">; +} +namespace IBbsArticle { + /** + * Information of the article to create. + */ + export interface ICreate { + /** + * Title of the article. + * + * Representative title of the article. + */ + title: string; + + /** + * Content body. + * + * Content body of the article writtn in the markdown format. + */ + body: string; + + /** + * Thumbnail image URI. + * + * Thumbnail image URI which can represent the article. + * + * If configured as `null`, it means that no thumbnail image in the article. + */ + thumbnail: + | null + | (string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">); + } + + /** + * Information of the article to update. + * + * Only the filled properties will be updated. + */ + export type IUpdate = Partial; +} diff --git a/test/src/debug/llm.schema.ts b/test/src/debug/llm.schema.ts new file mode 100644 index 0000000000..f33e8c0785 --- /dev/null +++ b/test/src/debug/llm.schema.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { ArrayRecursive } from "../structures/ArrayRecursive"; + +const $defs: Record = {}; +const schema = typia.llm.schema< + ArrayRecursive, + "3.1", + { + reference: false; + } +>($defs); +console.log($defs, schema); diff --git a/test/src/debug/protobuf.ts b/test/src/debug/protobuf.ts new file mode 100644 index 0000000000..c3bd65f2e3 --- /dev/null +++ b/test/src/debug/protobuf.ts @@ -0,0 +1,7 @@ +import typia from "typia"; + +import { ObjectIntersection } from "../structures/ObjectIntersection"; +import { ObjectPartialAndRequired } from "../structures/ObjectPartialAndRequired"; + +typia.protobuf.createEncode(); +typia.protobuf.createEncode(); diff --git a/test/src/debug/reflect.ts b/test/src/debug/reflect.ts new file mode 100644 index 0000000000..9339581d02 --- /dev/null +++ b/test/src/debug/reflect.ts @@ -0,0 +1,4 @@ +import typia, { tags } from "typia"; + +const m = typia.reflect.metadata<[string & tags.Format<"uuid">]>(); +console.log(JSON.stringify(m.metadatas[0]?.atomics[0], null, 2)); diff --git a/test/src/debug/uniqueItems.ts b/test/src/debug/uniqueItems.ts new file mode 100644 index 0000000000..42a6b2158a --- /dev/null +++ b/test/src/debug/uniqueItems.ts @@ -0,0 +1,178 @@ +import typia, { tags } from "typia"; +import { v4 } from "uuid"; + +import { TestValidator } from "../helpers/TestValidator"; + +TestValidator.equals("implicit")([true, true, true, false])([ + typia.is([]), + typia.is(["one"]), + typia.is(["one", "two", "three"]), + typia.is(["one", "two", "one"]), +]); +TestValidator.equals("explicit true")([true, true, true, false])([ + typia.is>([]), + typia.is>(["one"]), + typia.is>(["one", "two", "three"]), + typia.is>(["one", "two", "one"]), +]); +TestValidator.equals("explicit false")([true, true, true, true])([ + typia.is>([]), + typia.is>(["one"]), + typia.is>(["one", "two", "three"]), + typia.is>(["one", "two", "one"]), +]); +TestValidator.equals("objects")([true, true, false])([ + typia.is>([ + { email: "a@a.com", name: "a", age: 1 }, + { email: "b@b.com", name: "b", age: 2 }, + ]), + typia.is>([ + { email: "a@a.com", name: "a", age: 1 }, + { email: "b@b.com", name: "b", age: 2 }, + { email: "b@b.com", name: "b", age: 3 }, + ]), + typia.is>([ + { email: "a@a.com", name: "a", age: 1 }, + { email: "b@b.com", name: "b", age: 2 }, + { email: "b@b.com", name: "b", age: 2 }, + ]), +]); +TestValidator.equals("arrays")([true, true, false])([ + typia.is>([ + [1, 2], + [3, 4], + ]), + typia.is>([ + [1, 2], + [3, 4], + [5, 6], + ]), + typia.is>([ + [1, 2], + [3, 4], + [1, 2], + ]), +]); +TestValidator.equals("dates")([true, false])([ + typia.is>([ + new Date(0), + new Date(1), + new Date(2), + ]), + typia.is>([ + new Date(0), + new Date(1), + new Date(1), + ]), +]); +TestValidator.equals("sets")([true, true, false])([ + typia.is[] & tags.UniqueItems>([ + new Set([1, 2, 3]), + new Set([4, 5, 6]), + new Set([7, 8, 9]), + ]), + typia.is[] & tags.UniqueItems>([ + new Set([1, 2, 3, 4]), + new Set([1, 2, 3, 5]), + new Set([1, 2, 3, 6]), + ]), + typia.is[] & tags.UniqueItems>([ + new Set([1, 2, 3]), + new Set([4, 5, 6]), + new Set([1, 2, 3]), + ]), +]); +TestValidator.equals("maps")([true, true, false])([ + typia.is[] & tags.UniqueItems>([ + new Map([ + ["a", 1], + ["b", 2], + ]), + new Map([ + ["c", 3], + ["d", 4], + ]), + new Map([ + ["e", 5], + ["f", 6], + ]), + ]), + typia.is[] & tags.UniqueItems>([ + new Map([ + ["a", 1], + ["b", 2], + ]), + new Map([ + ["c", 3], + ["d", 4], + ]), + new Map([ + ["e", 5], + ["f", 6], + ]), + ]), + typia.is[] & tags.UniqueItems>([ + new Map([ + ["a", 1], + ["b", 2], + ]), + new Map([ + ["c", 3], + ["d", 4], + ]), + new Map([ + ["a", 1], + ["b", 2], + ]), + ]), +]); +TestValidator.equals("deep")([true, true, false])([ + typia.is>([ + typia.random(), + typia.random(), + typia.random(), + ]), + typia.is>( + (() => { + const first = typia.random(); + first.children = new Array(3) + .fill(0) + .map(() => typia.random()); + return [ + first, + { + ...first, + children: [ + ...first.children.slice(0, 2), + { + ...first.children[2]!, + id: v4(), + }, + ], + }, + ]; + })(), + ), + typia.is>( + (() => { + const first = typia.random(); + const second = typia.random(); + const third = typia.misc.clone(first); + return [first, second, third]; + })(), + ), +]); + +interface IMember { + email: string; + name: string; + age: number; +} + +interface IDepartment { + id: string; + members: Map; + children: IDepartment[]; + logo: Uint8Array; + created_at: Date; +} diff --git a/test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts b/test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..695a4f9390 --- /dev/null +++ b/test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assert_ObjectSequenceProtobuf = _test_assert(TypeGuardError)( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)((input) => + typia.assert(input), +); diff --git a/test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts b/test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..794fe24430 --- /dev/null +++ b/test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assertCustom_ObjectSequenceProtobuf = _test_assert( + CustomGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (input) => + typia.assert(input, (p) => new CustomGuardError(p)), +); diff --git a/test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts b/test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..0ed022f3c8 --- /dev/null +++ b/test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assertGuard_ObjectSequenceProtobuf = _test_assertGuard( + TypeGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (input) => typia.assertGuard(input), +); diff --git a/test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts b/test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..904bd93c5a --- /dev/null +++ b/test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assertGuardCustom_ObjectSequenceProtobuf = _test_assertGuard( + CustomGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (input) => + typia.assertGuard( + input, + (p) => new CustomGuardError(p), + ), +); diff --git a/test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts b/test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..5a8af2d8f2 --- /dev/null +++ b/test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssert_ObjectSequenceProtobuf = _test_assert( + TypeGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + typia.createAssert(), +); diff --git a/test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts b/test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..4f2fd82fae --- /dev/null +++ b/test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssertCustom_ObjectSequenceProtobuf = _test_assert( + CustomGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + typia.createAssert((p) => new CustomGuardError(p)), +); diff --git a/test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts b/test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..7efc981b15 --- /dev/null +++ b/test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssertGuard_ObjectSequenceProtobuf = _test_assertGuard( + TypeGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + typia.createAssertGuard(), +); diff --git a/test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts b/test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..5e9ecc7e09 --- /dev/null +++ b/test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssertGuardCustom_ObjectSequenceProtobuf = + _test_assertGuard(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + typia.createAssertGuard( + (p) => new CustomGuardError(p), + ), + ); diff --git a/test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts b/test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e40a2212c8 --- /dev/null +++ b/test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_is } from "../../internal/_test_is"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createIs_ObjectSequenceProtobuf = _test_is( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)( + typia.createIs(), +); diff --git a/test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts b/test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e53e5a0bf2 --- /dev/null +++ b/test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_random } from "../../internal/_test_random"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createRandom_ObjectSequenceProtobuf = _test_random( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)({ + random: typia.createRandom( + (ObjectSequenceProtobuf as any).RANDOM, + ), + assert: typia.createAssert(), +}); diff --git a/test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts b/test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..5541f6be80 --- /dev/null +++ b/test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_validate } from "../../internal/_test_validate"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createValidate_ObjectSequenceProtobuf = _test_validate( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)( + typia.createValidate(), +); diff --git a/test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..b13dfea2e6 --- /dev/null +++ b/test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertFunction } from "../../internal/_test_functional_assertFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunction_ObjectSequenceProtobuf = + _test_functional_assertFunction(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertFunction(p), + ); diff --git a/test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d75091cb2d --- /dev/null +++ b/test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertFunctionAsync } from "../../internal/_test_functional_assertFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunctionAsync_ObjectSequenceProtobuf = + _test_functional_assertFunctionAsync(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertFunction(p), + ); diff --git a/test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..6d3de70849 --- /dev/null +++ b/test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertFunctionAsync } from "../../internal/_test_functional_assertFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf = + _test_functional_assertFunctionAsync(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertFunction(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..c2f2e0e4ec --- /dev/null +++ b/test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertFunction } from "../../internal/_test_functional_assertFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunctionCustom_ObjectSequenceProtobuf = + _test_functional_assertFunction(CustomGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertFunction(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..b16c51be7d --- /dev/null +++ b/test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertParameters } from "../../internal/_test_functional_assertParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParameters_ObjectSequenceProtobuf = + _test_functional_assertParameters(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertParameters(p), + ); diff --git a/test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..a11e7824a4 --- /dev/null +++ b/test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertParametersAsync } from "../../internal/_test_functional_assertParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParametersAsync_ObjectSequenceProtobuf = + _test_functional_assertParametersAsync(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertParameters(p), + ); diff --git a/test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f81f70ba49 --- /dev/null +++ b/test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertParametersAsync } from "../../internal/_test_functional_assertParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf = + _test_functional_assertParametersAsync(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertParameters(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e3e8e2981e --- /dev/null +++ b/test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertParameters } from "../../internal/_test_functional_assertParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParametersCustom_ObjectSequenceProtobuf = + _test_functional_assertParameters(CustomGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertParameters(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..8579e99a13 --- /dev/null +++ b/test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertReturn } from "../../internal/_test_functional_assertReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturn_ObjectSequenceProtobuf = + _test_functional_assertReturn(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertReturn(p), + ); diff --git a/test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..275a90bc0c --- /dev/null +++ b/test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertReturnAsync } from "../../internal/_test_functional_assertReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturnAsync_ObjectSequenceProtobuf = + _test_functional_assertReturnAsync(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertReturn(p), + ); diff --git a/test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3dae039ba3 --- /dev/null +++ b/test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertReturnAsync } from "../../internal/_test_functional_assertReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf = + _test_functional_assertReturnAsync(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertReturn(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..8e09769500 --- /dev/null +++ b/test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertReturn } from "../../internal/_test_functional_assertReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturnCustom_ObjectSequenceProtobuf = + _test_functional_assertReturn(CustomGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertReturn(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts b/test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3e37418aef --- /dev/null +++ b/test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_functional_isFunction } from "../../internal/_test_functional_isFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isFunction_ObjectSequenceProtobuf = + _test_functional_isFunction("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.isFunction(p), + ); diff --git a/test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..076311b746 --- /dev/null +++ b/test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isFunctionAsync } from "../../internal/_test_functional_isFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isFunctionAsync_ObjectSequenceProtobuf = + _test_functional_isFunctionAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.isFunction(p), + ); diff --git a/test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts b/test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3935428e70 --- /dev/null +++ b/test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isParameters } from "../../internal/_test_functional_isParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isParameters_ObjectSequenceProtobuf = + _test_functional_isParameters("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.isParameters(p), + ); diff --git a/test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..6716624e93 --- /dev/null +++ b/test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isParametersAsync } from "../../internal/_test_functional_isParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isParametersAsync_ObjectSequenceProtobuf = + _test_functional_isParametersAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.isParameters(p), + ); diff --git a/test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts b/test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..12743f0db2 --- /dev/null +++ b/test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_functional_isReturn } from "../../internal/_test_functional_isReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isReturn_ObjectSequenceProtobuf = + _test_functional_isReturn("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.isReturn(p), + ); diff --git a/test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..9f109e594c --- /dev/null +++ b/test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isReturnAsync } from "../../internal/_test_functional_isReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isReturnAsync_ObjectSequenceProtobuf = + _test_functional_isReturnAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.isReturn(p), + ); diff --git a/test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..0ee9dbf596 --- /dev/null +++ b/test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateFunction } from "../../internal/_test_functional_validateFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateFunction_ObjectSequenceProtobuf = + _test_functional_validateFunction("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.validateFunction(p), + ); diff --git a/test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..a9b61e2908 --- /dev/null +++ b/test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateFunctionAsync } from "../../internal/_test_functional_validateFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateFunctionAsync_ObjectSequenceProtobuf = + _test_functional_validateFunctionAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.validateFunction(p), + ); diff --git a/test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..8162dc9c20 --- /dev/null +++ b/test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateParameters } from "../../internal/_test_functional_validateParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateParameters_ObjectSequenceProtobuf = + _test_functional_validateParameters("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.validateParameters(p), + ); diff --git a/test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e4eab77a15 --- /dev/null +++ b/test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateParametersAsync } from "../../internal/_test_functional_validateParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateParametersAsync_ObjectSequenceProtobuf = + _test_functional_validateParametersAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.validateParameters(p), + ); diff --git a/test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..4d5e5c1667 --- /dev/null +++ b/test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateReturn } from "../../internal/_test_functional_validateReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateReturn_ObjectSequenceProtobuf = + _test_functional_validateReturn("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.validateReturn(p), + ); diff --git a/test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..b7f16acfcb --- /dev/null +++ b/test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateReturnAsync } from "../../internal/_test_functional_validateReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateReturnAsync_ObjectSequenceProtobuf = + _test_functional_validateReturnAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.validateReturn(p), + ); diff --git a/test/src/features/http.parameter/test_http_parameter_bigint.ts b/test/src/features/http.parameter/test_http_parameter_bigint.ts new file mode 100644 index 0000000000..f3c6c4270a --- /dev/null +++ b/test/src/features/http.parameter/test_http_parameter_bigint.ts @@ -0,0 +1,22 @@ +import typia, { tags } from "typia"; + +import { TestValidator } from "../../helpers/TestValidator"; + +export const test_http_parameter_bigint = (): void => { + TestValidator.equals("boolean")([ + typia.http.parameter("0"), + typia.http.parameter("1"), + typia.http.parameter("2"), + typia.http.parameter("3"), + typia.http.parameter("null"), + ])([0n, 1n, 2n, 3n, null]); + TestValidator.error("not a bigint")(() => + typia.http.parameter("two"), + ); + TestValidator.error("decimal number")(() => + typia.http.parameter("3.141592"), + ); + TestValidator.error("type assertion")(() => + typia.http.parameter>("-1"), + ); +}; diff --git a/test/src/features/http.parameter/test_http_parameter_boolean.ts b/test/src/features/http.parameter/test_http_parameter_boolean.ts new file mode 100644 index 0000000000..f1f515db8c --- /dev/null +++ b/test/src/features/http.parameter/test_http_parameter_boolean.ts @@ -0,0 +1,16 @@ +import typia from "typia"; + +import { TestValidator } from "../../helpers/TestValidator"; + +export const test_http_parameter_boolean = (): void => { + TestValidator.equals("boolean")([ + typia.http.parameter("0"), + typia.http.parameter("false"), + typia.http.parameter("1"), + typia.http.parameter("true"), + typia.http.parameter("null"), + ])([false, false, true, true, null]); + TestValidator.error("not a boolean")(() => + typia.http.parameter("2"), + ); +}; diff --git a/test/src/features/http.parameter/test_http_parameter_number.ts b/test/src/features/http.parameter/test_http_parameter_number.ts new file mode 100644 index 0000000000..00d19d5692 --- /dev/null +++ b/test/src/features/http.parameter/test_http_parameter_number.ts @@ -0,0 +1,19 @@ +import typia, { tags } from "typia"; + +import { TestValidator } from "../../helpers/TestValidator"; + +export const test_http_parameter_number = (): void => { + TestValidator.equals("boolean")([ + typia.http.parameter("0"), + typia.http.parameter("1"), + typia.http.parameter("2"), + typia.http.parameter("3"), + typia.http.parameter("null"), + ])([0, 1, 2, 3, null]); + TestValidator.error("not a number")(() => + typia.http.parameter("two"), + ); + TestValidator.error("type assertion")(() => + typia.http.parameter>("-1"), + ); +}; diff --git a/test/src/features/http.parameter/test_http_parameter_string.ts b/test/src/features/http.parameter/test_http_parameter_string.ts new file mode 100644 index 0000000000..6629709882 --- /dev/null +++ b/test/src/features/http.parameter/test_http_parameter_string.ts @@ -0,0 +1,9 @@ +import typia, { tags } from "typia"; + +import { TestValidator } from "../../helpers/TestValidator"; + +export const test_http_parameter_string = (): void => { + TestValidator.error("type assertion")(() => + typia.http.parameter>("not an uuid value"), + ); +}; diff --git a/test/src/features/is/test_is_ObjectSequenceProtobuf.ts b/test/src/features/is/test_is_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..9b1a5b1062 --- /dev/null +++ b/test/src/features/is/test_is_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_is } from "../../internal/_test_is"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_is_ObjectSequenceProtobuf = _test_is( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)((input) => + typia.is(input), +); diff --git a/test/src/features/issues/test_issue_1062_uniqueItems.ts b/test/src/features/issues/test_issue_1062_uniqueItems.ts index 4d47d19a78..c633f682d8 100644 --- a/test/src/features/issues/test_issue_1062_uniqueItems.ts +++ b/test/src/features/issues/test_issue_1062_uniqueItems.ts @@ -1,4 +1,5 @@ import typia, { tags } from "typia"; +import { v4 } from "uuid"; import { TestValidator } from "../../helpers/TestValidator"; @@ -21,4 +22,159 @@ export const test_issue_1062_uniqueItems = () => { typia.is>(["one", "two", "three"]), typia.is>(["one", "two", "one"]), ]); + TestValidator.equals("objects")([true, true, false])([ + typia.is>([ + { email: "a@a.com", name: "a", age: 1 }, + { email: "b@b.com", name: "b", age: 2 }, + ]), + typia.is>([ + { email: "a@a.com", name: "a", age: 1 }, + { email: "b@b.com", name: "b", age: 2 }, + { email: "b@b.com", name: "b", age: 3 }, + ]), + typia.is>([ + { email: "a@a.com", name: "a", age: 1 }, + { email: "b@b.com", name: "b", age: 2 }, + { email: "b@b.com", name: "b", age: 2 }, + ]), + ]); + TestValidator.equals("arrays")([true, true, false])([ + typia.is>([ + [1, 2], + [3, 4], + ]), + typia.is>([ + [1, 2], + [3, 4], + [5, 6], + ]), + typia.is>([ + [1, 2], + [3, 4], + [1, 2], + ]), + ]); + TestValidator.equals("dates")([true, false])([ + typia.is>([ + new Date(0), + new Date(1), + new Date(2), + ]), + typia.is>([ + new Date(0), + new Date(1), + new Date(1), + ]), + ]); + TestValidator.equals("sets")([true, true, false])([ + typia.is[] & tags.UniqueItems>([ + new Set([1, 2, 3]), + new Set([4, 5, 6]), + new Set([7, 8, 9]), + ]), + typia.is[] & tags.UniqueItems>([ + new Set([1, 2, 3, 4]), + new Set([1, 2, 3, 5]), + new Set([1, 2, 3, 6]), + ]), + typia.is[] & tags.UniqueItems>([ + new Set([1, 2, 3]), + new Set([4, 5, 6]), + new Set([1, 2, 3]), + ]), + ]); + TestValidator.equals("maps")([true, true, false])([ + typia.is[] & tags.UniqueItems>([ + new Map([ + ["a", 1], + ["b", 2], + ]), + new Map([ + ["c", 3], + ["d", 4], + ]), + new Map([ + ["e", 5], + ["f", 6], + ]), + ]), + typia.is[] & tags.UniqueItems>([ + new Map([ + ["a", 1], + ["b", 2], + ]), + new Map([ + ["c", 3], + ["d", 4], + ]), + new Map([ + ["e", 5], + ["f", 6], + ]), + ]), + typia.is[] & tags.UniqueItems>([ + new Map([ + ["a", 1], + ["b", 2], + ]), + new Map([ + ["c", 3], + ["d", 4], + ]), + new Map([ + ["a", 1], + ["b", 2], + ]), + ]), + ]); + TestValidator.equals("deep")([true, true, false])([ + typia.is>([ + typia.random(), + typia.random(), + typia.random(), + ]), + typia.is>( + (() => { + const first = typia.random(); + first.children = new Array(3) + .fill(0) + .map(() => typia.random()); + return [ + first, + { + ...first, + children: [ + ...first.children.slice(0, 2), + { + ...first.children[2]!, + id: v4(), + }, + ], + }, + ]; + })(), + ), + typia.is>( + (() => { + const first = typia.random(); + const second = typia.random(); + const third = typia.misc.clone(first); + return [first, second, third]; + })(), + ), + ]); }; + +interface IMember { + email: string; + name: string; + age: number; +} + +interface IDepartment { + id: string; + members: Map; + children: IDepartment[]; + logo: Uint8Array; + created_at: Date; +} diff --git a/test/src/features/issues/test_issue_1100_json_description.ts b/test/src/features/issues/test_issue_1100_json_description.ts index f31b706f93..93944ccf98 100644 --- a/test/src/features/issues/test_issue_1100_json_description.ts +++ b/test/src/features/issues/test_issue_1100_json_description.ts @@ -1,21 +1,20 @@ import { OpenApi } from "@samchon/openapi"; -import typia, { IJsonApplication } from "typia"; +import typia, { IJsonSchemaCollection } from "typia"; import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_1100_json_description = (): void => { - const v30 = typia.json.application<[Something], "3.0">(); - const v31 = typia.json.application<[Something], "3.1">(); + const v30 = typia.json.schemas<[Something], "3.0">(); + const v31 = typia.json.schemas<[Something], "3.1">(); validate(v30); validate(v31); }; -const validate = ( - app: IJsonApplication.IV3_0 | IJsonApplication.IV3_1, -): void => { - const something: OpenApi.IJsonSchema.IObject = (app.components.schemas as any) - .Something; +const validate = (collection: IJsonSchemaCollection<"3.0" | "3.1">): void => { + const something: OpenApi.IJsonSchema.IObject = ( + collection.components.schemas as any + ).Something; const id: OpenApi.IJsonSchema.IString = something.properties ?.id as OpenApi.IJsonSchema.IString; const name: OpenApi.IJsonSchema.IString = something.properties diff --git a/test/src/features/issues/test_issue_1108_recursive_array_with_items_tag.ts b/test/src/features/issues/test_issue_1108_recursive_array_with_items_tag.ts index 51985af1d0..f3b55b33d6 100644 --- a/test/src/features/issues/test_issue_1108_recursive_array_with_items_tag.ts +++ b/test/src/features/issues/test_issue_1108_recursive_array_with_items_tag.ts @@ -5,7 +5,7 @@ export const test_issue_1108_recursive_array_with_items_tag = () => { typia.createAssert(); typia.createValidate(); typia.json.createAssertStringify(); - typia.json.application<[Tree]>(); + typia.json.schemas<[Tree]>(); typia.protobuf.createAssertEncode(); }; interface Tree { diff --git a/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts b/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts index d3476cdeb3..ae3d122736 100644 --- a/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts +++ b/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts @@ -1,14 +1,15 @@ -import typia, { IJsonApplication, tags } from "typia"; +import typia, { IJsonSchemaCollection, tags } from "typia"; import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_1112_template_literal_with_type_tag = (): void => { - validate(typia.json.application<[Something], "3.0">()); - validate(typia.json.application<[Something], "3.1">()); + validate(typia.json.schemas<[Something], "3.0">()); + validate(typia.json.schemas<[Something], "3.1">()); }; -const validate = (app: IJsonApplication<"3.0"> | IJsonApplication<"3.1">) => { - const properties = (app.components.schemas!.Something as any).properties; +const validate = (collection: IJsonSchemaCollection<"3.0" | "3.1">) => { + const properties = (collection.components.schemas!.Something as any) + .properties; TestValidator.equals("properties")({ pure: { type: "string", diff --git a/test/src/features/issues/test_issue_1149_json_schema_oneof_discriminator.ts b/test/src/features/issues/test_issue_1149_json_schema_oneof_discriminator.ts index e3c9fef270..4dbf261eb0 100644 --- a/test/src/features/issues/test_issue_1149_json_schema_oneof_discriminator.ts +++ b/test/src/features/issues/test_issue_1149_json_schema_oneof_discriminator.ts @@ -1,11 +1,11 @@ import { OpenApi } from "@samchon/openapi"; -import typia, { IJsonApplication } from "typia"; +import typia, { IJsonSchemaCollection } from "typia"; import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_1149_json_schema_oneof_discriminator = (): void => { - const discriminated: IJsonApplication = - typia.json.application< + const discriminated: IJsonSchemaCollection = + typia.json.schemas< [Point | Line | Triangle | Rectangle | Polyline | null] >(); TestValidator.equals("discriminated")({ @@ -31,8 +31,8 @@ export const test_issue_1149_json_schema_oneof_discriminator = (): void => { discriminated.schemas[0] as OpenApi.IJsonSchema.IOneOf, ); - const plain: IJsonApplication = - typia.json.application< + const plain: IJsonSchemaCollection = + typia.json.schemas< [Point | Line | Triangle | Rectangle | Polyline | Circle] >(); TestValidator.equals("plain")(plain.schemas[0])({ diff --git a/test/src/features/issues/test_issue_1181_enum_description.ts b/test/src/features/issues/test_issue_1181_enum_description.ts index 81dc265a45..6d643b8675 100644 --- a/test/src/features/issues/test_issue_1181_enum_description.ts +++ b/test/src/features/issues/test_issue_1181_enum_description.ts @@ -3,7 +3,7 @@ import typia from "typia"; import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_1181_enum_description = (): void => { - const app = typia.json.application<[ConstEnum]>(); + const app = typia.json.schemas<[ConstEnum]>(); TestValidator.equals("enum-description")(app.components.schemas?.ConstEnum)({ oneOf: [ { diff --git a/test/src/features/issues/test_issue_1188_json_schema_tuple_type.ts b/test/src/features/issues/test_issue_1188_json_schema_tuple_type.ts index d12e7f88dd..602abbeb20 100644 --- a/test/src/features/issues/test_issue_1188_json_schema_tuple_type.ts +++ b/test/src/features/issues/test_issue_1188_json_schema_tuple_type.ts @@ -4,9 +4,8 @@ import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_1188_json_schema_tuple_type = (): void => { TestValidator.equals("tuples")( - typia.json.application< - [[boolean, number], [boolean, number, ...string[]]] - >().schemas, + typia.json.schemas<[[boolean, number], [boolean, number, ...string[]]]>() + .schemas, )([ { type: "array", diff --git a/test/src/features/issues/test_issue_1390_llm_config_argument.ts b/test/src/features/issues/test_issue_1390_llm_config_argument.ts new file mode 100644 index 0000000000..3bf1811cc8 --- /dev/null +++ b/test/src/features/issues/test_issue_1390_llm_config_argument.ts @@ -0,0 +1,29 @@ +import { IChatGptSchema } from "@samchon/openapi"; + +import typia from "../../../../lib"; +import { TestValidator } from "../../helpers/TestValidator"; +import { ArrayRecursive } from "../../structures/ArrayRecursive"; + +export const test_issue_1390_llm_config_argument = (): void => { + TestValidator.equals("reference false")( + keys(($defs) => + typia.llm.schema($defs), + ), + )(["ArrayRecursive.ICategory"]); + TestValidator.equals("reference true")( + keys(($defs) => + typia.llm.schema($defs), + ), + )(["ArrayRecursive.ICategory", "ArrayRecursive.ITimestamp"]); +}; + +const keys = ( + factory: ($defs: Record) => IChatGptSchema, +): string[] => { + const $defs: Record = {}; + const schema: IChatGptSchema = factory($defs); + TestValidator.equals("schema")(schema)({ + $ref: "#/$defs/ArrayRecursive.ICategory", + }); + return Object.keys($defs); +}; diff --git a/test/src/features/issues/test_issue_940_formdata.ts b/test/src/features/issues/test_issue_940_formdata.ts index 24ca73c257..e30d1da70e 100644 --- a/test/src/features/issues/test_issue_940_formdata.ts +++ b/test/src/features/issues/test_issue_940_formdata.ts @@ -1,8 +1,8 @@ import typia from "typia"; export const test_issue_940_formdata = () => { - const x = typia.json.application<[Blob]>(); - const y = typia.json.application<[File]>(); + const x = typia.json.schemas<[Blob]>(); + const y = typia.json.schemas<[File]>(); typia.assert(x.schemas[0]); typia.assert(y.schemas[0]); diff --git a/test/src/features/issues/test_issue_jsonSchema_contentMediaType.ts b/test/src/features/issues/test_issue_jsonSchema_contentMediaType.ts index b98ff11ee8..906989a776 100644 --- a/test/src/features/issues/test_issue_jsonSchema_contentMediaType.ts +++ b/test/src/features/issues/test_issue_jsonSchema_contentMediaType.ts @@ -3,11 +3,9 @@ import typia, { tags } from "typia"; import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_jsonSchema_contentMediaType = () => { - const app: typia.IJsonApplication = - typia.json.application< - [string & tags.ContentMediaType<"application/json">] - >(); - TestValidator.equals("contentType")(app.schemas[0])({ + const collection: typia.IJsonSchemaCollection = + typia.json.schemas<[string & tags.ContentMediaType<"application/json">]>(); + TestValidator.equals("contentType")(collection.schemas[0])({ type: "string", contentMediaType: "application/json", } as any); diff --git a/test/src/features/issues/test_issue_jsonSchema_plugin.ts b/test/src/features/issues/test_issue_jsonSchema_plugin.ts index 967302555e..dcbda8a72d 100644 --- a/test/src/features/issues/test_issue_jsonSchema_plugin.ts +++ b/test/src/features/issues/test_issue_jsonSchema_plugin.ts @@ -3,7 +3,7 @@ import typia, { tags } from "typia"; import { TestValidator } from "../../helpers/TestValidator"; export const test_issue_jsonSchema_plugin = () => { - const app: typia.IJsonApplication = typia.json.application< + const collection: typia.IJsonSchemaCollection = typia.json.schemas< [ string & tags.JsonSchemaPlugin<{ @@ -11,7 +11,7 @@ export const test_issue_jsonSchema_plugin = () => { }>, ] >(); - TestValidator.equals("plugin")(app.schemas[0])({ + TestValidator.equals("plugin")(collection.schemas[0])({ type: "string", "x-typia-easy-to-learn": true, } as any); diff --git a/test/src/features/issues/test_pr_1217_bigint_json_schema.ts b/test/src/features/issues/test_pr_1217_bigint_json_schema.ts index cfc5d9b966..dc67f911cf 100644 --- a/test/src/features/issues/test_pr_1217_bigint_json_schema.ts +++ b/test/src/features/issues/test_pr_1217_bigint_json_schema.ts @@ -1,5 +1,5 @@ -import typia, { IJsonApplication, tags } from "typia"; -import { JsonApplicationProgrammer } from "typia/lib/programmers/json/JsonApplicationProgrammer"; +import typia, { IJsonSchemaCollection, tags } from "typia"; +import { JsonSchemasProgrammer } from "typia/lib/programmers/json/JsonSchemasProgrammer"; import { IMetadataApplication } from "typia/lib/schemas/metadata/IMetadataApplication"; import { MetadataApplication } from "typia/lib/schemas/metadata/MetadataApplication"; @@ -14,9 +14,10 @@ export const test_pr_1217_bigint_json_schema = (): void => { ] >(); const app: MetadataApplication = MetadataApplication.from(raw); - const json: IJsonApplication = JsonApplicationProgrammer.write("3.1")( - app.metadatas, - ) as IJsonApplication; + const json: IJsonSchemaCollection = JsonSchemasProgrammer.write({ + version: "3.1", + metadatas: app.metadatas, + }); TestValidator.equals("bigint")(json.schemas)([ { type: "integer", diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAny.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAny.ts deleted file mode 100644 index 382e742d40..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAny.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayAny } from "../../../structures/ArrayAny"; - -export const test_json_application_v3_0_ArrayAny = _test_json_application({ - version: "3.0", - name: "ArrayAny", -})(typia.json.application<[ArrayAny], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAtomicAlias.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAtomicAlias.ts deleted file mode 100644 index 50102a5403..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAtomicAlias.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayAtomicAlias } from "../../../structures/ArrayAtomicAlias"; - -export const test_json_application_v3_0_ArrayAtomicAlias = - _test_json_application({ - version: "3.0", - name: "ArrayAtomicAlias", - })(typia.json.application<[ArrayAtomicAlias], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAtomicSimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAtomicSimple.ts deleted file mode 100644 index 8011a3b60b..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayAtomicSimple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayAtomicSimple } from "../../../structures/ArrayAtomicSimple"; - -export const test_json_application_v3_0_ArrayAtomicSimple = - _test_json_application({ - version: "3.0", - name: "ArrayAtomicSimple", - })(typia.json.application<[ArrayAtomicSimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayHierarchical.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayHierarchical.ts deleted file mode 100644 index b506a8ce31..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayHierarchical.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; - -export const test_json_application_v3_0_ArrayHierarchical = - _test_json_application({ - version: "3.0", - name: "ArrayHierarchical", - })(typia.json.application<[ArrayHierarchical], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayHierarchicalPointer.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayHierarchicalPointer.ts deleted file mode 100644 index 151e67cc63..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayHierarchicalPointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; - -export const test_json_application_v3_0_ArrayHierarchicalPointer = - _test_json_application({ - version: "3.0", - name: "ArrayHierarchicalPointer", - })(typia.json.application<[ArrayHierarchicalPointer], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayMatrix.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayMatrix.ts deleted file mode 100644 index 2392e76360..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayMatrix.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayMatrix } from "../../../structures/ArrayMatrix"; - -export const test_json_application_v3_0_ArrayMatrix = _test_json_application({ - version: "3.0", - name: "ArrayMatrix", -})(typia.json.application<[ArrayMatrix], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursive.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursive.ts deleted file mode 100644 index b3846b3692..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursive.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursive } from "../../../structures/ArrayRecursive"; - -export const test_json_application_v3_0_ArrayRecursive = _test_json_application( - { - version: "3.0", - name: "ArrayRecursive", - }, -)(typia.json.application<[ArrayRecursive], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionExplicit.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionExplicit.ts deleted file mode 100644 index 656634eaa0..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionExplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; - -export const test_json_application_v3_0_ArrayRecursiveUnionExplicit = - _test_json_application({ - version: "3.0", - name: "ArrayRecursiveUnionExplicit", - })(typia.json.application<[ArrayRecursiveUnionExplicit], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionExplicitPointer.ts deleted file mode 100644 index 4121e9fc6c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionExplicitPointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; - -export const test_json_application_v3_0_ArrayRecursiveUnionExplicitPointer = - _test_json_application({ - version: "3.0", - name: "ArrayRecursiveUnionExplicitPointer", - })(typia.json.application<[ArrayRecursiveUnionExplicitPointer], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionImplicit.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionImplicit.ts deleted file mode 100644 index f8d872a3c3..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRecursiveUnionImplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; - -export const test_json_application_v3_0_ArrayRecursiveUnionImplicit = - _test_json_application({ - version: "3.0", - name: "ArrayRecursiveUnionImplicit", - })(typia.json.application<[ArrayRecursiveUnionImplicit], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedNullable.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedNullable.ts deleted file mode 100644 index a3bfe997e9..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedNullable.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; - -export const test_json_application_v3_0_ArrayRepeatedNullable = - _test_json_application({ - version: "3.0", - name: "ArrayRepeatedNullable", - })(typia.json.application<[ArrayRepeatedNullable], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedRequired.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedRequired.ts deleted file mode 100644 index 8a0febb95d..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedRequired.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; - -export const test_json_application_v3_0_ArrayRepeatedRequired = - _test_json_application({ - version: "3.0", - name: "ArrayRepeatedRequired", - })(typia.json.application<[ArrayRepeatedRequired], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedUnion.ts deleted file mode 100644 index 69fbc69749..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; - -export const test_json_application_v3_0_ArrayRepeatedUnion = - _test_json_application({ - version: "3.0", - name: "ArrayRepeatedUnion", - })(typia.json.application<[ArrayRepeatedUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedUnionWithTuple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedUnionWithTuple.ts deleted file mode 100644 index 5de8d13a3a..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayRepeatedUnionWithTuple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedUnionWithTuple } from "../../../structures/ArrayRepeatedUnionWithTuple"; - -export const test_json_application_v3_0_ArrayRepeatedUnionWithTuple = - _test_json_application({ - version: "3.0", - name: "ArrayRepeatedUnionWithTuple", - })(typia.json.application<[ArrayRepeatedUnionWithTuple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArraySimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArraySimple.ts deleted file mode 100644 index 853fbb57a0..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArraySimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArraySimple } from "../../../structures/ArraySimple"; - -export const test_json_application_v3_0_ArraySimple = _test_json_application({ - version: "3.0", - name: "ArraySimple", -})(typia.json.application<[ArraySimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayUnion.ts deleted file mode 100644 index 1ff37bb982..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ArrayUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayUnion } from "../../../structures/ArrayUnion"; - -export const test_json_application_v3_0_ArrayUnion = _test_json_application({ - version: "3.0", - name: "ArrayUnion", -})(typia.json.application<[ArrayUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicAlias.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicAlias.ts deleted file mode 100644 index a90b606652..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicAlias.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicAlias } from "../../../structures/AtomicAlias"; - -export const test_json_application_v3_0_AtomicAlias = _test_json_application({ - version: "3.0", - name: "AtomicAlias", -})(typia.json.application<[AtomicAlias], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicClass.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicClass.ts deleted file mode 100644 index c527d6e9e4..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicClass.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicClass } from "../../../structures/AtomicClass"; - -export const test_json_application_v3_0_AtomicClass = _test_json_application({ - version: "3.0", - name: "AtomicClass", -})(typia.json.application<[AtomicClass], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicIntersection.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicIntersection.ts deleted file mode 100644 index 707e184482..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicIntersection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicIntersection } from "../../../structures/AtomicIntersection"; - -export const test_json_application_v3_0_AtomicIntersection = - _test_json_application({ - version: "3.0", - name: "AtomicIntersection", - })(typia.json.application<[AtomicIntersection], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicSimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicSimple.ts deleted file mode 100644 index 9f82626e3a..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicSimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicSimple } from "../../../structures/AtomicSimple"; - -export const test_json_application_v3_0_AtomicSimple = _test_json_application({ - version: "3.0", - name: "AtomicSimple", -})(typia.json.application<[AtomicSimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicUnion.ts deleted file mode 100644 index 0f32958d5f..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_AtomicUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicUnion } from "../../../structures/AtomicUnion"; - -export const test_json_application_v3_0_AtomicUnion = _test_json_application({ - version: "3.0", - name: "AtomicUnion", -})(typia.json.application<[AtomicUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassGetter.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassGetter.ts deleted file mode 100644 index d198c01670..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassGetter.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ClassGetter } from "../../../structures/ClassGetter"; - -export const test_json_application_v3_0_ClassGetter = _test_json_application({ - version: "3.0", - name: "ClassGetter", -})(typia.json.application<[ClassGetter], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassMethod.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassMethod.ts deleted file mode 100644 index d923e2b1c4..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassMethod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ClassMethod } from "../../../structures/ClassMethod"; - -export const test_json_application_v3_0_ClassMethod = _test_json_application({ - version: "3.0", - name: "ClassMethod", -})(typia.json.application<[ClassMethod], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassPropertyAssignment.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassPropertyAssignment.ts deleted file mode 100644 index 1cd4da7252..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ClassPropertyAssignment.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; - -export const test_json_application_v3_0_ClassPropertyAssignment = - _test_json_application({ - version: "3.0", - name: "ClassPropertyAssignment", - })(typia.json.application<[ClassPropertyAssignment], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagArray.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagArray.ts deleted file mode 100644 index 6882a7103e..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagArray } from "../../../structures/CommentTagArray"; - -export const test_json_application_v3_0_CommentTagArray = - _test_json_application({ - version: "3.0", - name: "CommentTagArray", - })(typia.json.application<[CommentTagArray], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagArrayUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagArrayUnion.ts deleted file mode 100644 index 5d8c288d04..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagArrayUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; - -export const test_json_application_v3_0_CommentTagArrayUnion = - _test_json_application({ - version: "3.0", - name: "CommentTagArrayUnion", - })(typia.json.application<[CommentTagArrayUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagAtomicUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagAtomicUnion.ts deleted file mode 100644 index 476f0d0147..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; - -export const test_json_application_v3_0_CommentTagAtomicUnion = - _test_json_application({ - version: "3.0", - name: "CommentTagAtomicUnion", - })(typia.json.application<[CommentTagAtomicUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagDefault.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagDefault.ts deleted file mode 100644 index 51a1ef3882..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagDefault.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagDefault } from "../../../structures/CommentTagDefault"; - -export const test_json_application_v3_0_CommentTagDefault = - _test_json_application({ - version: "3.0", - name: "CommentTagDefault", - })(typia.json.application<[CommentTagDefault], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagFormat.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagFormat.ts deleted file mode 100644 index 06065fc27d..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagFormat.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagFormat } from "../../../structures/CommentTagFormat"; - -export const test_json_application_v3_0_CommentTagFormat = - _test_json_application({ - version: "3.0", - name: "CommentTagFormat", - })(typia.json.application<[CommentTagFormat], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagLength.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagLength.ts deleted file mode 100644 index 7e2a1ac2cc..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagLength.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagLength } from "../../../structures/CommentTagLength"; - -export const test_json_application_v3_0_CommentTagLength = - _test_json_application({ - version: "3.0", - name: "CommentTagLength", - })(typia.json.application<[CommentTagLength], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagObjectUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagObjectUnion.ts deleted file mode 100644 index f9e6fe98e5..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagObjectUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; - -export const test_json_application_v3_0_CommentTagObjectUnion = - _test_json_application({ - version: "3.0", - name: "CommentTagObjectUnion", - })(typia.json.application<[CommentTagObjectUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagPattern.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagPattern.ts deleted file mode 100644 index 40fab3065c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagPattern.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagPattern } from "../../../structures/CommentTagPattern"; - -export const test_json_application_v3_0_CommentTagPattern = - _test_json_application({ - version: "3.0", - name: "CommentTagPattern", - })(typia.json.application<[CommentTagPattern], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagRange.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagRange.ts deleted file mode 100644 index 0bc7825872..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagRange.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagRange } from "../../../structures/CommentTagRange"; - -export const test_json_application_v3_0_CommentTagRange = - _test_json_application({ - version: "3.0", - name: "CommentTagRange", - })(typia.json.application<[CommentTagRange], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagType.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagType.ts deleted file mode 100644 index 5142f20316..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_CommentTagType.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagType } from "../../../structures/CommentTagType"; - -export const test_json_application_v3_0_CommentTagType = _test_json_application( - { - version: "3.0", - name: "CommentTagType", - }, -)(typia.json.application<[CommentTagType], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicAbsorbed.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicAbsorbed.ts deleted file mode 100644 index c84ab2d4a6..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicAbsorbed.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; - -export const test_json_application_v3_0_ConstantAtomicAbsorbed = - _test_json_application({ - version: "3.0", - name: "ConstantAtomicAbsorbed", - })(typia.json.application<[ConstantAtomicAbsorbed], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicSimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicSimple.ts deleted file mode 100644 index 1fc84fd740..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicSimple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicSimple } from "../../../structures/ConstantAtomicSimple"; - -export const test_json_application_v3_0_ConstantAtomicSimple = - _test_json_application({ - version: "3.0", - name: "ConstantAtomicSimple", - })(typia.json.application<[ConstantAtomicSimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicTagged.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicTagged.ts deleted file mode 100644 index ca7c357ebf..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicTagged.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; - -export const test_json_application_v3_0_ConstantAtomicTagged = - _test_json_application({ - version: "3.0", - name: "ConstantAtomicTagged", - })(typia.json.application<[ConstantAtomicTagged], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicUnion.ts deleted file mode 100644 index 735ee7fd34..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; - -export const test_json_application_v3_0_ConstantAtomicUnion = - _test_json_application({ - version: "3.0", - name: "ConstantAtomicUnion", - })(typia.json.application<[ConstantAtomicUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicWrapper.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicWrapper.ts deleted file mode 100644 index 8a8934701c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantAtomicWrapper.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicWrapper } from "../../../structures/ConstantAtomicWrapper"; - -export const test_json_application_v3_0_ConstantAtomicWrapper = - _test_json_application({ - version: "3.0", - name: "ConstantAtomicWrapper", - })(typia.json.application<[ConstantAtomicWrapper], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantConstEnumeration.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantConstEnumeration.ts deleted file mode 100644 index 8323d860b4..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantConstEnumeration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; - -export const test_json_application_v3_0_ConstantConstEnumeration = - _test_json_application({ - version: "3.0", - name: "ConstantConstEnumeration", - })(typia.json.application<[ConstantConstEnumeration], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantEnumeration.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantEnumeration.ts deleted file mode 100644 index d44486d76c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantEnumeration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; - -export const test_json_application_v3_0_ConstantEnumeration = - _test_json_application({ - version: "3.0", - name: "ConstantEnumeration", - })(typia.json.application<[ConstantEnumeration], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantIntersection.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantIntersection.ts deleted file mode 100644 index 8842c4f37e..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ConstantIntersection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantIntersection } from "../../../structures/ConstantIntersection"; - -export const test_json_application_v3_0_ConstantIntersection = - _test_json_application({ - version: "3.0", - name: "ConstantIntersection", - })(typia.json.application<[ConstantIntersection], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicArray.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicArray.ts deleted file mode 100644 index a0b7199f5c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicArray } from "../../../structures/DynamicArray"; - -export const test_json_application_v3_0_DynamicArray = _test_json_application({ - version: "3.0", - name: "DynamicArray", -})(typia.json.application<[DynamicArray], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicComposite.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicComposite.ts deleted file mode 100644 index 0cc7b32328..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicComposite.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicComposite } from "../../../structures/DynamicComposite"; - -export const test_json_application_v3_0_DynamicComposite = - _test_json_application({ - version: "3.0", - name: "DynamicComposite", - })(typia.json.application<[DynamicComposite], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicConstant.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicConstant.ts deleted file mode 100644 index a0dc6265c3..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicConstant.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicConstant } from "../../../structures/DynamicConstant"; - -export const test_json_application_v3_0_DynamicConstant = - _test_json_application({ - version: "3.0", - name: "DynamicConstant", - })(typia.json.application<[DynamicConstant], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicEnumeration.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicEnumeration.ts deleted file mode 100644 index 1b92ac2108..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicEnumeration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; - -export const test_json_application_v3_0_DynamicEnumeration = - _test_json_application({ - version: "3.0", - name: "DynamicEnumeration", - })(typia.json.application<[DynamicEnumeration], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicNever.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicNever.ts deleted file mode 100644 index d56b2ea9bb..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicNever.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicNever } from "../../../structures/DynamicNever"; - -export const test_json_application_v3_0_DynamicNever = _test_json_application({ - version: "3.0", - name: "DynamicNever", -})(typia.json.application<[DynamicNever], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicSimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicSimple.ts deleted file mode 100644 index 19aa4d5aab..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicSimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicSimple } from "../../../structures/DynamicSimple"; - -export const test_json_application_v3_0_DynamicSimple = _test_json_application({ - version: "3.0", - name: "DynamicSimple", -})(typia.json.application<[DynamicSimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicTemplate.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicTemplate.ts deleted file mode 100644 index 568d8b39a8..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicTemplate.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicTemplate } from "../../../structures/DynamicTemplate"; - -export const test_json_application_v3_0_DynamicTemplate = - _test_json_application({ - version: "3.0", - name: "DynamicTemplate", - })(typia.json.application<[DynamicTemplate], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicTree.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicTree.ts deleted file mode 100644 index b5698b8d5d..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicTree.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicTree } from "../../../structures/DynamicTree"; - -export const test_json_application_v3_0_DynamicTree = _test_json_application({ - version: "3.0", - name: "DynamicTree", -})(typia.json.application<[DynamicTree], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicUndefined.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicUndefined.ts deleted file mode 100644 index 26111cf0af..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicUndefined.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicUndefined } from "../../../structures/DynamicUndefined"; - -export const test_json_application_v3_0_DynamicUndefined = - _test_json_application({ - version: "3.0", - name: "DynamicUndefined", - })(typia.json.application<[DynamicUndefined], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicUnion.ts deleted file mode 100644 index 85518cbd2e..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_DynamicUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicUnion } from "../../../structures/DynamicUnion"; - -export const test_json_application_v3_0_DynamicUnion = _test_json_application({ - version: "3.0", - name: "DynamicUnion", -})(typia.json.application<[DynamicUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectAlias.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectAlias.ts deleted file mode 100644 index a21ac04c78..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectAlias.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectAlias } from "../../../structures/ObjectAlias"; - -export const test_json_application_v3_0_ObjectAlias = _test_json_application({ - version: "3.0", - name: "ObjectAlias", -})(typia.json.application<[ObjectAlias], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDate.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDate.ts deleted file mode 100644 index 038c2ace85..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDate.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectDate } from "../../../structures/ObjectDate"; - -export const test_json_application_v3_0_ObjectDate = _test_json_application({ - version: "3.0", - name: "ObjectDate", -})(typia.json.application<[ObjectDate], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDescription.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDescription.ts deleted file mode 100644 index 12de78a94a..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDescription.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectDescription } from "../../../structures/ObjectDescription"; - -export const test_json_application_v3_0_ObjectDescription = - _test_json_application({ - version: "3.0", - name: "ObjectDescription", - })(typia.json.application<[ObjectDescription], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDynamic.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDynamic.ts deleted file mode 100644 index c8392e14de..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectDynamic.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectDynamic } from "../../../structures/ObjectDynamic"; - -export const test_json_application_v3_0_ObjectDynamic = _test_json_application({ - version: "3.0", - name: "ObjectDynamic", -})(typia.json.application<[ObjectDynamic], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGeneric.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGeneric.ts deleted file mode 100644 index bec48f566c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGeneric.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGeneric } from "../../../structures/ObjectGeneric"; - -export const test_json_application_v3_0_ObjectGeneric = _test_json_application({ - version: "3.0", - name: "ObjectGeneric", -})(typia.json.application<[ObjectGeneric], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericAlias.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericAlias.ts deleted file mode 100644 index 2ace4020a1..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericAlias.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; - -export const test_json_application_v3_0_ObjectGenericAlias = - _test_json_application({ - version: "3.0", - name: "ObjectGenericAlias", - })(typia.json.application<[ObjectGenericAlias], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericArray.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericArray.ts deleted file mode 100644 index f0be11e80c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; - -export const test_json_application_v3_0_ObjectGenericArray = - _test_json_application({ - version: "3.0", - name: "ObjectGenericArray", - })(typia.json.application<[ObjectGenericArray], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericUnion.ts deleted file mode 100644 index 950ce5d4c6..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectGenericUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; - -export const test_json_application_v3_0_ObjectGenericUnion = - _test_json_application({ - version: "3.0", - name: "ObjectGenericUnion", - })(typia.json.application<[ObjectGenericUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectHierarchical.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectHierarchical.ts deleted file mode 100644 index a576367489..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectHierarchical.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectHierarchical } from "../../../structures/ObjectHierarchical"; - -export const test_json_application_v3_0_ObjectHierarchical = - _test_json_application({ - version: "3.0", - name: "ObjectHierarchical", - })(typia.json.application<[ObjectHierarchical], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectInternal.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectInternal.ts deleted file mode 100644 index edbbae2968..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectInternal.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectInternal } from "../../../structures/ObjectInternal"; - -export const test_json_application_v3_0_ObjectInternal = _test_json_application( - { - version: "3.0", - name: "ObjectInternal", - }, -)(typia.json.application<[ObjectInternal], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectIntersection.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectIntersection.ts deleted file mode 100644 index 94b4f32444..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectIntersection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectIntersection } from "../../../structures/ObjectIntersection"; - -export const test_json_application_v3_0_ObjectIntersection = - _test_json_application({ - version: "3.0", - name: "ObjectIntersection", - })(typia.json.application<[ObjectIntersection], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectJsonTag.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectJsonTag.ts deleted file mode 100644 index 480738fec7..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectJsonTag.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; - -export const test_json_application_v3_0_ObjectJsonTag = _test_json_application({ - version: "3.0", - name: "ObjectJsonTag", -})(typia.json.application<[ObjectJsonTag], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectLiteralProperty.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectLiteralProperty.ts deleted file mode 100644 index 41b62ee76e..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectLiteralProperty.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; - -export const test_json_application_v3_0_ObjectLiteralProperty = - _test_json_application({ - version: "3.0", - name: "ObjectLiteralProperty", - })(typia.json.application<[ObjectLiteralProperty], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectLiteralType.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectLiteralType.ts deleted file mode 100644 index 640c505c94..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectLiteralType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; - -export const test_json_application_v3_0_ObjectLiteralType = - _test_json_application({ - version: "3.0", - name: "ObjectLiteralType", - })(typia.json.application<[ObjectLiteralType], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectNullable.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectNullable.ts deleted file mode 100644 index 36e5fc5ac8..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectNullable.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectNullable } from "../../../structures/ObjectNullable"; - -export const test_json_application_v3_0_ObjectNullable = _test_json_application( - { - version: "3.0", - name: "ObjectNullable", - }, -)(typia.json.application<[ObjectNullable], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectOptional.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectOptional.ts deleted file mode 100644 index e5d2f73c20..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectOptional.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectOptional } from "../../../structures/ObjectOptional"; - -export const test_json_application_v3_0_ObjectOptional = _test_json_application( - { - version: "3.0", - name: "ObjectOptional", - }, -)(typia.json.application<[ObjectOptional], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPartial.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPartial.ts deleted file mode 100644 index 2f1ff9d016..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPartial.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPartial } from "../../../structures/ObjectPartial"; - -export const test_json_application_v3_0_ObjectPartial = _test_json_application({ - version: "3.0", - name: "ObjectPartial", -})(typia.json.application<[ObjectPartial], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPartialAndRequired.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPartialAndRequired.ts deleted file mode 100644 index 6c95491c24..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPartialAndRequired.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; - -export const test_json_application_v3_0_ObjectPartialAndRequired = - _test_json_application({ - version: "3.0", - name: "ObjectPartialAndRequired", - })(typia.json.application<[ObjectPartialAndRequired], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPrimitive.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPrimitive.ts deleted file mode 100644 index f5e9711880..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPrimitive.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; - -export const test_json_application_v3_0_ObjectPrimitive = - _test_json_application({ - version: "3.0", - name: "ObjectPrimitive", - })(typia.json.application<[ObjectPrimitive], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPropertyNullable.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPropertyNullable.ts deleted file mode 100644 index 11de356801..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectPropertyNullable.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPropertyNullable } from "../../../structures/ObjectPropertyNullable"; - -export const test_json_application_v3_0_ObjectPropertyNullable = - _test_json_application({ - version: "3.0", - name: "ObjectPropertyNullable", - })(typia.json.application<[ObjectPropertyNullable], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectRecursive.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectRecursive.ts deleted file mode 100644 index fc3e3b04f1..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectRecursive.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectRecursive } from "../../../structures/ObjectRecursive"; - -export const test_json_application_v3_0_ObjectRecursive = - _test_json_application({ - version: "3.0", - name: "ObjectRecursive", - })(typia.json.application<[ObjectRecursive], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectRequired.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectRequired.ts deleted file mode 100644 index 533ac81b87..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectRequired.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectRequired } from "../../../structures/ObjectRequired"; - -export const test_json_application_v3_0_ObjectRequired = _test_json_application( - { - version: "3.0", - name: "ObjectRequired", - }, -)(typia.json.application<[ObjectRequired], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectSimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectSimple.ts deleted file mode 100644 index 61fae82d07..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectSimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectSimple } from "../../../structures/ObjectSimple"; - -export const test_json_application_v3_0_ObjectSimple = _test_json_application({ - version: "3.0", - name: "ObjectSimple", -})(typia.json.application<[ObjectSimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectTuple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectTuple.ts deleted file mode 100644 index e72b2ca9bb..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectTuple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectTuple } from "../../../structures/ObjectTuple"; - -export const test_json_application_v3_0_ObjectTuple = _test_json_application({ - version: "3.0", - name: "ObjectTuple", -})(typia.json.application<[ObjectTuple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUndefined.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUndefined.ts deleted file mode 100644 index baf62f3d9b..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUndefined.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUndefined } from "../../../structures/ObjectUndefined"; - -export const test_json_application_v3_0_ObjectUndefined = - _test_json_application({ - version: "3.0", - name: "ObjectUndefined", - })(typia.json.application<[ObjectUndefined], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionComposite.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionComposite.ts deleted file mode 100644 index b6ccc5a445..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionComposite.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; - -export const test_json_application_v3_0_ObjectUnionComposite = - _test_json_application({ - version: "3.0", - name: "ObjectUnionComposite", - })(typia.json.application<[ObjectUnionComposite], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionCompositePointer.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionCompositePointer.ts deleted file mode 100644 index 2cda6a1cf7..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionCompositePointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; - -export const test_json_application_v3_0_ObjectUnionCompositePointer = - _test_json_application({ - version: "3.0", - name: "ObjectUnionCompositePointer", - })(typia.json.application<[ObjectUnionCompositePointer], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionDouble.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionDouble.ts deleted file mode 100644 index a23db965e3..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionDouble.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; - -export const test_json_application_v3_0_ObjectUnionDouble = - _test_json_application({ - version: "3.0", - name: "ObjectUnionDouble", - })(typia.json.application<[ObjectUnionDouble], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionExplicit.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionExplicit.ts deleted file mode 100644 index 61ce113585..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionExplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; - -export const test_json_application_v3_0_ObjectUnionExplicit = - _test_json_application({ - version: "3.0", - name: "ObjectUnionExplicit", - })(typia.json.application<[ObjectUnionExplicit], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionExplicitPointer.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionExplicitPointer.ts deleted file mode 100644 index da04c4c822..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionExplicitPointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; - -export const test_json_application_v3_0_ObjectUnionExplicitPointer = - _test_json_application({ - version: "3.0", - name: "ObjectUnionExplicitPointer", - })(typia.json.application<[ObjectUnionExplicitPointer], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionImplicit.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionImplicit.ts deleted file mode 100644 index 2094f68a26..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionImplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; - -export const test_json_application_v3_0_ObjectUnionImplicit = - _test_json_application({ - version: "3.0", - name: "ObjectUnionImplicit", - })(typia.json.application<[ObjectUnionImplicit], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionNonPredictable.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionNonPredictable.ts deleted file mode 100644 index 25a1449081..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ObjectUnionNonPredictable.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; - -export const test_json_application_v3_0_ObjectUnionNonPredictable = - _test_json_application({ - version: "3.0", - name: "ObjectUnionNonPredictable", - })(typia.json.application<[ObjectUnionNonPredictable], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateAtomic.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateAtomic.ts deleted file mode 100644 index 6ffd0c9f47..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateAtomic.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TemplateAtomic } from "../../../structures/TemplateAtomic"; - -export const test_json_application_v3_0_TemplateAtomic = _test_json_application( - { - version: "3.0", - name: "TemplateAtomic", - }, -)(typia.json.application<[TemplateAtomic], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateConstant.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateConstant.ts deleted file mode 100644 index af688e71ca..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateConstant.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TemplateConstant } from "../../../structures/TemplateConstant"; - -export const test_json_application_v3_0_TemplateConstant = - _test_json_application({ - version: "3.0", - name: "TemplateConstant", - })(typia.json.application<[TemplateConstant], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateUnion.ts deleted file mode 100644 index 9d32d430e9..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TemplateUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TemplateUnion } from "../../../structures/TemplateUnion"; - -export const test_json_application_v3_0_TemplateUnion = _test_json_application({ - version: "3.0", - name: "TemplateUnion", -})(typia.json.application<[TemplateUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonArray.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonArray.ts deleted file mode 100644 index a568393318..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonArray } from "../../../structures/ToJsonArray"; - -export const test_json_application_v3_0_ToJsonArray = _test_json_application({ - version: "3.0", - name: "ToJsonArray", -})(typia.json.application<[ToJsonArray], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonAtomicSimple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonAtomicSimple.ts deleted file mode 100644 index fe7de35ac7..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonAtomicSimple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonAtomicSimple } from "../../../structures/ToJsonAtomicSimple"; - -export const test_json_application_v3_0_ToJsonAtomicSimple = - _test_json_application({ - version: "3.0", - name: "ToJsonAtomicSimple", - })(typia.json.application<[ToJsonAtomicSimple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonAtomicUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonAtomicUnion.ts deleted file mode 100644 index 62684625e6..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; - -export const test_json_application_v3_0_ToJsonAtomicUnion = - _test_json_application({ - version: "3.0", - name: "ToJsonAtomicUnion", - })(typia.json.application<[ToJsonAtomicUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonDouble.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonDouble.ts deleted file mode 100644 index 2c1b07213e..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonDouble.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonDouble } from "../../../structures/ToJsonDouble"; - -export const test_json_application_v3_0_ToJsonDouble = _test_json_application({ - version: "3.0", - name: "ToJsonDouble", -})(typia.json.application<[ToJsonDouble], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonNull.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonNull.ts deleted file mode 100644 index 374b53c970..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonNull.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonNull } from "../../../structures/ToJsonNull"; - -export const test_json_application_v3_0_ToJsonNull = _test_json_application({ - version: "3.0", - name: "ToJsonNull", -})(typia.json.application<[ToJsonNull], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonTuple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonTuple.ts deleted file mode 100644 index 1549be4f03..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonTuple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonTuple } from "../../../structures/ToJsonTuple"; - -export const test_json_application_v3_0_ToJsonTuple = _test_json_application({ - version: "3.0", - name: "ToJsonTuple", -})(typia.json.application<[ToJsonTuple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonUnion.ts deleted file mode 100644 index d4a94d5800..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_ToJsonUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonUnion } from "../../../structures/ToJsonUnion"; - -export const test_json_application_v3_0_ToJsonUnion = _test_json_application({ - version: "3.0", - name: "ToJsonUnion", -})(typia.json.application<[ToJsonUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleHierarchical.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleHierarchical.ts deleted file mode 100644 index 11e447915d..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleHierarchical.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleHierarchical } from "../../../structures/TupleHierarchical"; - -export const test_json_application_v3_0_TupleHierarchical = - _test_json_application({ - version: "3.0", - name: "TupleHierarchical", - })(typia.json.application<[TupleHierarchical], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestArray.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestArray.ts deleted file mode 100644 index fe15163c19..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestArray.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleRestArray } from "../../../structures/TupleRestArray"; - -export const test_json_application_v3_0_TupleRestArray = _test_json_application( - { - version: "3.0", - name: "TupleRestArray", - }, -)(typia.json.application<[TupleRestArray], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestAtomic.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestAtomic.ts deleted file mode 100644 index 204a1a76c3..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestAtomic.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleRestAtomic } from "../../../structures/TupleRestAtomic"; - -export const test_json_application_v3_0_TupleRestAtomic = - _test_json_application({ - version: "3.0", - name: "TupleRestAtomic", - })(typia.json.application<[TupleRestAtomic], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestObject.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestObject.ts deleted file mode 100644 index e0ffc9c883..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TupleRestObject.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleRestObject } from "../../../structures/TupleRestObject"; - -export const test_json_application_v3_0_TupleRestObject = - _test_json_application({ - version: "3.0", - name: "TupleRestObject", - })(typia.json.application<[TupleRestObject], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagArray.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagArray.ts deleted file mode 100644 index 2722c8a641..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagArray } from "../../../structures/TypeTagArray"; - -export const test_json_application_v3_0_TypeTagArray = _test_json_application({ - version: "3.0", - name: "TypeTagArray", -})(typia.json.application<[TypeTagArray], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagArrayUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagArrayUnion.ts deleted file mode 100644 index 25e39d69a7..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagArrayUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; - -export const test_json_application_v3_0_TypeTagArrayUnion = - _test_json_application({ - version: "3.0", - name: "TypeTagArrayUnion", - })(typia.json.application<[TypeTagArrayUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagAtomicUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagAtomicUnion.ts deleted file mode 100644 index 8e026bf28c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; - -export const test_json_application_v3_0_TypeTagAtomicUnion = - _test_json_application({ - version: "3.0", - name: "TypeTagAtomicUnion", - })(typia.json.application<[TypeTagAtomicUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagCustom.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagCustom.ts deleted file mode 100644 index 82557df6bc..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagCustom.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagCustom } from "../../../structures/TypeTagCustom"; - -export const test_json_application_v3_0_TypeTagCustom = _test_json_application({ - version: "3.0", - name: "TypeTagCustom", -})(typia.json.application<[TypeTagCustom], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagDefault.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagDefault.ts deleted file mode 100644 index b36f4a5efe..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagDefault.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagDefault } from "../../../structures/TypeTagDefault"; - -export const test_json_application_v3_0_TypeTagDefault = _test_json_application( - { - version: "3.0", - name: "TypeTagDefault", - }, -)(typia.json.application<[TypeTagDefault], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagFormat.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagFormat.ts deleted file mode 100644 index 437a1f2992..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagFormat.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagFormat } from "../../../structures/TypeTagFormat"; - -export const test_json_application_v3_0_TypeTagFormat = _test_json_application({ - version: "3.0", - name: "TypeTagFormat", -})(typia.json.application<[TypeTagFormat], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagLength.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagLength.ts deleted file mode 100644 index 436bac5b79..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagLength.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagLength } from "../../../structures/TypeTagLength"; - -export const test_json_application_v3_0_TypeTagLength = _test_json_application({ - version: "3.0", - name: "TypeTagLength", -})(typia.json.application<[TypeTagLength], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagMatrix.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagMatrix.ts deleted file mode 100644 index f330ecc033..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagMatrix.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; - -export const test_json_application_v3_0_TypeTagMatrix = _test_json_application({ - version: "3.0", - name: "TypeTagMatrix", -})(typia.json.application<[TypeTagMatrix], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagObjectUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagObjectUnion.ts deleted file mode 100644 index d3b33f8bac..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagObjectUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; - -export const test_json_application_v3_0_TypeTagObjectUnion = - _test_json_application({ - version: "3.0", - name: "TypeTagObjectUnion", - })(typia.json.application<[TypeTagObjectUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagPattern.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagPattern.ts deleted file mode 100644 index ce1f607521..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagPattern.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagPattern } from "../../../structures/TypeTagPattern"; - -export const test_json_application_v3_0_TypeTagPattern = _test_json_application( - { - version: "3.0", - name: "TypeTagPattern", - }, -)(typia.json.application<[TypeTagPattern], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagRange.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagRange.ts deleted file mode 100644 index fc0cef6df9..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagRange.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagRange } from "../../../structures/TypeTagRange"; - -export const test_json_application_v3_0_TypeTagRange = _test_json_application({ - version: "3.0", - name: "TypeTagRange", -})(typia.json.application<[TypeTagRange], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagTuple.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagTuple.ts deleted file mode 100644 index 936487474b..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagTuple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagTuple } from "../../../structures/TypeTagTuple"; - -export const test_json_application_v3_0_TypeTagTuple = _test_json_application({ - version: "3.0", - name: "TypeTagTuple", -})(typia.json.application<[TypeTagTuple], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagType.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagType.ts deleted file mode 100644 index f230a8404c..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_TypeTagType.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagType } from "../../../structures/TypeTagType"; - -export const test_json_application_v3_0_TypeTagType = _test_json_application({ - version: "3.0", - name: "TypeTagType", -})(typia.json.application<[TypeTagType], "3.0">()); diff --git a/test/src/features/json.application/v3_0/test_json_application_v3_0_UltimateUnion.ts b/test/src/features/json.application/v3_0/test_json_application_v3_0_UltimateUnion.ts deleted file mode 100644 index 9a95067a15..0000000000 --- a/test/src/features/json.application/v3_0/test_json_application_v3_0_UltimateUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { UltimateUnion } from "../../../structures/UltimateUnion"; - -export const test_json_application_v3_0_UltimateUnion = _test_json_application({ - version: "3.0", - name: "UltimateUnion", -})(typia.json.application<[UltimateUnion], "3.0">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAny.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAny.ts deleted file mode 100644 index 9949e01352..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAny.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayAny } from "../../../structures/ArrayAny"; - -export const test_json_application_v3_1_ArrayAny = _test_json_application({ - version: "3.1", - name: "ArrayAny", -})(typia.json.application<[ArrayAny], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAtomicAlias.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAtomicAlias.ts deleted file mode 100644 index 58baf343ee..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAtomicAlias.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayAtomicAlias } from "../../../structures/ArrayAtomicAlias"; - -export const test_json_application_v3_1_ArrayAtomicAlias = - _test_json_application({ - version: "3.1", - name: "ArrayAtomicAlias", - })(typia.json.application<[ArrayAtomicAlias], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAtomicSimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAtomicSimple.ts deleted file mode 100644 index c0de7665a3..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayAtomicSimple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayAtomicSimple } from "../../../structures/ArrayAtomicSimple"; - -export const test_json_application_v3_1_ArrayAtomicSimple = - _test_json_application({ - version: "3.1", - name: "ArrayAtomicSimple", - })(typia.json.application<[ArrayAtomicSimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayHierarchical.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayHierarchical.ts deleted file mode 100644 index f0935fbd56..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayHierarchical.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; - -export const test_json_application_v3_1_ArrayHierarchical = - _test_json_application({ - version: "3.1", - name: "ArrayHierarchical", - })(typia.json.application<[ArrayHierarchical], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayHierarchicalPointer.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayHierarchicalPointer.ts deleted file mode 100644 index c65817b6bb..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayHierarchicalPointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; - -export const test_json_application_v3_1_ArrayHierarchicalPointer = - _test_json_application({ - version: "3.1", - name: "ArrayHierarchicalPointer", - })(typia.json.application<[ArrayHierarchicalPointer], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayMatrix.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayMatrix.ts deleted file mode 100644 index ca68c3d913..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayMatrix.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayMatrix } from "../../../structures/ArrayMatrix"; - -export const test_json_application_v3_1_ArrayMatrix = _test_json_application({ - version: "3.1", - name: "ArrayMatrix", -})(typia.json.application<[ArrayMatrix], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursive.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursive.ts deleted file mode 100644 index dbc28de387..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursive.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursive } from "../../../structures/ArrayRecursive"; - -export const test_json_application_v3_1_ArrayRecursive = _test_json_application( - { - version: "3.1", - name: "ArrayRecursive", - }, -)(typia.json.application<[ArrayRecursive], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionExplicit.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionExplicit.ts deleted file mode 100644 index 33d1fd4f48..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionExplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; - -export const test_json_application_v3_1_ArrayRecursiveUnionExplicit = - _test_json_application({ - version: "3.1", - name: "ArrayRecursiveUnionExplicit", - })(typia.json.application<[ArrayRecursiveUnionExplicit], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionExplicitPointer.ts deleted file mode 100644 index 42b16f436b..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionExplicitPointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; - -export const test_json_application_v3_1_ArrayRecursiveUnionExplicitPointer = - _test_json_application({ - version: "3.1", - name: "ArrayRecursiveUnionExplicitPointer", - })(typia.json.application<[ArrayRecursiveUnionExplicitPointer], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionImplicit.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionImplicit.ts deleted file mode 100644 index 96b4432a5e..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRecursiveUnionImplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; - -export const test_json_application_v3_1_ArrayRecursiveUnionImplicit = - _test_json_application({ - version: "3.1", - name: "ArrayRecursiveUnionImplicit", - })(typia.json.application<[ArrayRecursiveUnionImplicit], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedNullable.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedNullable.ts deleted file mode 100644 index 2d99003c4f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedNullable.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; - -export const test_json_application_v3_1_ArrayRepeatedNullable = - _test_json_application({ - version: "3.1", - name: "ArrayRepeatedNullable", - })(typia.json.application<[ArrayRepeatedNullable], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedRequired.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedRequired.ts deleted file mode 100644 index d0bed6ab4f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedRequired.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; - -export const test_json_application_v3_1_ArrayRepeatedRequired = - _test_json_application({ - version: "3.1", - name: "ArrayRepeatedRequired", - })(typia.json.application<[ArrayRepeatedRequired], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedUnion.ts deleted file mode 100644 index df5177de7c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; - -export const test_json_application_v3_1_ArrayRepeatedUnion = - _test_json_application({ - version: "3.1", - name: "ArrayRepeatedUnion", - })(typia.json.application<[ArrayRepeatedUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedUnionWithTuple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedUnionWithTuple.ts deleted file mode 100644 index 9cc43b87ad..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayRepeatedUnionWithTuple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayRepeatedUnionWithTuple } from "../../../structures/ArrayRepeatedUnionWithTuple"; - -export const test_json_application_v3_1_ArrayRepeatedUnionWithTuple = - _test_json_application({ - version: "3.1", - name: "ArrayRepeatedUnionWithTuple", - })(typia.json.application<[ArrayRepeatedUnionWithTuple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArraySimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArraySimple.ts deleted file mode 100644 index 965a181121..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArraySimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArraySimple } from "../../../structures/ArraySimple"; - -export const test_json_application_v3_1_ArraySimple = _test_json_application({ - version: "3.1", - name: "ArraySimple", -})(typia.json.application<[ArraySimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayUnion.ts deleted file mode 100644 index ac16ed211d..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ArrayUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ArrayUnion } from "../../../structures/ArrayUnion"; - -export const test_json_application_v3_1_ArrayUnion = _test_json_application({ - version: "3.1", - name: "ArrayUnion", -})(typia.json.application<[ArrayUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicAlias.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicAlias.ts deleted file mode 100644 index 7af990fb13..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicAlias.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicAlias } from "../../../structures/AtomicAlias"; - -export const test_json_application_v3_1_AtomicAlias = _test_json_application({ - version: "3.1", - name: "AtomicAlias", -})(typia.json.application<[AtomicAlias], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicClass.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicClass.ts deleted file mode 100644 index 5d1f390f22..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicClass.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicClass } from "../../../structures/AtomicClass"; - -export const test_json_application_v3_1_AtomicClass = _test_json_application({ - version: "3.1", - name: "AtomicClass", -})(typia.json.application<[AtomicClass], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicIntersection.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicIntersection.ts deleted file mode 100644 index b15655c1b2..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicIntersection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicIntersection } from "../../../structures/AtomicIntersection"; - -export const test_json_application_v3_1_AtomicIntersection = - _test_json_application({ - version: "3.1", - name: "AtomicIntersection", - })(typia.json.application<[AtomicIntersection], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicSimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicSimple.ts deleted file mode 100644 index abda39cdb6..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicSimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicSimple } from "../../../structures/AtomicSimple"; - -export const test_json_application_v3_1_AtomicSimple = _test_json_application({ - version: "3.1", - name: "AtomicSimple", -})(typia.json.application<[AtomicSimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicUnion.ts deleted file mode 100644 index 18b5010446..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_AtomicUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { AtomicUnion } from "../../../structures/AtomicUnion"; - -export const test_json_application_v3_1_AtomicUnion = _test_json_application({ - version: "3.1", - name: "AtomicUnion", -})(typia.json.application<[AtomicUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassGetter.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassGetter.ts deleted file mode 100644 index 76cdd7a314..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassGetter.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ClassGetter } from "../../../structures/ClassGetter"; - -export const test_json_application_v3_1_ClassGetter = _test_json_application({ - version: "3.1", - name: "ClassGetter", -})(typia.json.application<[ClassGetter], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassMethod.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassMethod.ts deleted file mode 100644 index 4f2e7d2a2b..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassMethod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ClassMethod } from "../../../structures/ClassMethod"; - -export const test_json_application_v3_1_ClassMethod = _test_json_application({ - version: "3.1", - name: "ClassMethod", -})(typia.json.application<[ClassMethod], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassPropertyAssignment.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassPropertyAssignment.ts deleted file mode 100644 index d222d99c7f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ClassPropertyAssignment.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; - -export const test_json_application_v3_1_ClassPropertyAssignment = - _test_json_application({ - version: "3.1", - name: "ClassPropertyAssignment", - })(typia.json.application<[ClassPropertyAssignment], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagArray.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagArray.ts deleted file mode 100644 index 2fa132755d..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagArray } from "../../../structures/CommentTagArray"; - -export const test_json_application_v3_1_CommentTagArray = - _test_json_application({ - version: "3.1", - name: "CommentTagArray", - })(typia.json.application<[CommentTagArray], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagArrayUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagArrayUnion.ts deleted file mode 100644 index a7c03e99d8..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagArrayUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; - -export const test_json_application_v3_1_CommentTagArrayUnion = - _test_json_application({ - version: "3.1", - name: "CommentTagArrayUnion", - })(typia.json.application<[CommentTagArrayUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagAtomicUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagAtomicUnion.ts deleted file mode 100644 index 2d3d78906f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; - -export const test_json_application_v3_1_CommentTagAtomicUnion = - _test_json_application({ - version: "3.1", - name: "CommentTagAtomicUnion", - })(typia.json.application<[CommentTagAtomicUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagDefault.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagDefault.ts deleted file mode 100644 index ddc596e04c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagDefault.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagDefault } from "../../../structures/CommentTagDefault"; - -export const test_json_application_v3_1_CommentTagDefault = - _test_json_application({ - version: "3.1", - name: "CommentTagDefault", - })(typia.json.application<[CommentTagDefault], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagFormat.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagFormat.ts deleted file mode 100644 index d3624355f5..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagFormat.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagFormat } from "../../../structures/CommentTagFormat"; - -export const test_json_application_v3_1_CommentTagFormat = - _test_json_application({ - version: "3.1", - name: "CommentTagFormat", - })(typia.json.application<[CommentTagFormat], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagLength.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagLength.ts deleted file mode 100644 index 98302ca86f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagLength.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagLength } from "../../../structures/CommentTagLength"; - -export const test_json_application_v3_1_CommentTagLength = - _test_json_application({ - version: "3.1", - name: "CommentTagLength", - })(typia.json.application<[CommentTagLength], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagObjectUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagObjectUnion.ts deleted file mode 100644 index 590edff22f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagObjectUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; - -export const test_json_application_v3_1_CommentTagObjectUnion = - _test_json_application({ - version: "3.1", - name: "CommentTagObjectUnion", - })(typia.json.application<[CommentTagObjectUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagPattern.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagPattern.ts deleted file mode 100644 index 12b3bce3f0..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagPattern.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagPattern } from "../../../structures/CommentTagPattern"; - -export const test_json_application_v3_1_CommentTagPattern = - _test_json_application({ - version: "3.1", - name: "CommentTagPattern", - })(typia.json.application<[CommentTagPattern], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagRange.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagRange.ts deleted file mode 100644 index 78957122a5..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagRange.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagRange } from "../../../structures/CommentTagRange"; - -export const test_json_application_v3_1_CommentTagRange = - _test_json_application({ - version: "3.1", - name: "CommentTagRange", - })(typia.json.application<[CommentTagRange], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagType.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagType.ts deleted file mode 100644 index 3ad63ddae1..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_CommentTagType.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { CommentTagType } from "../../../structures/CommentTagType"; - -export const test_json_application_v3_1_CommentTagType = _test_json_application( - { - version: "3.1", - name: "CommentTagType", - }, -)(typia.json.application<[CommentTagType], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicAbsorbed.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicAbsorbed.ts deleted file mode 100644 index a2c4a91aca..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicAbsorbed.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; - -export const test_json_application_v3_1_ConstantAtomicAbsorbed = - _test_json_application({ - version: "3.1", - name: "ConstantAtomicAbsorbed", - })(typia.json.application<[ConstantAtomicAbsorbed], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicSimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicSimple.ts deleted file mode 100644 index 3572459c91..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicSimple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicSimple } from "../../../structures/ConstantAtomicSimple"; - -export const test_json_application_v3_1_ConstantAtomicSimple = - _test_json_application({ - version: "3.1", - name: "ConstantAtomicSimple", - })(typia.json.application<[ConstantAtomicSimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicTagged.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicTagged.ts deleted file mode 100644 index 90992412ac..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicTagged.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; - -export const test_json_application_v3_1_ConstantAtomicTagged = - _test_json_application({ - version: "3.1", - name: "ConstantAtomicTagged", - })(typia.json.application<[ConstantAtomicTagged], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicUnion.ts deleted file mode 100644 index 8ed750b278..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; - -export const test_json_application_v3_1_ConstantAtomicUnion = - _test_json_application({ - version: "3.1", - name: "ConstantAtomicUnion", - })(typia.json.application<[ConstantAtomicUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicWrapper.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicWrapper.ts deleted file mode 100644 index be4c67c8d0..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantAtomicWrapper.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantAtomicWrapper } from "../../../structures/ConstantAtomicWrapper"; - -export const test_json_application_v3_1_ConstantAtomicWrapper = - _test_json_application({ - version: "3.1", - name: "ConstantAtomicWrapper", - })(typia.json.application<[ConstantAtomicWrapper], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantConstEnumeration.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantConstEnumeration.ts deleted file mode 100644 index c46602e823..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantConstEnumeration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; - -export const test_json_application_v3_1_ConstantConstEnumeration = - _test_json_application({ - version: "3.1", - name: "ConstantConstEnumeration", - })(typia.json.application<[ConstantConstEnumeration], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantEnumeration.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantEnumeration.ts deleted file mode 100644 index 61939ff52f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantEnumeration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; - -export const test_json_application_v3_1_ConstantEnumeration = - _test_json_application({ - version: "3.1", - name: "ConstantEnumeration", - })(typia.json.application<[ConstantEnumeration], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantIntersection.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantIntersection.ts deleted file mode 100644 index ac72ee000c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ConstantIntersection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ConstantIntersection } from "../../../structures/ConstantIntersection"; - -export const test_json_application_v3_1_ConstantIntersection = - _test_json_application({ - version: "3.1", - name: "ConstantIntersection", - })(typia.json.application<[ConstantIntersection], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicArray.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicArray.ts deleted file mode 100644 index 2b0983e4da..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicArray } from "../../../structures/DynamicArray"; - -export const test_json_application_v3_1_DynamicArray = _test_json_application({ - version: "3.1", - name: "DynamicArray", -})(typia.json.application<[DynamicArray], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicComposite.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicComposite.ts deleted file mode 100644 index 7015621a04..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicComposite.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicComposite } from "../../../structures/DynamicComposite"; - -export const test_json_application_v3_1_DynamicComposite = - _test_json_application({ - version: "3.1", - name: "DynamicComposite", - })(typia.json.application<[DynamicComposite], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicConstant.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicConstant.ts deleted file mode 100644 index 96f2e6672e..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicConstant.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicConstant } from "../../../structures/DynamicConstant"; - -export const test_json_application_v3_1_DynamicConstant = - _test_json_application({ - version: "3.1", - name: "DynamicConstant", - })(typia.json.application<[DynamicConstant], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicEnumeration.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicEnumeration.ts deleted file mode 100644 index 17ca9c1a04..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicEnumeration.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; - -export const test_json_application_v3_1_DynamicEnumeration = - _test_json_application({ - version: "3.1", - name: "DynamicEnumeration", - })(typia.json.application<[DynamicEnumeration], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicNever.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicNever.ts deleted file mode 100644 index dabf929525..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicNever.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicNever } from "../../../structures/DynamicNever"; - -export const test_json_application_v3_1_DynamicNever = _test_json_application({ - version: "3.1", - name: "DynamicNever", -})(typia.json.application<[DynamicNever], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicSimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicSimple.ts deleted file mode 100644 index 495cb56b10..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicSimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicSimple } from "../../../structures/DynamicSimple"; - -export const test_json_application_v3_1_DynamicSimple = _test_json_application({ - version: "3.1", - name: "DynamicSimple", -})(typia.json.application<[DynamicSimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicTemplate.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicTemplate.ts deleted file mode 100644 index 5eee72d6a3..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicTemplate.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicTemplate } from "../../../structures/DynamicTemplate"; - -export const test_json_application_v3_1_DynamicTemplate = - _test_json_application({ - version: "3.1", - name: "DynamicTemplate", - })(typia.json.application<[DynamicTemplate], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicTree.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicTree.ts deleted file mode 100644 index f54a185874..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicTree.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicTree } from "../../../structures/DynamicTree"; - -export const test_json_application_v3_1_DynamicTree = _test_json_application({ - version: "3.1", - name: "DynamicTree", -})(typia.json.application<[DynamicTree], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicUndefined.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicUndefined.ts deleted file mode 100644 index 96c4d53664..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicUndefined.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicUndefined } from "../../../structures/DynamicUndefined"; - -export const test_json_application_v3_1_DynamicUndefined = - _test_json_application({ - version: "3.1", - name: "DynamicUndefined", - })(typia.json.application<[DynamicUndefined], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicUnion.ts deleted file mode 100644 index 7d176a07b4..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_DynamicUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { DynamicUnion } from "../../../structures/DynamicUnion"; - -export const test_json_application_v3_1_DynamicUnion = _test_json_application({ - version: "3.1", - name: "DynamicUnion", -})(typia.json.application<[DynamicUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectAlias.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectAlias.ts deleted file mode 100644 index 72721b8d94..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectAlias.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectAlias } from "../../../structures/ObjectAlias"; - -export const test_json_application_v3_1_ObjectAlias = _test_json_application({ - version: "3.1", - name: "ObjectAlias", -})(typia.json.application<[ObjectAlias], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDate.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDate.ts deleted file mode 100644 index 800386c613..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDate.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectDate } from "../../../structures/ObjectDate"; - -export const test_json_application_v3_1_ObjectDate = _test_json_application({ - version: "3.1", - name: "ObjectDate", -})(typia.json.application<[ObjectDate], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDescription.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDescription.ts deleted file mode 100644 index 1c52f745b6..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDescription.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectDescription } from "../../../structures/ObjectDescription"; - -export const test_json_application_v3_1_ObjectDescription = - _test_json_application({ - version: "3.1", - name: "ObjectDescription", - })(typia.json.application<[ObjectDescription], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDynamic.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDynamic.ts deleted file mode 100644 index 8b6094295f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectDynamic.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectDynamic } from "../../../structures/ObjectDynamic"; - -export const test_json_application_v3_1_ObjectDynamic = _test_json_application({ - version: "3.1", - name: "ObjectDynamic", -})(typia.json.application<[ObjectDynamic], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGeneric.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGeneric.ts deleted file mode 100644 index fbeac57bc0..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGeneric.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGeneric } from "../../../structures/ObjectGeneric"; - -export const test_json_application_v3_1_ObjectGeneric = _test_json_application({ - version: "3.1", - name: "ObjectGeneric", -})(typia.json.application<[ObjectGeneric], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericAlias.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericAlias.ts deleted file mode 100644 index 7f65f9a93e..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericAlias.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; - -export const test_json_application_v3_1_ObjectGenericAlias = - _test_json_application({ - version: "3.1", - name: "ObjectGenericAlias", - })(typia.json.application<[ObjectGenericAlias], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericArray.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericArray.ts deleted file mode 100644 index 4545b553a0..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; - -export const test_json_application_v3_1_ObjectGenericArray = - _test_json_application({ - version: "3.1", - name: "ObjectGenericArray", - })(typia.json.application<[ObjectGenericArray], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericUnion.ts deleted file mode 100644 index 0163d4a030..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectGenericUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; - -export const test_json_application_v3_1_ObjectGenericUnion = - _test_json_application({ - version: "3.1", - name: "ObjectGenericUnion", - })(typia.json.application<[ObjectGenericUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectHierarchical.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectHierarchical.ts deleted file mode 100644 index 258e97aaaf..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectHierarchical.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectHierarchical } from "../../../structures/ObjectHierarchical"; - -export const test_json_application_v3_1_ObjectHierarchical = - _test_json_application({ - version: "3.1", - name: "ObjectHierarchical", - })(typia.json.application<[ObjectHierarchical], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectInternal.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectInternal.ts deleted file mode 100644 index 19e715bc70..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectInternal.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectInternal } from "../../../structures/ObjectInternal"; - -export const test_json_application_v3_1_ObjectInternal = _test_json_application( - { - version: "3.1", - name: "ObjectInternal", - }, -)(typia.json.application<[ObjectInternal], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectIntersection.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectIntersection.ts deleted file mode 100644 index 759a791774..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectIntersection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectIntersection } from "../../../structures/ObjectIntersection"; - -export const test_json_application_v3_1_ObjectIntersection = - _test_json_application({ - version: "3.1", - name: "ObjectIntersection", - })(typia.json.application<[ObjectIntersection], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectJsonTag.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectJsonTag.ts deleted file mode 100644 index 71768a92df..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectJsonTag.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; - -export const test_json_application_v3_1_ObjectJsonTag = _test_json_application({ - version: "3.1", - name: "ObjectJsonTag", -})(typia.json.application<[ObjectJsonTag], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectLiteralProperty.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectLiteralProperty.ts deleted file mode 100644 index 72018608af..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectLiteralProperty.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; - -export const test_json_application_v3_1_ObjectLiteralProperty = - _test_json_application({ - version: "3.1", - name: "ObjectLiteralProperty", - })(typia.json.application<[ObjectLiteralProperty], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectLiteralType.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectLiteralType.ts deleted file mode 100644 index 1621efb027..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectLiteralType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; - -export const test_json_application_v3_1_ObjectLiteralType = - _test_json_application({ - version: "3.1", - name: "ObjectLiteralType", - })(typia.json.application<[ObjectLiteralType], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectNullable.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectNullable.ts deleted file mode 100644 index a600a92dfa..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectNullable.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectNullable } from "../../../structures/ObjectNullable"; - -export const test_json_application_v3_1_ObjectNullable = _test_json_application( - { - version: "3.1", - name: "ObjectNullable", - }, -)(typia.json.application<[ObjectNullable], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectOptional.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectOptional.ts deleted file mode 100644 index f062d5370f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectOptional.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectOptional } from "../../../structures/ObjectOptional"; - -export const test_json_application_v3_1_ObjectOptional = _test_json_application( - { - version: "3.1", - name: "ObjectOptional", - }, -)(typia.json.application<[ObjectOptional], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPartial.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPartial.ts deleted file mode 100644 index 76954c7496..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPartial.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPartial } from "../../../structures/ObjectPartial"; - -export const test_json_application_v3_1_ObjectPartial = _test_json_application({ - version: "3.1", - name: "ObjectPartial", -})(typia.json.application<[ObjectPartial], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPartialAndRequired.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPartialAndRequired.ts deleted file mode 100644 index 55b6a96342..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPartialAndRequired.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; - -export const test_json_application_v3_1_ObjectPartialAndRequired = - _test_json_application({ - version: "3.1", - name: "ObjectPartialAndRequired", - })(typia.json.application<[ObjectPartialAndRequired], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPrimitive.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPrimitive.ts deleted file mode 100644 index c5a30f0c87..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPrimitive.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; - -export const test_json_application_v3_1_ObjectPrimitive = - _test_json_application({ - version: "3.1", - name: "ObjectPrimitive", - })(typia.json.application<[ObjectPrimitive], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPropertyNullable.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPropertyNullable.ts deleted file mode 100644 index 362923a5ae..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectPropertyNullable.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectPropertyNullable } from "../../../structures/ObjectPropertyNullable"; - -export const test_json_application_v3_1_ObjectPropertyNullable = - _test_json_application({ - version: "3.1", - name: "ObjectPropertyNullable", - })(typia.json.application<[ObjectPropertyNullable], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectRecursive.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectRecursive.ts deleted file mode 100644 index 317475429c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectRecursive.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectRecursive } from "../../../structures/ObjectRecursive"; - -export const test_json_application_v3_1_ObjectRecursive = - _test_json_application({ - version: "3.1", - name: "ObjectRecursive", - })(typia.json.application<[ObjectRecursive], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectRequired.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectRequired.ts deleted file mode 100644 index 48c2d84cd0..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectRequired.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectRequired } from "../../../structures/ObjectRequired"; - -export const test_json_application_v3_1_ObjectRequired = _test_json_application( - { - version: "3.1", - name: "ObjectRequired", - }, -)(typia.json.application<[ObjectRequired], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectSimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectSimple.ts deleted file mode 100644 index 6834720d2f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectSimple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectSimple } from "../../../structures/ObjectSimple"; - -export const test_json_application_v3_1_ObjectSimple = _test_json_application({ - version: "3.1", - name: "ObjectSimple", -})(typia.json.application<[ObjectSimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectTuple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectTuple.ts deleted file mode 100644 index 7b3f5dcfb3..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectTuple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectTuple } from "../../../structures/ObjectTuple"; - -export const test_json_application_v3_1_ObjectTuple = _test_json_application({ - version: "3.1", - name: "ObjectTuple", -})(typia.json.application<[ObjectTuple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUndefined.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUndefined.ts deleted file mode 100644 index 2586c133e8..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUndefined.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUndefined } from "../../../structures/ObjectUndefined"; - -export const test_json_application_v3_1_ObjectUndefined = - _test_json_application({ - version: "3.1", - name: "ObjectUndefined", - })(typia.json.application<[ObjectUndefined], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionComposite.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionComposite.ts deleted file mode 100644 index 9c63aed710..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionComposite.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; - -export const test_json_application_v3_1_ObjectUnionComposite = - _test_json_application({ - version: "3.1", - name: "ObjectUnionComposite", - })(typia.json.application<[ObjectUnionComposite], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionCompositePointer.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionCompositePointer.ts deleted file mode 100644 index dce526840a..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionCompositePointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; - -export const test_json_application_v3_1_ObjectUnionCompositePointer = - _test_json_application({ - version: "3.1", - name: "ObjectUnionCompositePointer", - })(typia.json.application<[ObjectUnionCompositePointer], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionDouble.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionDouble.ts deleted file mode 100644 index c99804a6f4..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionDouble.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; - -export const test_json_application_v3_1_ObjectUnionDouble = - _test_json_application({ - version: "3.1", - name: "ObjectUnionDouble", - })(typia.json.application<[ObjectUnionDouble], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionExplicit.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionExplicit.ts deleted file mode 100644 index 3319c2759d..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionExplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; - -export const test_json_application_v3_1_ObjectUnionExplicit = - _test_json_application({ - version: "3.1", - name: "ObjectUnionExplicit", - })(typia.json.application<[ObjectUnionExplicit], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionExplicitPointer.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionExplicitPointer.ts deleted file mode 100644 index 11ac626933..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionExplicitPointer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; - -export const test_json_application_v3_1_ObjectUnionExplicitPointer = - _test_json_application({ - version: "3.1", - name: "ObjectUnionExplicitPointer", - })(typia.json.application<[ObjectUnionExplicitPointer], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionImplicit.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionImplicit.ts deleted file mode 100644 index 183b26f15a..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionImplicit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; - -export const test_json_application_v3_1_ObjectUnionImplicit = - _test_json_application({ - version: "3.1", - name: "ObjectUnionImplicit", - })(typia.json.application<[ObjectUnionImplicit], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionNonPredictable.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionNonPredictable.ts deleted file mode 100644 index 67b9108405..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ObjectUnionNonPredictable.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; - -export const test_json_application_v3_1_ObjectUnionNonPredictable = - _test_json_application({ - version: "3.1", - name: "ObjectUnionNonPredictable", - })(typia.json.application<[ObjectUnionNonPredictable], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateAtomic.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateAtomic.ts deleted file mode 100644 index 122880ecd2..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateAtomic.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TemplateAtomic } from "../../../structures/TemplateAtomic"; - -export const test_json_application_v3_1_TemplateAtomic = _test_json_application( - { - version: "3.1", - name: "TemplateAtomic", - }, -)(typia.json.application<[TemplateAtomic], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateConstant.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateConstant.ts deleted file mode 100644 index ef870fed32..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateConstant.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TemplateConstant } from "../../../structures/TemplateConstant"; - -export const test_json_application_v3_1_TemplateConstant = - _test_json_application({ - version: "3.1", - name: "TemplateConstant", - })(typia.json.application<[TemplateConstant], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateUnion.ts deleted file mode 100644 index 75bdb6f4df..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TemplateUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TemplateUnion } from "../../../structures/TemplateUnion"; - -export const test_json_application_v3_1_TemplateUnion = _test_json_application({ - version: "3.1", - name: "TemplateUnion", -})(typia.json.application<[TemplateUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonArray.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonArray.ts deleted file mode 100644 index 7e766d680f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonArray } from "../../../structures/ToJsonArray"; - -export const test_json_application_v3_1_ToJsonArray = _test_json_application({ - version: "3.1", - name: "ToJsonArray", -})(typia.json.application<[ToJsonArray], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonAtomicSimple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonAtomicSimple.ts deleted file mode 100644 index 0458e4c654..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonAtomicSimple.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonAtomicSimple } from "../../../structures/ToJsonAtomicSimple"; - -export const test_json_application_v3_1_ToJsonAtomicSimple = - _test_json_application({ - version: "3.1", - name: "ToJsonAtomicSimple", - })(typia.json.application<[ToJsonAtomicSimple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonAtomicUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonAtomicUnion.ts deleted file mode 100644 index 4c1ceacf92..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; - -export const test_json_application_v3_1_ToJsonAtomicUnion = - _test_json_application({ - version: "3.1", - name: "ToJsonAtomicUnion", - })(typia.json.application<[ToJsonAtomicUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonDouble.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonDouble.ts deleted file mode 100644 index 0ebcf29312..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonDouble.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonDouble } from "../../../structures/ToJsonDouble"; - -export const test_json_application_v3_1_ToJsonDouble = _test_json_application({ - version: "3.1", - name: "ToJsonDouble", -})(typia.json.application<[ToJsonDouble], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonNull.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonNull.ts deleted file mode 100644 index 3e3e61170c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonNull.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonNull } from "../../../structures/ToJsonNull"; - -export const test_json_application_v3_1_ToJsonNull = _test_json_application({ - version: "3.1", - name: "ToJsonNull", -})(typia.json.application<[ToJsonNull], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonTuple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonTuple.ts deleted file mode 100644 index fdcea4b199..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonTuple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonTuple } from "../../../structures/ToJsonTuple"; - -export const test_json_application_v3_1_ToJsonTuple = _test_json_application({ - version: "3.1", - name: "ToJsonTuple", -})(typia.json.application<[ToJsonTuple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonUnion.ts deleted file mode 100644 index b88237232c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_ToJsonUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { ToJsonUnion } from "../../../structures/ToJsonUnion"; - -export const test_json_application_v3_1_ToJsonUnion = _test_json_application({ - version: "3.1", - name: "ToJsonUnion", -})(typia.json.application<[ToJsonUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleHierarchical.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleHierarchical.ts deleted file mode 100644 index 083b94e78f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleHierarchical.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleHierarchical } from "../../../structures/TupleHierarchical"; - -export const test_json_application_v3_1_TupleHierarchical = - _test_json_application({ - version: "3.1", - name: "TupleHierarchical", - })(typia.json.application<[TupleHierarchical], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestArray.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestArray.ts deleted file mode 100644 index fcac190e72..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestArray.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleRestArray } from "../../../structures/TupleRestArray"; - -export const test_json_application_v3_1_TupleRestArray = _test_json_application( - { - version: "3.1", - name: "TupleRestArray", - }, -)(typia.json.application<[TupleRestArray], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestAtomic.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestAtomic.ts deleted file mode 100644 index 7379cfbe2c..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestAtomic.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleRestAtomic } from "../../../structures/TupleRestAtomic"; - -export const test_json_application_v3_1_TupleRestAtomic = - _test_json_application({ - version: "3.1", - name: "TupleRestAtomic", - })(typia.json.application<[TupleRestAtomic], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestObject.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestObject.ts deleted file mode 100644 index 569c284943..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TupleRestObject.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TupleRestObject } from "../../../structures/TupleRestObject"; - -export const test_json_application_v3_1_TupleRestObject = - _test_json_application({ - version: "3.1", - name: "TupleRestObject", - })(typia.json.application<[TupleRestObject], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagArray.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagArray.ts deleted file mode 100644 index b655970867..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagArray } from "../../../structures/TypeTagArray"; - -export const test_json_application_v3_1_TypeTagArray = _test_json_application({ - version: "3.1", - name: "TypeTagArray", -})(typia.json.application<[TypeTagArray], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagArrayUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagArrayUnion.ts deleted file mode 100644 index ae0580e4f8..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagArrayUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; - -export const test_json_application_v3_1_TypeTagArrayUnion = - _test_json_application({ - version: "3.1", - name: "TypeTagArrayUnion", - })(typia.json.application<[TypeTagArrayUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagAtomicUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagAtomicUnion.ts deleted file mode 100644 index 76d5ef8a7f..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagAtomicUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; - -export const test_json_application_v3_1_TypeTagAtomicUnion = - _test_json_application({ - version: "3.1", - name: "TypeTagAtomicUnion", - })(typia.json.application<[TypeTagAtomicUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagCustom.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagCustom.ts deleted file mode 100644 index edb55f750b..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagCustom.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagCustom } from "../../../structures/TypeTagCustom"; - -export const test_json_application_v3_1_TypeTagCustom = _test_json_application({ - version: "3.1", - name: "TypeTagCustom", -})(typia.json.application<[TypeTagCustom], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagDefault.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagDefault.ts deleted file mode 100644 index 0d2f702e41..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagDefault.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagDefault } from "../../../structures/TypeTagDefault"; - -export const test_json_application_v3_1_TypeTagDefault = _test_json_application( - { - version: "3.1", - name: "TypeTagDefault", - }, -)(typia.json.application<[TypeTagDefault], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagFormat.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagFormat.ts deleted file mode 100644 index dcf8a48305..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagFormat.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagFormat } from "../../../structures/TypeTagFormat"; - -export const test_json_application_v3_1_TypeTagFormat = _test_json_application({ - version: "3.1", - name: "TypeTagFormat", -})(typia.json.application<[TypeTagFormat], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagLength.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagLength.ts deleted file mode 100644 index cde7f6d311..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagLength.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagLength } from "../../../structures/TypeTagLength"; - -export const test_json_application_v3_1_TypeTagLength = _test_json_application({ - version: "3.1", - name: "TypeTagLength", -})(typia.json.application<[TypeTagLength], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagMatrix.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagMatrix.ts deleted file mode 100644 index 407eaf3674..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagMatrix.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; - -export const test_json_application_v3_1_TypeTagMatrix = _test_json_application({ - version: "3.1", - name: "TypeTagMatrix", -})(typia.json.application<[TypeTagMatrix], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagObjectUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagObjectUnion.ts deleted file mode 100644 index 76c4858843..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagObjectUnion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; - -export const test_json_application_v3_1_TypeTagObjectUnion = - _test_json_application({ - version: "3.1", - name: "TypeTagObjectUnion", - })(typia.json.application<[TypeTagObjectUnion], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagPattern.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagPattern.ts deleted file mode 100644 index 22741ee064..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagPattern.ts +++ /dev/null @@ -1,11 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagPattern } from "../../../structures/TypeTagPattern"; - -export const test_json_application_v3_1_TypeTagPattern = _test_json_application( - { - version: "3.1", - name: "TypeTagPattern", - }, -)(typia.json.application<[TypeTagPattern], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagRange.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagRange.ts deleted file mode 100644 index 6a19590898..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagRange.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagRange } from "../../../structures/TypeTagRange"; - -export const test_json_application_v3_1_TypeTagRange = _test_json_application({ - version: "3.1", - name: "TypeTagRange", -})(typia.json.application<[TypeTagRange], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagTuple.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagTuple.ts deleted file mode 100644 index 47c16868ad..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagTuple.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagTuple } from "../../../structures/TypeTagTuple"; - -export const test_json_application_v3_1_TypeTagTuple = _test_json_application({ - version: "3.1", - name: "TypeTagTuple", -})(typia.json.application<[TypeTagTuple], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagType.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagType.ts deleted file mode 100644 index 354b95a283..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_TypeTagType.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { TypeTagType } from "../../../structures/TypeTagType"; - -export const test_json_application_v3_1_TypeTagType = _test_json_application({ - version: "3.1", - name: "TypeTagType", -})(typia.json.application<[TypeTagType], "3.1">()); diff --git a/test/src/features/json.application/v3_1/test_json_application_v3_1_UltimateUnion.ts b/test/src/features/json.application/v3_1/test_json_application_v3_1_UltimateUnion.ts deleted file mode 100644 index 151c79c9e5..0000000000 --- a/test/src/features/json.application/v3_1/test_json_application_v3_1_UltimateUnion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import typia from "typia"; - -import { _test_json_application } from "../../../internal/_test_json_application"; -import { UltimateUnion } from "../../../structures/UltimateUnion"; - -export const test_json_application_v3_1_UltimateUnion = _test_json_application({ - version: "3.1", - name: "UltimateUnion", -})(typia.json.application<[UltimateUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAny.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAny.ts new file mode 100644 index 0000000000..42d7b06451 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_json_schemas_v3_0_ArrayAny = _test_json_schemas({ + version: "3.0", + name: "ArrayAny", +})(typia.json.schemas<[ArrayAny], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAtomicAlias.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAtomicAlias.ts new file mode 100644 index 0000000000..44f8eab168 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAtomicAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayAtomicAlias } from "../../../structures/ArrayAtomicAlias"; + +export const test_json_schemas_v3_0_ArrayAtomicAlias = _test_json_schemas({ + version: "3.0", + name: "ArrayAtomicAlias", +})(typia.json.schemas<[ArrayAtomicAlias], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAtomicSimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAtomicSimple.ts new file mode 100644 index 0000000000..1308634728 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayAtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayAtomicSimple } from "../../../structures/ArrayAtomicSimple"; + +export const test_json_schemas_v3_0_ArrayAtomicSimple = _test_json_schemas({ + version: "3.0", + name: "ArrayAtomicSimple", +})(typia.json.schemas<[ArrayAtomicSimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayHierarchical.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayHierarchical.ts new file mode 100644 index 0000000000..f7a3a5c183 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_json_schemas_v3_0_ArrayHierarchical = _test_json_schemas({ + version: "3.0", + name: "ArrayHierarchical", +})(typia.json.schemas<[ArrayHierarchical], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayHierarchicalPointer.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..16659f2d8a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayHierarchicalPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_json_schemas_v3_0_ArrayHierarchicalPointer = + _test_json_schemas({ + version: "3.0", + name: "ArrayHierarchicalPointer", + })(typia.json.schemas<[ArrayHierarchicalPointer], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayMatrix.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayMatrix.ts new file mode 100644 index 0000000000..edb1293024 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_json_schemas_v3_0_ArrayMatrix = _test_json_schemas({ + version: "3.0", + name: "ArrayMatrix", +})(typia.json.schemas<[ArrayMatrix], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursive.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursive.ts new file mode 100644 index 0000000000..d6c56dc118 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_json_schemas_v3_0_ArrayRecursive = _test_json_schemas({ + version: "3.0", + name: "ArrayRecursive", +})(typia.json.schemas<[ArrayRecursive], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionExplicit.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..6fca470557 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_json_schemas_v3_0_ArrayRecursiveUnionExplicit = + _test_json_schemas({ + version: "3.0", + name: "ArrayRecursiveUnionExplicit", + })(typia.json.schemas<[ArrayRecursiveUnionExplicit], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..8406010e99 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_json_schemas_v3_0_ArrayRecursiveUnionExplicitPointer = + _test_json_schemas({ + version: "3.0", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.json.schemas<[ArrayRecursiveUnionExplicitPointer], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionImplicit.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..09d91e5daf --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_json_schemas_v3_0_ArrayRecursiveUnionImplicit = + _test_json_schemas({ + version: "3.0", + name: "ArrayRecursiveUnionImplicit", + })(typia.json.schemas<[ArrayRecursiveUnionImplicit], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedNullable.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..5e3fc5aa70 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_json_schemas_v3_0_ArrayRepeatedNullable = _test_json_schemas({ + version: "3.0", + name: "ArrayRepeatedNullable", +})(typia.json.schemas<[ArrayRepeatedNullable], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedRequired.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..47a169a762 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_json_schemas_v3_0_ArrayRepeatedRequired = _test_json_schemas({ + version: "3.0", + name: "ArrayRepeatedRequired", +})(typia.json.schemas<[ArrayRepeatedRequired], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..cf263be01b --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_json_schemas_v3_0_ArrayRepeatedUnion = _test_json_schemas({ + version: "3.0", + name: "ArrayRepeatedUnion", +})(typia.json.schemas<[ArrayRepeatedUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedUnionWithTuple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedUnionWithTuple.ts new file mode 100644 index 0000000000..affb4e9fef --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayRepeatedUnionWithTuple.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedUnionWithTuple } from "../../../structures/ArrayRepeatedUnionWithTuple"; + +export const test_json_schemas_v3_0_ArrayRepeatedUnionWithTuple = + _test_json_schemas({ + version: "3.0", + name: "ArrayRepeatedUnionWithTuple", + })(typia.json.schemas<[ArrayRepeatedUnionWithTuple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArraySimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArraySimple.ts new file mode 100644 index 0000000000..37e0fef24f --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_json_schemas_v3_0_ArraySimple = _test_json_schemas({ + version: "3.0", + name: "ArraySimple", +})(typia.json.schemas<[ArraySimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayUnion.ts new file mode 100644 index 0000000000..c2fd9e905e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_json_schemas_v3_0_ArrayUnion = _test_json_schemas({ + version: "3.0", + name: "ArrayUnion", +})(typia.json.schemas<[ArrayUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicAlias.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicAlias.ts new file mode 100644 index 0000000000..4889d49525 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicAlias } from "../../../structures/AtomicAlias"; + +export const test_json_schemas_v3_0_AtomicAlias = _test_json_schemas({ + version: "3.0", + name: "AtomicAlias", +})(typia.json.schemas<[AtomicAlias], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicClass.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicClass.ts new file mode 100644 index 0000000000..5fd8715fbf --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicClass.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicClass } from "../../../structures/AtomicClass"; + +export const test_json_schemas_v3_0_AtomicClass = _test_json_schemas({ + version: "3.0", + name: "AtomicClass", +})(typia.json.schemas<[AtomicClass], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicIntersection.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicIntersection.ts new file mode 100644 index 0000000000..95b2eb8ecb --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicIntersection } from "../../../structures/AtomicIntersection"; + +export const test_json_schemas_v3_0_AtomicIntersection = _test_json_schemas({ + version: "3.0", + name: "AtomicIntersection", +})(typia.json.schemas<[AtomicIntersection], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicSimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicSimple.ts new file mode 100644 index 0000000000..36269cd119 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicSimple } from "../../../structures/AtomicSimple"; + +export const test_json_schemas_v3_0_AtomicSimple = _test_json_schemas({ + version: "3.0", + name: "AtomicSimple", +})(typia.json.schemas<[AtomicSimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicUnion.ts new file mode 100644 index 0000000000..338b275212 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_json_schemas_v3_0_AtomicUnion = _test_json_schemas({ + version: "3.0", + name: "AtomicUnion", +})(typia.json.schemas<[AtomicUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassGetter.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassGetter.ts new file mode 100644 index 0000000000..1ea4093fe0 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_json_schemas_v3_0_ClassGetter = _test_json_schemas({ + version: "3.0", + name: "ClassGetter", +})(typia.json.schemas<[ClassGetter], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassMethod.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassMethod.ts new file mode 100644 index 0000000000..bdb913b752 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_json_schemas_v3_0_ClassMethod = _test_json_schemas({ + version: "3.0", + name: "ClassMethod", +})(typia.json.schemas<[ClassMethod], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassPropertyAssignment.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..5a90a99cda --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ClassPropertyAssignment.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_json_schemas_v3_0_ClassPropertyAssignment = + _test_json_schemas({ + version: "3.0", + name: "ClassPropertyAssignment", + })(typia.json.schemas<[ClassPropertyAssignment], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagArray.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagArray.ts new file mode 100644 index 0000000000..58bc537357 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_json_schemas_v3_0_CommentTagArray = _test_json_schemas({ + version: "3.0", + name: "CommentTagArray", +})(typia.json.schemas<[CommentTagArray], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagArrayUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..920e8bb949 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_json_schemas_v3_0_CommentTagArrayUnion = _test_json_schemas({ + version: "3.0", + name: "CommentTagArrayUnion", +})(typia.json.schemas<[CommentTagArrayUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagAtomicUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..14dab1f664 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_json_schemas_v3_0_CommentTagAtomicUnion = _test_json_schemas({ + version: "3.0", + name: "CommentTagAtomicUnion", +})(typia.json.schemas<[CommentTagAtomicUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagDefault.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagDefault.ts new file mode 100644 index 0000000000..e1a67378c8 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_json_schemas_v3_0_CommentTagDefault = _test_json_schemas({ + version: "3.0", + name: "CommentTagDefault", +})(typia.json.schemas<[CommentTagDefault], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagFormat.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagFormat.ts new file mode 100644 index 0000000000..96e196e3a9 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_json_schemas_v3_0_CommentTagFormat = _test_json_schemas({ + version: "3.0", + name: "CommentTagFormat", +})(typia.json.schemas<[CommentTagFormat], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagLength.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagLength.ts new file mode 100644 index 0000000000..aaa3bbc5dc --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_json_schemas_v3_0_CommentTagLength = _test_json_schemas({ + version: "3.0", + name: "CommentTagLength", +})(typia.json.schemas<[CommentTagLength], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagObjectUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..b0f2739878 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_json_schemas_v3_0_CommentTagObjectUnion = _test_json_schemas({ + version: "3.0", + name: "CommentTagObjectUnion", +})(typia.json.schemas<[CommentTagObjectUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagPattern.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagPattern.ts new file mode 100644 index 0000000000..5b542479b4 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_json_schemas_v3_0_CommentTagPattern = _test_json_schemas({ + version: "3.0", + name: "CommentTagPattern", +})(typia.json.schemas<[CommentTagPattern], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagRange.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagRange.ts new file mode 100644 index 0000000000..21d8f8c7fd --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_json_schemas_v3_0_CommentTagRange = _test_json_schemas({ + version: "3.0", + name: "CommentTagRange", +})(typia.json.schemas<[CommentTagRange], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagType.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagType.ts new file mode 100644 index 0000000000..a8cd118309 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_json_schemas_v3_0_CommentTagType = _test_json_schemas({ + version: "3.0", + name: "CommentTagType", +})(typia.json.schemas<[CommentTagType], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicAbsorbed.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..9fd63a50c6 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicAbsorbed.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_json_schemas_v3_0_ConstantAtomicAbsorbed = _test_json_schemas( + { + version: "3.0", + name: "ConstantAtomicAbsorbed", + }, +)(typia.json.schemas<[ConstantAtomicAbsorbed], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicSimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicSimple.ts new file mode 100644 index 0000000000..2a64ab33e0 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicSimple } from "../../../structures/ConstantAtomicSimple"; + +export const test_json_schemas_v3_0_ConstantAtomicSimple = _test_json_schemas({ + version: "3.0", + name: "ConstantAtomicSimple", +})(typia.json.schemas<[ConstantAtomicSimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicTagged.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..d955d9a655 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_json_schemas_v3_0_ConstantAtomicTagged = _test_json_schemas({ + version: "3.0", + name: "ConstantAtomicTagged", +})(typia.json.schemas<[ConstantAtomicTagged], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..3861fde50f --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_json_schemas_v3_0_ConstantAtomicUnion = _test_json_schemas({ + version: "3.0", + name: "ConstantAtomicUnion", +})(typia.json.schemas<[ConstantAtomicUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicWrapper.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicWrapper.ts new file mode 100644 index 0000000000..ce09b08b73 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantAtomicWrapper.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicWrapper } from "../../../structures/ConstantAtomicWrapper"; + +export const test_json_schemas_v3_0_ConstantAtomicWrapper = _test_json_schemas({ + version: "3.0", + name: "ConstantAtomicWrapper", +})(typia.json.schemas<[ConstantAtomicWrapper], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantConstEnumeration.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..3c305949e4 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantConstEnumeration.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_json_schemas_v3_0_ConstantConstEnumeration = + _test_json_schemas({ + version: "3.0", + name: "ConstantConstEnumeration", + })(typia.json.schemas<[ConstantConstEnumeration], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantEnumeration.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantEnumeration.ts new file mode 100644 index 0000000000..de38649f40 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_json_schemas_v3_0_ConstantEnumeration = _test_json_schemas({ + version: "3.0", + name: "ConstantEnumeration", +})(typia.json.schemas<[ConstantEnumeration], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantIntersection.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantIntersection.ts new file mode 100644 index 0000000000..8e79bf2d16 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ConstantIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantIntersection } from "../../../structures/ConstantIntersection"; + +export const test_json_schemas_v3_0_ConstantIntersection = _test_json_schemas({ + version: "3.0", + name: "ConstantIntersection", +})(typia.json.schemas<[ConstantIntersection], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicArray.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicArray.ts new file mode 100644 index 0000000000..8289942fdb --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_json_schemas_v3_0_DynamicArray = _test_json_schemas({ + version: "3.0", + name: "DynamicArray", +})(typia.json.schemas<[DynamicArray], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicComposite.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicComposite.ts new file mode 100644 index 0000000000..e06fae8c05 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_json_schemas_v3_0_DynamicComposite = _test_json_schemas({ + version: "3.0", + name: "DynamicComposite", +})(typia.json.schemas<[DynamicComposite], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicConstant.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicConstant.ts new file mode 100644 index 0000000000..92a84587db --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_json_schemas_v3_0_DynamicConstant = _test_json_schemas({ + version: "3.0", + name: "DynamicConstant", +})(typia.json.schemas<[DynamicConstant], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicEnumeration.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicEnumeration.ts new file mode 100644 index 0000000000..ed680d19bf --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_json_schemas_v3_0_DynamicEnumeration = _test_json_schemas({ + version: "3.0", + name: "DynamicEnumeration", +})(typia.json.schemas<[DynamicEnumeration], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicNever.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicNever.ts new file mode 100644 index 0000000000..985c7b3cbd --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_json_schemas_v3_0_DynamicNever = _test_json_schemas({ + version: "3.0", + name: "DynamicNever", +})(typia.json.schemas<[DynamicNever], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicSimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicSimple.ts new file mode 100644 index 0000000000..be09278f1d --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_json_schemas_v3_0_DynamicSimple = _test_json_schemas({ + version: "3.0", + name: "DynamicSimple", +})(typia.json.schemas<[DynamicSimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicTemplate.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicTemplate.ts new file mode 100644 index 0000000000..0d21f3c288 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicTemplate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_json_schemas_v3_0_DynamicTemplate = _test_json_schemas({ + version: "3.0", + name: "DynamicTemplate", +})(typia.json.schemas<[DynamicTemplate], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicTree.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicTree.ts new file mode 100644 index 0000000000..b9788c16c8 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicTree.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_json_schemas_v3_0_DynamicTree = _test_json_schemas({ + version: "3.0", + name: "DynamicTree", +})(typia.json.schemas<[DynamicTree], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicUndefined.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicUndefined.ts new file mode 100644 index 0000000000..f7ab2f3cdb --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_json_schemas_v3_0_DynamicUndefined = _test_json_schemas({ + version: "3.0", + name: "DynamicUndefined", +})(typia.json.schemas<[DynamicUndefined], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicUnion.ts new file mode 100644 index 0000000000..5deb882313 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_DynamicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_json_schemas_v3_0_DynamicUnion = _test_json_schemas({ + version: "3.0", + name: "DynamicUnion", +})(typia.json.schemas<[DynamicUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectAlias.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectAlias.ts new file mode 100644 index 0000000000..40108bb888 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_json_schemas_v3_0_ObjectAlias = _test_json_schemas({ + version: "3.0", + name: "ObjectAlias", +})(typia.json.schemas<[ObjectAlias], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDate.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDate.ts new file mode 100644 index 0000000000..db14ae360c --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_json_schemas_v3_0_ObjectDate = _test_json_schemas({ + version: "3.0", + name: "ObjectDate", +})(typia.json.schemas<[ObjectDate], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDescription.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDescription.ts new file mode 100644 index 0000000000..42a9b1fd98 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_json_schemas_v3_0_ObjectDescription = _test_json_schemas({ + version: "3.0", + name: "ObjectDescription", +})(typia.json.schemas<[ObjectDescription], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDynamic.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDynamic.ts new file mode 100644 index 0000000000..5fdae6405a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectDynamic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_json_schemas_v3_0_ObjectDynamic = _test_json_schemas({ + version: "3.0", + name: "ObjectDynamic", +})(typia.json.schemas<[ObjectDynamic], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGeneric.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGeneric.ts new file mode 100644 index 0000000000..23ec6b0c46 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGeneric.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGeneric } from "../../../structures/ObjectGeneric"; + +export const test_json_schemas_v3_0_ObjectGeneric = _test_json_schemas({ + version: "3.0", + name: "ObjectGeneric", +})(typia.json.schemas<[ObjectGeneric], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericAlias.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericAlias.ts new file mode 100644 index 0000000000..7a0944e9b1 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_json_schemas_v3_0_ObjectGenericAlias = _test_json_schemas({ + version: "3.0", + name: "ObjectGenericAlias", +})(typia.json.schemas<[ObjectGenericAlias], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericArray.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericArray.ts new file mode 100644 index 0000000000..e5113c3de8 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_json_schemas_v3_0_ObjectGenericArray = _test_json_schemas({ + version: "3.0", + name: "ObjectGenericArray", +})(typia.json.schemas<[ObjectGenericArray], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericUnion.ts new file mode 100644 index 0000000000..25aad4baf0 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_json_schemas_v3_0_ObjectGenericUnion = _test_json_schemas({ + version: "3.0", + name: "ObjectGenericUnion", +})(typia.json.schemas<[ObjectGenericUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectHierarchical.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectHierarchical.ts new file mode 100644 index 0000000000..672f6b3b8e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectHierarchical } from "../../../structures/ObjectHierarchical"; + +export const test_json_schemas_v3_0_ObjectHierarchical = _test_json_schemas({ + version: "3.0", + name: "ObjectHierarchical", +})(typia.json.schemas<[ObjectHierarchical], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectInternal.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectInternal.ts new file mode 100644 index 0000000000..4ee7529c0e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_json_schemas_v3_0_ObjectInternal = _test_json_schemas({ + version: "3.0", + name: "ObjectInternal", +})(typia.json.schemas<[ObjectInternal], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectIntersection.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectIntersection.ts new file mode 100644 index 0000000000..7e86c1b1d4 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_json_schemas_v3_0_ObjectIntersection = _test_json_schemas({ + version: "3.0", + name: "ObjectIntersection", +})(typia.json.schemas<[ObjectIntersection], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectJsonTag.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectJsonTag.ts new file mode 100644 index 0000000000..aa86dbd39f --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_json_schemas_v3_0_ObjectJsonTag = _test_json_schemas({ + version: "3.0", + name: "ObjectJsonTag", +})(typia.json.schemas<[ObjectJsonTag], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectLiteralProperty.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..aa35d05d4a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_json_schemas_v3_0_ObjectLiteralProperty = _test_json_schemas({ + version: "3.0", + name: "ObjectLiteralProperty", +})(typia.json.schemas<[ObjectLiteralProperty], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectLiteralType.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectLiteralType.ts new file mode 100644 index 0000000000..9ea0f49f58 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_json_schemas_v3_0_ObjectLiteralType = _test_json_schemas({ + version: "3.0", + name: "ObjectLiteralType", +})(typia.json.schemas<[ObjectLiteralType], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectNullable.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectNullable.ts new file mode 100644 index 0000000000..a5c82be47e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_json_schemas_v3_0_ObjectNullable = _test_json_schemas({ + version: "3.0", + name: "ObjectNullable", +})(typia.json.schemas<[ObjectNullable], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectOptional.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectOptional.ts new file mode 100644 index 0000000000..2abbce2816 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_json_schemas_v3_0_ObjectOptional = _test_json_schemas({ + version: "3.0", + name: "ObjectOptional", +})(typia.json.schemas<[ObjectOptional], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPartial.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPartial.ts new file mode 100644 index 0000000000..b587399a6d --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_json_schemas_v3_0_ObjectPartial = _test_json_schemas({ + version: "3.0", + name: "ObjectPartial", +})(typia.json.schemas<[ObjectPartial], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPartialAndRequired.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..9e67ddb065 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPartialAndRequired.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_json_schemas_v3_0_ObjectPartialAndRequired = + _test_json_schemas({ + version: "3.0", + name: "ObjectPartialAndRequired", + })(typia.json.schemas<[ObjectPartialAndRequired], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPrimitive.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPrimitive.ts new file mode 100644 index 0000000000..e282b7e783 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_json_schemas_v3_0_ObjectPrimitive = _test_json_schemas({ + version: "3.0", + name: "ObjectPrimitive", +})(typia.json.schemas<[ObjectPrimitive], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPropertyNullable.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPropertyNullable.ts new file mode 100644 index 0000000000..8c4ca1da7f --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectPropertyNullable.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPropertyNullable } from "../../../structures/ObjectPropertyNullable"; + +export const test_json_schemas_v3_0_ObjectPropertyNullable = _test_json_schemas( + { + version: "3.0", + name: "ObjectPropertyNullable", + }, +)(typia.json.schemas<[ObjectPropertyNullable], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectRecursive.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectRecursive.ts new file mode 100644 index 0000000000..e0fe37cd18 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_json_schemas_v3_0_ObjectRecursive = _test_json_schemas({ + version: "3.0", + name: "ObjectRecursive", +})(typia.json.schemas<[ObjectRecursive], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectRequired.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectRequired.ts new file mode 100644 index 0000000000..80cc95653d --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_json_schemas_v3_0_ObjectRequired = _test_json_schemas({ + version: "3.0", + name: "ObjectRequired", +})(typia.json.schemas<[ObjectRequired], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectSimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectSimple.ts new file mode 100644 index 0000000000..b1930581e0 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_json_schemas_v3_0_ObjectSimple = _test_json_schemas({ + version: "3.0", + name: "ObjectSimple", +})(typia.json.schemas<[ObjectSimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectTuple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectTuple.ts new file mode 100644 index 0000000000..98793a4d60 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectTuple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectTuple } from "../../../structures/ObjectTuple"; + +export const test_json_schemas_v3_0_ObjectTuple = _test_json_schemas({ + version: "3.0", + name: "ObjectTuple", +})(typia.json.schemas<[ObjectTuple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUndefined.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUndefined.ts new file mode 100644 index 0000000000..2744e5585d --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_json_schemas_v3_0_ObjectUndefined = _test_json_schemas({ + version: "3.0", + name: "ObjectUndefined", +})(typia.json.schemas<[ObjectUndefined], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionComposite.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionComposite.ts new file mode 100644 index 0000000000..2ca7718454 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_json_schemas_v3_0_ObjectUnionComposite = _test_json_schemas({ + version: "3.0", + name: "ObjectUnionComposite", +})(typia.json.schemas<[ObjectUnionComposite], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionCompositePointer.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..2f844c816b --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionCompositePointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_json_schemas_v3_0_ObjectUnionCompositePointer = + _test_json_schemas({ + version: "3.0", + name: "ObjectUnionCompositePointer", + })(typia.json.schemas<[ObjectUnionCompositePointer], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionDouble.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionDouble.ts new file mode 100644 index 0000000000..e7cfa59c35 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_json_schemas_v3_0_ObjectUnionDouble = _test_json_schemas({ + version: "3.0", + name: "ObjectUnionDouble", +})(typia.json.schemas<[ObjectUnionDouble], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionExplicit.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..3de0479335 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_json_schemas_v3_0_ObjectUnionExplicit = _test_json_schemas({ + version: "3.0", + name: "ObjectUnionExplicit", +})(typia.json.schemas<[ObjectUnionExplicit], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionExplicitPointer.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..f7ce26f04f --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_json_schemas_v3_0_ObjectUnionExplicitPointer = + _test_json_schemas({ + version: "3.0", + name: "ObjectUnionExplicitPointer", + })(typia.json.schemas<[ObjectUnionExplicitPointer], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionImplicit.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..076ea9f00b --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_json_schemas_v3_0_ObjectUnionImplicit = _test_json_schemas({ + version: "3.0", + name: "ObjectUnionImplicit", +})(typia.json.schemas<[ObjectUnionImplicit], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionNonPredictable.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..7229d356cd --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ObjectUnionNonPredictable.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_json_schemas_v3_0_ObjectUnionNonPredictable = + _test_json_schemas({ + version: "3.0", + name: "ObjectUnionNonPredictable", + })(typia.json.schemas<[ObjectUnionNonPredictable], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateAtomic.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateAtomic.ts new file mode 100644 index 0000000000..cec597ce46 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_json_schemas_v3_0_TemplateAtomic = _test_json_schemas({ + version: "3.0", + name: "TemplateAtomic", +})(typia.json.schemas<[TemplateAtomic], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateConstant.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateConstant.ts new file mode 100644 index 0000000000..f7de0bfe8f --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_json_schemas_v3_0_TemplateConstant = _test_json_schemas({ + version: "3.0", + name: "TemplateConstant", +})(typia.json.schemas<[TemplateConstant], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateUnion.ts new file mode 100644 index 0000000000..93974b860e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_json_schemas_v3_0_TemplateUnion = _test_json_schemas({ + version: "3.0", + name: "TemplateUnion", +})(typia.json.schemas<[TemplateUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonArray.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonArray.ts new file mode 100644 index 0000000000..1d3ee66dc0 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonArray } from "../../../structures/ToJsonArray"; + +export const test_json_schemas_v3_0_ToJsonArray = _test_json_schemas({ + version: "3.0", + name: "ToJsonArray", +})(typia.json.schemas<[ToJsonArray], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonAtomicSimple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonAtomicSimple.ts new file mode 100644 index 0000000000..78a93c06a8 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonAtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonAtomicSimple } from "../../../structures/ToJsonAtomicSimple"; + +export const test_json_schemas_v3_0_ToJsonAtomicSimple = _test_json_schemas({ + version: "3.0", + name: "ToJsonAtomicSimple", +})(typia.json.schemas<[ToJsonAtomicSimple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonAtomicUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..62198f014c --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_json_schemas_v3_0_ToJsonAtomicUnion = _test_json_schemas({ + version: "3.0", + name: "ToJsonAtomicUnion", +})(typia.json.schemas<[ToJsonAtomicUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonDouble.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonDouble.ts new file mode 100644 index 0000000000..aadc96f561 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_json_schemas_v3_0_ToJsonDouble = _test_json_schemas({ + version: "3.0", + name: "ToJsonDouble", +})(typia.json.schemas<[ToJsonDouble], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonNull.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonNull.ts new file mode 100644 index 0000000000..1cb42eaa8c --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_json_schemas_v3_0_ToJsonNull = _test_json_schemas({ + version: "3.0", + name: "ToJsonNull", +})(typia.json.schemas<[ToJsonNull], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonTuple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonTuple.ts new file mode 100644 index 0000000000..2cc25a2143 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonTuple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonTuple } from "../../../structures/ToJsonTuple"; + +export const test_json_schemas_v3_0_ToJsonTuple = _test_json_schemas({ + version: "3.0", + name: "ToJsonTuple", +})(typia.json.schemas<[ToJsonTuple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonUnion.ts new file mode 100644 index 0000000000..8cac045253 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_json_schemas_v3_0_ToJsonUnion = _test_json_schemas({ + version: "3.0", + name: "ToJsonUnion", +})(typia.json.schemas<[ToJsonUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleHierarchical.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleHierarchical.ts new file mode 100644 index 0000000000..31dba5cc86 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleHierarchical } from "../../../structures/TupleHierarchical"; + +export const test_json_schemas_v3_0_TupleHierarchical = _test_json_schemas({ + version: "3.0", + name: "TupleHierarchical", +})(typia.json.schemas<[TupleHierarchical], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestArray.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestArray.ts new file mode 100644 index 0000000000..07dafed538 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleRestArray } from "../../../structures/TupleRestArray"; + +export const test_json_schemas_v3_0_TupleRestArray = _test_json_schemas({ + version: "3.0", + name: "TupleRestArray", +})(typia.json.schemas<[TupleRestArray], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestAtomic.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestAtomic.ts new file mode 100644 index 0000000000..1615126b3e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleRestAtomic } from "../../../structures/TupleRestAtomic"; + +export const test_json_schemas_v3_0_TupleRestAtomic = _test_json_schemas({ + version: "3.0", + name: "TupleRestAtomic", +})(typia.json.schemas<[TupleRestAtomic], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestObject.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestObject.ts new file mode 100644 index 0000000000..0df245cfc5 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TupleRestObject.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleRestObject } from "../../../structures/TupleRestObject"; + +export const test_json_schemas_v3_0_TupleRestObject = _test_json_schemas({ + version: "3.0", + name: "TupleRestObject", +})(typia.json.schemas<[TupleRestObject], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagArray.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagArray.ts new file mode 100644 index 0000000000..9711e475a2 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_json_schemas_v3_0_TypeTagArray = _test_json_schemas({ + version: "3.0", + name: "TypeTagArray", +})(typia.json.schemas<[TypeTagArray], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagArrayUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..083997e4c7 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_json_schemas_v3_0_TypeTagArrayUnion = _test_json_schemas({ + version: "3.0", + name: "TypeTagArrayUnion", +})(typia.json.schemas<[TypeTagArrayUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagAtomicUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..7666f76c0e --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_json_schemas_v3_0_TypeTagAtomicUnion = _test_json_schemas({ + version: "3.0", + name: "TypeTagAtomicUnion", +})(typia.json.schemas<[TypeTagAtomicUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagCustom.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagCustom.ts new file mode 100644 index 0000000000..0c3d7984e9 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_json_schemas_v3_0_TypeTagCustom = _test_json_schemas({ + version: "3.0", + name: "TypeTagCustom", +})(typia.json.schemas<[TypeTagCustom], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagDefault.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagDefault.ts new file mode 100644 index 0000000000..bdf759772d --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_json_schemas_v3_0_TypeTagDefault = _test_json_schemas({ + version: "3.0", + name: "TypeTagDefault", +})(typia.json.schemas<[TypeTagDefault], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagFormat.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagFormat.ts new file mode 100644 index 0000000000..c70cab3f3a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_json_schemas_v3_0_TypeTagFormat = _test_json_schemas({ + version: "3.0", + name: "TypeTagFormat", +})(typia.json.schemas<[TypeTagFormat], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagLength.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagLength.ts new file mode 100644 index 0000000000..f9a8ad888a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_json_schemas_v3_0_TypeTagLength = _test_json_schemas({ + version: "3.0", + name: "TypeTagLength", +})(typia.json.schemas<[TypeTagLength], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagMatrix.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagMatrix.ts new file mode 100644 index 0000000000..4b718f8187 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_json_schemas_v3_0_TypeTagMatrix = _test_json_schemas({ + version: "3.0", + name: "TypeTagMatrix", +})(typia.json.schemas<[TypeTagMatrix], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagObjectUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..356f6d52cd --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_json_schemas_v3_0_TypeTagObjectUnion = _test_json_schemas({ + version: "3.0", + name: "TypeTagObjectUnion", +})(typia.json.schemas<[TypeTagObjectUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagPattern.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagPattern.ts new file mode 100644 index 0000000000..7a6df9ab52 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_json_schemas_v3_0_TypeTagPattern = _test_json_schemas({ + version: "3.0", + name: "TypeTagPattern", +})(typia.json.schemas<[TypeTagPattern], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagRange.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagRange.ts new file mode 100644 index 0000000000..421a900de2 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_json_schemas_v3_0_TypeTagRange = _test_json_schemas({ + version: "3.0", + name: "TypeTagRange", +})(typia.json.schemas<[TypeTagRange], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagTuple.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagTuple.ts new file mode 100644 index 0000000000..d86188081a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagTuple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagTuple } from "../../../structures/TypeTagTuple"; + +export const test_json_schemas_v3_0_TypeTagTuple = _test_json_schemas({ + version: "3.0", + name: "TypeTagTuple", +})(typia.json.schemas<[TypeTagTuple], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagType.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagType.ts new file mode 100644 index 0000000000..2663df936a --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_json_schemas_v3_0_TypeTagType = _test_json_schemas({ + version: "3.0", + name: "TypeTagType", +})(typia.json.schemas<[TypeTagType], "3.0">()); diff --git a/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_UltimateUnion.ts b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_UltimateUnion.ts new file mode 100644 index 0000000000..1fa49e8ba9 --- /dev/null +++ b/test/src/features/json.schemas/v3_0/test_json_schemas_v3_0_UltimateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { UltimateUnion } from "../../../structures/UltimateUnion"; + +export const test_json_schemas_v3_0_UltimateUnion = _test_json_schemas({ + version: "3.0", + name: "UltimateUnion", +})(typia.json.schemas<[UltimateUnion], "3.0">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAny.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAny.ts new file mode 100644 index 0000000000..2ca3d9c56f --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_json_schemas_v3_1_ArrayAny = _test_json_schemas({ + version: "3.1", + name: "ArrayAny", +})(typia.json.schemas<[ArrayAny], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAtomicAlias.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAtomicAlias.ts new file mode 100644 index 0000000000..cbb02eb8ee --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAtomicAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayAtomicAlias } from "../../../structures/ArrayAtomicAlias"; + +export const test_json_schemas_v3_1_ArrayAtomicAlias = _test_json_schemas({ + version: "3.1", + name: "ArrayAtomicAlias", +})(typia.json.schemas<[ArrayAtomicAlias], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAtomicSimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAtomicSimple.ts new file mode 100644 index 0000000000..aefe978060 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayAtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayAtomicSimple } from "../../../structures/ArrayAtomicSimple"; + +export const test_json_schemas_v3_1_ArrayAtomicSimple = _test_json_schemas({ + version: "3.1", + name: "ArrayAtomicSimple", +})(typia.json.schemas<[ArrayAtomicSimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayHierarchical.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayHierarchical.ts new file mode 100644 index 0000000000..0cfb36e8f4 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_json_schemas_v3_1_ArrayHierarchical = _test_json_schemas({ + version: "3.1", + name: "ArrayHierarchical", +})(typia.json.schemas<[ArrayHierarchical], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayHierarchicalPointer.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..7027b596a1 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayHierarchicalPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_json_schemas_v3_1_ArrayHierarchicalPointer = + _test_json_schemas({ + version: "3.1", + name: "ArrayHierarchicalPointer", + })(typia.json.schemas<[ArrayHierarchicalPointer], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayMatrix.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayMatrix.ts new file mode 100644 index 0000000000..ea6fcf5298 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_json_schemas_v3_1_ArrayMatrix = _test_json_schemas({ + version: "3.1", + name: "ArrayMatrix", +})(typia.json.schemas<[ArrayMatrix], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursive.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursive.ts new file mode 100644 index 0000000000..d12570f6eb --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_json_schemas_v3_1_ArrayRecursive = _test_json_schemas({ + version: "3.1", + name: "ArrayRecursive", +})(typia.json.schemas<[ArrayRecursive], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionExplicit.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..b0f76dff0c --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_json_schemas_v3_1_ArrayRecursiveUnionExplicit = + _test_json_schemas({ + version: "3.1", + name: "ArrayRecursiveUnionExplicit", + })(typia.json.schemas<[ArrayRecursiveUnionExplicit], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..e975c2fb79 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_json_schemas_v3_1_ArrayRecursiveUnionExplicitPointer = + _test_json_schemas({ + version: "3.1", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.json.schemas<[ArrayRecursiveUnionExplicitPointer], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionImplicit.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..9190cdecde --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_json_schemas_v3_1_ArrayRecursiveUnionImplicit = + _test_json_schemas({ + version: "3.1", + name: "ArrayRecursiveUnionImplicit", + })(typia.json.schemas<[ArrayRecursiveUnionImplicit], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedNullable.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..b190af2f83 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_json_schemas_v3_1_ArrayRepeatedNullable = _test_json_schemas({ + version: "3.1", + name: "ArrayRepeatedNullable", +})(typia.json.schemas<[ArrayRepeatedNullable], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedRequired.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..69ec0c6abe --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_json_schemas_v3_1_ArrayRepeatedRequired = _test_json_schemas({ + version: "3.1", + name: "ArrayRepeatedRequired", +})(typia.json.schemas<[ArrayRepeatedRequired], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..8abf20c9d4 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_json_schemas_v3_1_ArrayRepeatedUnion = _test_json_schemas({ + version: "3.1", + name: "ArrayRepeatedUnion", +})(typia.json.schemas<[ArrayRepeatedUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedUnionWithTuple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedUnionWithTuple.ts new file mode 100644 index 0000000000..0b33a352d3 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayRepeatedUnionWithTuple.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayRepeatedUnionWithTuple } from "../../../structures/ArrayRepeatedUnionWithTuple"; + +export const test_json_schemas_v3_1_ArrayRepeatedUnionWithTuple = + _test_json_schemas({ + version: "3.1", + name: "ArrayRepeatedUnionWithTuple", + })(typia.json.schemas<[ArrayRepeatedUnionWithTuple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArraySimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArraySimple.ts new file mode 100644 index 0000000000..3b03cc6220 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_json_schemas_v3_1_ArraySimple = _test_json_schemas({ + version: "3.1", + name: "ArraySimple", +})(typia.json.schemas<[ArraySimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayUnion.ts new file mode 100644 index 0000000000..dd7fd1886b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_json_schemas_v3_1_ArrayUnion = _test_json_schemas({ + version: "3.1", + name: "ArrayUnion", +})(typia.json.schemas<[ArrayUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicAlias.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicAlias.ts new file mode 100644 index 0000000000..e39dbc2d83 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicAlias } from "../../../structures/AtomicAlias"; + +export const test_json_schemas_v3_1_AtomicAlias = _test_json_schemas({ + version: "3.1", + name: "AtomicAlias", +})(typia.json.schemas<[AtomicAlias], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicClass.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicClass.ts new file mode 100644 index 0000000000..57fdf1a95b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicClass.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicClass } from "../../../structures/AtomicClass"; + +export const test_json_schemas_v3_1_AtomicClass = _test_json_schemas({ + version: "3.1", + name: "AtomicClass", +})(typia.json.schemas<[AtomicClass], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicIntersection.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicIntersection.ts new file mode 100644 index 0000000000..b6a83dda22 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicIntersection } from "../../../structures/AtomicIntersection"; + +export const test_json_schemas_v3_1_AtomicIntersection = _test_json_schemas({ + version: "3.1", + name: "AtomicIntersection", +})(typia.json.schemas<[AtomicIntersection], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicSimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicSimple.ts new file mode 100644 index 0000000000..df1b62042b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicSimple } from "../../../structures/AtomicSimple"; + +export const test_json_schemas_v3_1_AtomicSimple = _test_json_schemas({ + version: "3.1", + name: "AtomicSimple", +})(typia.json.schemas<[AtomicSimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicUnion.ts new file mode 100644 index 0000000000..47db5a2e47 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_json_schemas_v3_1_AtomicUnion = _test_json_schemas({ + version: "3.1", + name: "AtomicUnion", +})(typia.json.schemas<[AtomicUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassGetter.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassGetter.ts new file mode 100644 index 0000000000..aae575e42c --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_json_schemas_v3_1_ClassGetter = _test_json_schemas({ + version: "3.1", + name: "ClassGetter", +})(typia.json.schemas<[ClassGetter], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassMethod.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassMethod.ts new file mode 100644 index 0000000000..ecd356bb91 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_json_schemas_v3_1_ClassMethod = _test_json_schemas({ + version: "3.1", + name: "ClassMethod", +})(typia.json.schemas<[ClassMethod], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassPropertyAssignment.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..864e1611b9 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ClassPropertyAssignment.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_json_schemas_v3_1_ClassPropertyAssignment = + _test_json_schemas({ + version: "3.1", + name: "ClassPropertyAssignment", + })(typia.json.schemas<[ClassPropertyAssignment], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagArray.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagArray.ts new file mode 100644 index 0000000000..042e7578bf --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_json_schemas_v3_1_CommentTagArray = _test_json_schemas({ + version: "3.1", + name: "CommentTagArray", +})(typia.json.schemas<[CommentTagArray], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagArrayUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..abac9b0466 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_json_schemas_v3_1_CommentTagArrayUnion = _test_json_schemas({ + version: "3.1", + name: "CommentTagArrayUnion", +})(typia.json.schemas<[CommentTagArrayUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagAtomicUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..8788d5fd85 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_json_schemas_v3_1_CommentTagAtomicUnion = _test_json_schemas({ + version: "3.1", + name: "CommentTagAtomicUnion", +})(typia.json.schemas<[CommentTagAtomicUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagDefault.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagDefault.ts new file mode 100644 index 0000000000..5327acea3d --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_json_schemas_v3_1_CommentTagDefault = _test_json_schemas({ + version: "3.1", + name: "CommentTagDefault", +})(typia.json.schemas<[CommentTagDefault], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagFormat.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagFormat.ts new file mode 100644 index 0000000000..24ee08067e --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_json_schemas_v3_1_CommentTagFormat = _test_json_schemas({ + version: "3.1", + name: "CommentTagFormat", +})(typia.json.schemas<[CommentTagFormat], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagLength.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagLength.ts new file mode 100644 index 0000000000..52c7f79c93 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_json_schemas_v3_1_CommentTagLength = _test_json_schemas({ + version: "3.1", + name: "CommentTagLength", +})(typia.json.schemas<[CommentTagLength], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagObjectUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..d40bf13ab7 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_json_schemas_v3_1_CommentTagObjectUnion = _test_json_schemas({ + version: "3.1", + name: "CommentTagObjectUnion", +})(typia.json.schemas<[CommentTagObjectUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagPattern.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagPattern.ts new file mode 100644 index 0000000000..851975a49d --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_json_schemas_v3_1_CommentTagPattern = _test_json_schemas({ + version: "3.1", + name: "CommentTagPattern", +})(typia.json.schemas<[CommentTagPattern], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagRange.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagRange.ts new file mode 100644 index 0000000000..9394f4d68e --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_json_schemas_v3_1_CommentTagRange = _test_json_schemas({ + version: "3.1", + name: "CommentTagRange", +})(typia.json.schemas<[CommentTagRange], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagType.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagType.ts new file mode 100644 index 0000000000..bdf29bffeb --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_json_schemas_v3_1_CommentTagType = _test_json_schemas({ + version: "3.1", + name: "CommentTagType", +})(typia.json.schemas<[CommentTagType], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicAbsorbed.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..a53f44fe14 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicAbsorbed.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_json_schemas_v3_1_ConstantAtomicAbsorbed = _test_json_schemas( + { + version: "3.1", + name: "ConstantAtomicAbsorbed", + }, +)(typia.json.schemas<[ConstantAtomicAbsorbed], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicSimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicSimple.ts new file mode 100644 index 0000000000..c5b82e8f9b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicSimple } from "../../../structures/ConstantAtomicSimple"; + +export const test_json_schemas_v3_1_ConstantAtomicSimple = _test_json_schemas({ + version: "3.1", + name: "ConstantAtomicSimple", +})(typia.json.schemas<[ConstantAtomicSimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicTagged.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..4cb7f94a31 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_json_schemas_v3_1_ConstantAtomicTagged = _test_json_schemas({ + version: "3.1", + name: "ConstantAtomicTagged", +})(typia.json.schemas<[ConstantAtomicTagged], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..b9077b86ef --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_json_schemas_v3_1_ConstantAtomicUnion = _test_json_schemas({ + version: "3.1", + name: "ConstantAtomicUnion", +})(typia.json.schemas<[ConstantAtomicUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicWrapper.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicWrapper.ts new file mode 100644 index 0000000000..de8580e39a --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantAtomicWrapper.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantAtomicWrapper } from "../../../structures/ConstantAtomicWrapper"; + +export const test_json_schemas_v3_1_ConstantAtomicWrapper = _test_json_schemas({ + version: "3.1", + name: "ConstantAtomicWrapper", +})(typia.json.schemas<[ConstantAtomicWrapper], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantConstEnumeration.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..54c5e138ad --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantConstEnumeration.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_json_schemas_v3_1_ConstantConstEnumeration = + _test_json_schemas({ + version: "3.1", + name: "ConstantConstEnumeration", + })(typia.json.schemas<[ConstantConstEnumeration], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantEnumeration.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantEnumeration.ts new file mode 100644 index 0000000000..e350391b01 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_json_schemas_v3_1_ConstantEnumeration = _test_json_schemas({ + version: "3.1", + name: "ConstantEnumeration", +})(typia.json.schemas<[ConstantEnumeration], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantIntersection.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantIntersection.ts new file mode 100644 index 0000000000..6df4bf2be2 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ConstantIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ConstantIntersection } from "../../../structures/ConstantIntersection"; + +export const test_json_schemas_v3_1_ConstantIntersection = _test_json_schemas({ + version: "3.1", + name: "ConstantIntersection", +})(typia.json.schemas<[ConstantIntersection], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicArray.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicArray.ts new file mode 100644 index 0000000000..11cad263be --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_json_schemas_v3_1_DynamicArray = _test_json_schemas({ + version: "3.1", + name: "DynamicArray", +})(typia.json.schemas<[DynamicArray], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicComposite.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicComposite.ts new file mode 100644 index 0000000000..a9e9ad9610 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_json_schemas_v3_1_DynamicComposite = _test_json_schemas({ + version: "3.1", + name: "DynamicComposite", +})(typia.json.schemas<[DynamicComposite], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicConstant.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicConstant.ts new file mode 100644 index 0000000000..a4b9a0d4a5 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_json_schemas_v3_1_DynamicConstant = _test_json_schemas({ + version: "3.1", + name: "DynamicConstant", +})(typia.json.schemas<[DynamicConstant], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicEnumeration.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicEnumeration.ts new file mode 100644 index 0000000000..cac03719d8 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_json_schemas_v3_1_DynamicEnumeration = _test_json_schemas({ + version: "3.1", + name: "DynamicEnumeration", +})(typia.json.schemas<[DynamicEnumeration], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicNever.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicNever.ts new file mode 100644 index 0000000000..d87e780582 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_json_schemas_v3_1_DynamicNever = _test_json_schemas({ + version: "3.1", + name: "DynamicNever", +})(typia.json.schemas<[DynamicNever], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicSimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicSimple.ts new file mode 100644 index 0000000000..6450639869 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_json_schemas_v3_1_DynamicSimple = _test_json_schemas({ + version: "3.1", + name: "DynamicSimple", +})(typia.json.schemas<[DynamicSimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicTemplate.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicTemplate.ts new file mode 100644 index 0000000000..620a51d6b0 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicTemplate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_json_schemas_v3_1_DynamicTemplate = _test_json_schemas({ + version: "3.1", + name: "DynamicTemplate", +})(typia.json.schemas<[DynamicTemplate], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicTree.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicTree.ts new file mode 100644 index 0000000000..5c54335c2e --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicTree.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_json_schemas_v3_1_DynamicTree = _test_json_schemas({ + version: "3.1", + name: "DynamicTree", +})(typia.json.schemas<[DynamicTree], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicUndefined.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicUndefined.ts new file mode 100644 index 0000000000..7ea340aebf --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_json_schemas_v3_1_DynamicUndefined = _test_json_schemas({ + version: "3.1", + name: "DynamicUndefined", +})(typia.json.schemas<[DynamicUndefined], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicUnion.ts new file mode 100644 index 0000000000..13a4681fb8 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_DynamicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_json_schemas_v3_1_DynamicUnion = _test_json_schemas({ + version: "3.1", + name: "DynamicUnion", +})(typia.json.schemas<[DynamicUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectAlias.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectAlias.ts new file mode 100644 index 0000000000..d461b9c495 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_json_schemas_v3_1_ObjectAlias = _test_json_schemas({ + version: "3.1", + name: "ObjectAlias", +})(typia.json.schemas<[ObjectAlias], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDate.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDate.ts new file mode 100644 index 0000000000..1e662dcacb --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_json_schemas_v3_1_ObjectDate = _test_json_schemas({ + version: "3.1", + name: "ObjectDate", +})(typia.json.schemas<[ObjectDate], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDescription.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDescription.ts new file mode 100644 index 0000000000..d9dc12d9ef --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_json_schemas_v3_1_ObjectDescription = _test_json_schemas({ + version: "3.1", + name: "ObjectDescription", +})(typia.json.schemas<[ObjectDescription], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDynamic.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDynamic.ts new file mode 100644 index 0000000000..6cf46cd07d --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectDynamic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_json_schemas_v3_1_ObjectDynamic = _test_json_schemas({ + version: "3.1", + name: "ObjectDynamic", +})(typia.json.schemas<[ObjectDynamic], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGeneric.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGeneric.ts new file mode 100644 index 0000000000..08391d8fdf --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGeneric.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGeneric } from "../../../structures/ObjectGeneric"; + +export const test_json_schemas_v3_1_ObjectGeneric = _test_json_schemas({ + version: "3.1", + name: "ObjectGeneric", +})(typia.json.schemas<[ObjectGeneric], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericAlias.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericAlias.ts new file mode 100644 index 0000000000..5fd8f83972 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_json_schemas_v3_1_ObjectGenericAlias = _test_json_schemas({ + version: "3.1", + name: "ObjectGenericAlias", +})(typia.json.schemas<[ObjectGenericAlias], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericArray.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericArray.ts new file mode 100644 index 0000000000..372b18abcb --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_json_schemas_v3_1_ObjectGenericArray = _test_json_schemas({ + version: "3.1", + name: "ObjectGenericArray", +})(typia.json.schemas<[ObjectGenericArray], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericUnion.ts new file mode 100644 index 0000000000..7061035ad7 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_json_schemas_v3_1_ObjectGenericUnion = _test_json_schemas({ + version: "3.1", + name: "ObjectGenericUnion", +})(typia.json.schemas<[ObjectGenericUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectHierarchical.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectHierarchical.ts new file mode 100644 index 0000000000..13726a0d92 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectHierarchical } from "../../../structures/ObjectHierarchical"; + +export const test_json_schemas_v3_1_ObjectHierarchical = _test_json_schemas({ + version: "3.1", + name: "ObjectHierarchical", +})(typia.json.schemas<[ObjectHierarchical], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectInternal.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectInternal.ts new file mode 100644 index 0000000000..18038657f4 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_json_schemas_v3_1_ObjectInternal = _test_json_schemas({ + version: "3.1", + name: "ObjectInternal", +})(typia.json.schemas<[ObjectInternal], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectIntersection.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectIntersection.ts new file mode 100644 index 0000000000..19d038e3bb --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_json_schemas_v3_1_ObjectIntersection = _test_json_schemas({ + version: "3.1", + name: "ObjectIntersection", +})(typia.json.schemas<[ObjectIntersection], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectJsonTag.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectJsonTag.ts new file mode 100644 index 0000000000..7a98d6d5ad --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_json_schemas_v3_1_ObjectJsonTag = _test_json_schemas({ + version: "3.1", + name: "ObjectJsonTag", +})(typia.json.schemas<[ObjectJsonTag], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectLiteralProperty.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..2edc77dfe9 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_json_schemas_v3_1_ObjectLiteralProperty = _test_json_schemas({ + version: "3.1", + name: "ObjectLiteralProperty", +})(typia.json.schemas<[ObjectLiteralProperty], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectLiteralType.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectLiteralType.ts new file mode 100644 index 0000000000..f722211bc2 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_json_schemas_v3_1_ObjectLiteralType = _test_json_schemas({ + version: "3.1", + name: "ObjectLiteralType", +})(typia.json.schemas<[ObjectLiteralType], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectNullable.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectNullable.ts new file mode 100644 index 0000000000..becef3ce1c --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_json_schemas_v3_1_ObjectNullable = _test_json_schemas({ + version: "3.1", + name: "ObjectNullable", +})(typia.json.schemas<[ObjectNullable], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectOptional.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectOptional.ts new file mode 100644 index 0000000000..bae49367a2 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_json_schemas_v3_1_ObjectOptional = _test_json_schemas({ + version: "3.1", + name: "ObjectOptional", +})(typia.json.schemas<[ObjectOptional], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPartial.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPartial.ts new file mode 100644 index 0000000000..7b06b28717 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_json_schemas_v3_1_ObjectPartial = _test_json_schemas({ + version: "3.1", + name: "ObjectPartial", +})(typia.json.schemas<[ObjectPartial], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPartialAndRequired.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..084ba1d113 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPartialAndRequired.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_json_schemas_v3_1_ObjectPartialAndRequired = + _test_json_schemas({ + version: "3.1", + name: "ObjectPartialAndRequired", + })(typia.json.schemas<[ObjectPartialAndRequired], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPrimitive.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPrimitive.ts new file mode 100644 index 0000000000..4d3e2b4017 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_json_schemas_v3_1_ObjectPrimitive = _test_json_schemas({ + version: "3.1", + name: "ObjectPrimitive", +})(typia.json.schemas<[ObjectPrimitive], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPropertyNullable.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPropertyNullable.ts new file mode 100644 index 0000000000..a4c0511759 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectPropertyNullable.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectPropertyNullable } from "../../../structures/ObjectPropertyNullable"; + +export const test_json_schemas_v3_1_ObjectPropertyNullable = _test_json_schemas( + { + version: "3.1", + name: "ObjectPropertyNullable", + }, +)(typia.json.schemas<[ObjectPropertyNullable], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectRecursive.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectRecursive.ts new file mode 100644 index 0000000000..10ffe8ae7a --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_json_schemas_v3_1_ObjectRecursive = _test_json_schemas({ + version: "3.1", + name: "ObjectRecursive", +})(typia.json.schemas<[ObjectRecursive], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectRequired.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectRequired.ts new file mode 100644 index 0000000000..e5883b3199 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_json_schemas_v3_1_ObjectRequired = _test_json_schemas({ + version: "3.1", + name: "ObjectRequired", +})(typia.json.schemas<[ObjectRequired], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectSimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectSimple.ts new file mode 100644 index 0000000000..2947b4f970 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_json_schemas_v3_1_ObjectSimple = _test_json_schemas({ + version: "3.1", + name: "ObjectSimple", +})(typia.json.schemas<[ObjectSimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectTuple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectTuple.ts new file mode 100644 index 0000000000..09c3ee8270 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectTuple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectTuple } from "../../../structures/ObjectTuple"; + +export const test_json_schemas_v3_1_ObjectTuple = _test_json_schemas({ + version: "3.1", + name: "ObjectTuple", +})(typia.json.schemas<[ObjectTuple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUndefined.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUndefined.ts new file mode 100644 index 0000000000..4880656def --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_json_schemas_v3_1_ObjectUndefined = _test_json_schemas({ + version: "3.1", + name: "ObjectUndefined", +})(typia.json.schemas<[ObjectUndefined], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionComposite.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionComposite.ts new file mode 100644 index 0000000000..5666edb52f --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_json_schemas_v3_1_ObjectUnionComposite = _test_json_schemas({ + version: "3.1", + name: "ObjectUnionComposite", +})(typia.json.schemas<[ObjectUnionComposite], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionCompositePointer.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..2a1924b5c5 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionCompositePointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_json_schemas_v3_1_ObjectUnionCompositePointer = + _test_json_schemas({ + version: "3.1", + name: "ObjectUnionCompositePointer", + })(typia.json.schemas<[ObjectUnionCompositePointer], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionDouble.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionDouble.ts new file mode 100644 index 0000000000..8d115f9c6b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_json_schemas_v3_1_ObjectUnionDouble = _test_json_schemas({ + version: "3.1", + name: "ObjectUnionDouble", +})(typia.json.schemas<[ObjectUnionDouble], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionExplicit.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..e3f5ed93e3 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_json_schemas_v3_1_ObjectUnionExplicit = _test_json_schemas({ + version: "3.1", + name: "ObjectUnionExplicit", +})(typia.json.schemas<[ObjectUnionExplicit], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionExplicitPointer.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..9a1f3752f7 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_json_schemas_v3_1_ObjectUnionExplicitPointer = + _test_json_schemas({ + version: "3.1", + name: "ObjectUnionExplicitPointer", + })(typia.json.schemas<[ObjectUnionExplicitPointer], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionImplicit.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..e138b92441 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_json_schemas_v3_1_ObjectUnionImplicit = _test_json_schemas({ + version: "3.1", + name: "ObjectUnionImplicit", +})(typia.json.schemas<[ObjectUnionImplicit], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionNonPredictable.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..15755295ca --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ObjectUnionNonPredictable.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_json_schemas_v3_1_ObjectUnionNonPredictable = + _test_json_schemas({ + version: "3.1", + name: "ObjectUnionNonPredictable", + })(typia.json.schemas<[ObjectUnionNonPredictable], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateAtomic.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateAtomic.ts new file mode 100644 index 0000000000..8c3f0034ea --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_json_schemas_v3_1_TemplateAtomic = _test_json_schemas({ + version: "3.1", + name: "TemplateAtomic", +})(typia.json.schemas<[TemplateAtomic], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateConstant.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateConstant.ts new file mode 100644 index 0000000000..68511ad4b3 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_json_schemas_v3_1_TemplateConstant = _test_json_schemas({ + version: "3.1", + name: "TemplateConstant", +})(typia.json.schemas<[TemplateConstant], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateUnion.ts new file mode 100644 index 0000000000..95a385838e --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_json_schemas_v3_1_TemplateUnion = _test_json_schemas({ + version: "3.1", + name: "TemplateUnion", +})(typia.json.schemas<[TemplateUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonArray.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonArray.ts new file mode 100644 index 0000000000..a9d7ca5df3 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonArray } from "../../../structures/ToJsonArray"; + +export const test_json_schemas_v3_1_ToJsonArray = _test_json_schemas({ + version: "3.1", + name: "ToJsonArray", +})(typia.json.schemas<[ToJsonArray], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonAtomicSimple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonAtomicSimple.ts new file mode 100644 index 0000000000..01964c8318 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonAtomicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonAtomicSimple } from "../../../structures/ToJsonAtomicSimple"; + +export const test_json_schemas_v3_1_ToJsonAtomicSimple = _test_json_schemas({ + version: "3.1", + name: "ToJsonAtomicSimple", +})(typia.json.schemas<[ToJsonAtomicSimple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonAtomicUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..fb6570e9b4 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_json_schemas_v3_1_ToJsonAtomicUnion = _test_json_schemas({ + version: "3.1", + name: "ToJsonAtomicUnion", +})(typia.json.schemas<[ToJsonAtomicUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonDouble.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonDouble.ts new file mode 100644 index 0000000000..622a1da78a --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_json_schemas_v3_1_ToJsonDouble = _test_json_schemas({ + version: "3.1", + name: "ToJsonDouble", +})(typia.json.schemas<[ToJsonDouble], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonNull.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonNull.ts new file mode 100644 index 0000000000..0bac9c8a75 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_json_schemas_v3_1_ToJsonNull = _test_json_schemas({ + version: "3.1", + name: "ToJsonNull", +})(typia.json.schemas<[ToJsonNull], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonTuple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonTuple.ts new file mode 100644 index 0000000000..1bef8f407c --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonTuple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonTuple } from "../../../structures/ToJsonTuple"; + +export const test_json_schemas_v3_1_ToJsonTuple = _test_json_schemas({ + version: "3.1", + name: "ToJsonTuple", +})(typia.json.schemas<[ToJsonTuple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonUnion.ts new file mode 100644 index 0000000000..77ff56067b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_json_schemas_v3_1_ToJsonUnion = _test_json_schemas({ + version: "3.1", + name: "ToJsonUnion", +})(typia.json.schemas<[ToJsonUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleHierarchical.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleHierarchical.ts new file mode 100644 index 0000000000..1b93c9aca8 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleHierarchical } from "../../../structures/TupleHierarchical"; + +export const test_json_schemas_v3_1_TupleHierarchical = _test_json_schemas({ + version: "3.1", + name: "TupleHierarchical", +})(typia.json.schemas<[TupleHierarchical], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestArray.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestArray.ts new file mode 100644 index 0000000000..00e396a284 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleRestArray } from "../../../structures/TupleRestArray"; + +export const test_json_schemas_v3_1_TupleRestArray = _test_json_schemas({ + version: "3.1", + name: "TupleRestArray", +})(typia.json.schemas<[TupleRestArray], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestAtomic.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestAtomic.ts new file mode 100644 index 0000000000..f36a4769a2 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleRestAtomic } from "../../../structures/TupleRestAtomic"; + +export const test_json_schemas_v3_1_TupleRestAtomic = _test_json_schemas({ + version: "3.1", + name: "TupleRestAtomic", +})(typia.json.schemas<[TupleRestAtomic], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestObject.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestObject.ts new file mode 100644 index 0000000000..5a65dea583 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TupleRestObject.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TupleRestObject } from "../../../structures/TupleRestObject"; + +export const test_json_schemas_v3_1_TupleRestObject = _test_json_schemas({ + version: "3.1", + name: "TupleRestObject", +})(typia.json.schemas<[TupleRestObject], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagArray.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagArray.ts new file mode 100644 index 0000000000..3244f528ec --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_json_schemas_v3_1_TypeTagArray = _test_json_schemas({ + version: "3.1", + name: "TypeTagArray", +})(typia.json.schemas<[TypeTagArray], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagArrayUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..8be28edcee --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_json_schemas_v3_1_TypeTagArrayUnion = _test_json_schemas({ + version: "3.1", + name: "TypeTagArrayUnion", +})(typia.json.schemas<[TypeTagArrayUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagAtomicUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..4533ed832b --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_json_schemas_v3_1_TypeTagAtomicUnion = _test_json_schemas({ + version: "3.1", + name: "TypeTagAtomicUnion", +})(typia.json.schemas<[TypeTagAtomicUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagCustom.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagCustom.ts new file mode 100644 index 0000000000..3f3595b398 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_json_schemas_v3_1_TypeTagCustom = _test_json_schemas({ + version: "3.1", + name: "TypeTagCustom", +})(typia.json.schemas<[TypeTagCustom], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagDefault.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagDefault.ts new file mode 100644 index 0000000000..6f6b5e4406 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_json_schemas_v3_1_TypeTagDefault = _test_json_schemas({ + version: "3.1", + name: "TypeTagDefault", +})(typia.json.schemas<[TypeTagDefault], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagFormat.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagFormat.ts new file mode 100644 index 0000000000..b08f908753 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_json_schemas_v3_1_TypeTagFormat = _test_json_schemas({ + version: "3.1", + name: "TypeTagFormat", +})(typia.json.schemas<[TypeTagFormat], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagLength.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagLength.ts new file mode 100644 index 0000000000..c4e23d22af --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_json_schemas_v3_1_TypeTagLength = _test_json_schemas({ + version: "3.1", + name: "TypeTagLength", +})(typia.json.schemas<[TypeTagLength], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagMatrix.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagMatrix.ts new file mode 100644 index 0000000000..ff44fe5d77 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_json_schemas_v3_1_TypeTagMatrix = _test_json_schemas({ + version: "3.1", + name: "TypeTagMatrix", +})(typia.json.schemas<[TypeTagMatrix], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagObjectUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..dab747ad78 --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_json_schemas_v3_1_TypeTagObjectUnion = _test_json_schemas({ + version: "3.1", + name: "TypeTagObjectUnion", +})(typia.json.schemas<[TypeTagObjectUnion], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagPattern.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagPattern.ts new file mode 100644 index 0000000000..104fb820ce --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_json_schemas_v3_1_TypeTagPattern = _test_json_schemas({ + version: "3.1", + name: "TypeTagPattern", +})(typia.json.schemas<[TypeTagPattern], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagRange.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagRange.ts new file mode 100644 index 0000000000..30ca0936cd --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_json_schemas_v3_1_TypeTagRange = _test_json_schemas({ + version: "3.1", + name: "TypeTagRange", +})(typia.json.schemas<[TypeTagRange], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagTuple.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagTuple.ts new file mode 100644 index 0000000000..61b4fe071e --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagTuple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagTuple } from "../../../structures/TypeTagTuple"; + +export const test_json_schemas_v3_1_TypeTagTuple = _test_json_schemas({ + version: "3.1", + name: "TypeTagTuple", +})(typia.json.schemas<[TypeTagTuple], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagType.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagType.ts new file mode 100644 index 0000000000..ef802fd1ec --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_json_schemas_v3_1_TypeTagType = _test_json_schemas({ + version: "3.1", + name: "TypeTagType", +})(typia.json.schemas<[TypeTagType], "3.1">()); diff --git a/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_UltimateUnion.ts b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_UltimateUnion.ts new file mode 100644 index 0000000000..c9e4c909cc --- /dev/null +++ b/test/src/features/json.schemas/v3_1/test_json_schemas_v3_1_UltimateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_json_schemas } from "../../../internal/_test_json_schemas"; +import { UltimateUnion } from "../../../structures/UltimateUnion"; + +export const test_json_schemas_v3_1_UltimateUnion = _test_json_schemas({ + version: "3.1", + name: "UltimateUnion", +})(typia.json.schemas<[UltimateUnion], "3.1">()); diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayAny.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayAny.ts new file mode 100644 index 0000000000..e611ac24a3 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayAny.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_application_3_0_ArrayAny = _test_llm_application({ + model: "3.0", + name: "ArrayAny", +})(typia.llm.application()); + +interface ArrayAnyApplication { + insert(p: { first: ArrayAny }): Promise; + reduce(p: { first: ArrayAny; second: ArrayAny | null }): Promise; + coalesce(p: { + first: ArrayAny | null; + second: ArrayAny | null; + third?: ArrayAny | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayHierarchical.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayHierarchical.ts new file mode 100644 index 0000000000..be0ff6adac --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayHierarchical.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_application_3_0_ArrayHierarchical = _test_llm_application( + { + model: "3.0", + name: "ArrayHierarchical", + }, +)(typia.llm.application()); + +interface ArrayHierarchicalApplication { + insert(p: { first: ArrayHierarchical }): Promise; + reduce(p: { + first: ArrayHierarchical; + second: ArrayHierarchical | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchical | null; + second: ArrayHierarchical | null; + third?: ArrayHierarchical | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayHierarchicalPointer.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..1f2edada68 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayHierarchicalPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_application_3_0_ArrayHierarchicalPointer = + _test_llm_application({ + model: "3.0", + name: "ArrayHierarchicalPointer", + })(typia.llm.application()); + +interface ArrayHierarchicalPointerApplication { + insert(p: { first: ArrayHierarchicalPointer }): Promise; + reduce(p: { + first: ArrayHierarchicalPointer; + second: ArrayHierarchicalPointer | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchicalPointer | null; + second: ArrayHierarchicalPointer | null; + third?: ArrayHierarchicalPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayMatrix.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayMatrix.ts new file mode 100644 index 0000000000..0c5c6019c4 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_application_3_0_ArrayMatrix = _test_llm_application({ + model: "3.0", + name: "ArrayMatrix", +})(typia.llm.application()); + +interface ArrayMatrixApplication { + insert(p: { first: ArrayMatrix }): Promise; + reduce(p: { + first: ArrayMatrix; + second: ArrayMatrix | null; + }): Promise; + coalesce(p: { + first: ArrayMatrix | null; + second: ArrayMatrix | null; + third?: ArrayMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursive.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursive.ts new file mode 100644 index 0000000000..d4f552eef8 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_application_3_0_ArrayRecursive = _test_llm_application({ + model: "3.0", + name: "ArrayRecursive", +})(typia.llm.application()); + +interface ArrayRecursiveApplication { + insert(p: { first: ArrayRecursive }): Promise; + reduce(p: { + first: ArrayRecursive; + second: ArrayRecursive | null; + }): Promise; + coalesce(p: { + first: ArrayRecursive | null; + second: ArrayRecursive | null; + third?: ArrayRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..e346096318 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_application_3_0_ArrayRecursiveUnionExplicit = + _test_llm_application({ + model: "3.0", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionExplicitApplication { + insert(p: { first: ArrayRecursiveUnionExplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicit; + second: ArrayRecursiveUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicit | null; + second: ArrayRecursiveUnionExplicit | null; + third?: ArrayRecursiveUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..4f9064bd77 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,28 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_application_3_0_ArrayRecursiveUnionExplicitPointer = + _test_llm_application({ + model: "3.0", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.application< + ArrayRecursiveUnionExplicitPointerApplication, + "3.0" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerApplication { + insert(p: { first: ArrayRecursiveUnionExplicitPointer }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicitPointer; + second: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicitPointer | null; + second: ArrayRecursiveUnionExplicitPointer | null; + third?: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..2211dd0c68 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_application_3_0_ArrayRecursiveUnionImplicit = + _test_llm_application({ + model: "3.0", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionImplicitApplication { + insert(p: { first: ArrayRecursiveUnionImplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionImplicit; + second: ArrayRecursiveUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionImplicit | null; + second: ArrayRecursiveUnionImplicit | null; + third?: ArrayRecursiveUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedNullable.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..60d7cf6753 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedNullable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_application_3_0_ArrayRepeatedNullable = + _test_llm_application({ + model: "3.0", + name: "ArrayRepeatedNullable", + })(typia.llm.application()); + +interface ArrayRepeatedNullableApplication { + insert(p: { first: ArrayRepeatedNullable }): Promise; + reduce(p: { + first: ArrayRepeatedNullable; + second: ArrayRepeatedNullable | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedNullable | null; + second: ArrayRepeatedNullable | null; + third?: ArrayRepeatedNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedRequired.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..7ba39b5869 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_application_3_0_ArrayRepeatedRequired = + _test_llm_application({ + model: "3.0", + name: "ArrayRepeatedRequired", + })(typia.llm.application()); + +interface ArrayRepeatedRequiredApplication { + insert(p: { first: ArrayRepeatedRequired }): Promise; + reduce(p: { + first: ArrayRepeatedRequired; + second: ArrayRepeatedRequired | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedRequired | null; + second: ArrayRepeatedRequired | null; + third?: ArrayRepeatedRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..29dcc64d69 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayRepeatedUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_application_3_0_ArrayRepeatedUnion = + _test_llm_application({ + model: "3.0", + name: "ArrayRepeatedUnion", + })(typia.llm.application()); + +interface ArrayRepeatedUnionApplication { + insert(p: { first: ArrayRepeatedUnion }): Promise; + reduce(p: { + first: ArrayRepeatedUnion; + second: ArrayRepeatedUnion | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedUnion | null; + second: ArrayRepeatedUnion | null; + third?: ArrayRepeatedUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArraySimple.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArraySimple.ts new file mode 100644 index 0000000000..d4db435027 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArraySimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_application_3_0_ArraySimple = _test_llm_application({ + model: "3.0", + name: "ArraySimple", +})(typia.llm.application()); + +interface ArraySimpleApplication { + insert(p: { first: ArraySimple }): Promise; + reduce(p: { + first: ArraySimple; + second: ArraySimple | null; + }): Promise; + coalesce(p: { + first: ArraySimple | null; + second: ArraySimple | null; + third?: ArraySimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayUnion.ts new file mode 100644 index 0000000000..7ce4f9d170 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ArrayUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_application_3_0_ArrayUnion = _test_llm_application({ + model: "3.0", + name: "ArrayUnion", +})(typia.llm.application()); + +interface ArrayUnionApplication { + insert(p: { first: ArrayUnion }): Promise; + reduce(p: { + first: ArrayUnion; + second: ArrayUnion | null; + }): Promise; + coalesce(p: { + first: ArrayUnion | null; + second: ArrayUnion | null; + third?: ArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_AtomicUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_AtomicUnion.ts new file mode 100644 index 0000000000..8c0166e9e0 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_AtomicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_application_3_0_AtomicUnion = _test_llm_application({ + model: "3.0", + name: "AtomicUnion", +})(typia.llm.application()); + +interface AtomicUnionApplication { + insert(p: { first: AtomicUnion }): Promise; + reduce(p: { + first: AtomicUnion; + second: AtomicUnion | null; + }): Promise; + coalesce(p: { + first: AtomicUnion | null; + second: AtomicUnion | null; + third?: AtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassGetter.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassGetter.ts new file mode 100644 index 0000000000..93cc4b48c2 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassGetter.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_application_3_0_ClassGetter = _test_llm_application({ + model: "3.0", + name: "ClassGetter", +})(typia.llm.application()); + +interface ClassGetterApplication { + insert(p: { first: ClassGetter }): Promise; + reduce(p: { + first: ClassGetter; + second: ClassGetter | null; + }): Promise; + coalesce(p: { + first: ClassGetter | null; + second: ClassGetter | null; + third?: ClassGetter | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassMethod.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassMethod.ts new file mode 100644 index 0000000000..59f4285f70 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassMethod.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_application_3_0_ClassMethod = _test_llm_application({ + model: "3.0", + name: "ClassMethod", +})(typia.llm.application()); + +interface ClassMethodApplication { + insert(p: { first: ClassMethod }): Promise; + reduce(p: { + first: ClassMethod; + second: ClassMethod | null; + }): Promise; + coalesce(p: { + first: ClassMethod | null; + second: ClassMethod | null; + third?: ClassMethod | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassPropertyAssignment.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..93164479ff --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ClassPropertyAssignment.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_application_3_0_ClassPropertyAssignment = + _test_llm_application({ + model: "3.0", + name: "ClassPropertyAssignment", + })(typia.llm.application()); + +interface ClassPropertyAssignmentApplication { + insert(p: { first: ClassPropertyAssignment }): Promise; + reduce(p: { + first: ClassPropertyAssignment; + second: ClassPropertyAssignment | null; + }): Promise; + coalesce(p: { + first: ClassPropertyAssignment | null; + second: ClassPropertyAssignment | null; + third?: ClassPropertyAssignment | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagArray.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagArray.ts new file mode 100644 index 0000000000..51737451f8 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_application_3_0_CommentTagArray = _test_llm_application({ + model: "3.0", + name: "CommentTagArray", +})(typia.llm.application()); + +interface CommentTagArrayApplication { + insert(p: { first: CommentTagArray }): Promise; + reduce(p: { + first: CommentTagArray; + second: CommentTagArray | null; + }): Promise; + coalesce(p: { + first: CommentTagArray | null; + second: CommentTagArray | null; + third?: CommentTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagArrayUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..c7f1bcd4e9 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_application_3_0_CommentTagArrayUnion = + _test_llm_application({ + model: "3.0", + name: "CommentTagArrayUnion", + })(typia.llm.application()); + +interface CommentTagArrayUnionApplication { + insert(p: { first: CommentTagArrayUnion }): Promise; + reduce(p: { + first: CommentTagArrayUnion; + second: CommentTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagArrayUnion | null; + second: CommentTagArrayUnion | null; + third?: CommentTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagAtomicUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..3f818c72d4 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_application_3_0_CommentTagAtomicUnion = + _test_llm_application({ + model: "3.0", + name: "CommentTagAtomicUnion", + })(typia.llm.application()); + +interface CommentTagAtomicUnionApplication { + insert(p: { first: CommentTagAtomicUnion }): Promise; + reduce(p: { + first: CommentTagAtomicUnion; + second: CommentTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagAtomicUnion | null; + second: CommentTagAtomicUnion | null; + third?: CommentTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagDefault.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagDefault.ts new file mode 100644 index 0000000000..e7308ff2f0 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagDefault.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_application_3_0_CommentTagDefault = _test_llm_application( + { + model: "3.0", + name: "CommentTagDefault", + }, +)(typia.llm.application()); + +interface CommentTagDefaultApplication { + insert(p: { first: CommentTagDefault }): Promise; + reduce(p: { + first: CommentTagDefault; + second: CommentTagDefault | null; + }): Promise; + coalesce(p: { + first: CommentTagDefault | null; + second: CommentTagDefault | null; + third?: CommentTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagFormat.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagFormat.ts new file mode 100644 index 0000000000..597fa6775c --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_application_3_0_CommentTagFormat = _test_llm_application({ + model: "3.0", + name: "CommentTagFormat", +})(typia.llm.application()); + +interface CommentTagFormatApplication { + insert(p: { first: CommentTagFormat }): Promise; + reduce(p: { + first: CommentTagFormat; + second: CommentTagFormat | null; + }): Promise; + coalesce(p: { + first: CommentTagFormat | null; + second: CommentTagFormat | null; + third?: CommentTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagLength.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagLength.ts new file mode 100644 index 0000000000..f863081d2d --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_application_3_0_CommentTagLength = _test_llm_application({ + model: "3.0", + name: "CommentTagLength", +})(typia.llm.application()); + +interface CommentTagLengthApplication { + insert(p: { first: CommentTagLength }): Promise; + reduce(p: { + first: CommentTagLength; + second: CommentTagLength | null; + }): Promise; + coalesce(p: { + first: CommentTagLength | null; + second: CommentTagLength | null; + third?: CommentTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagObjectUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..49381593b5 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_application_3_0_CommentTagObjectUnion = + _test_llm_application({ + model: "3.0", + name: "CommentTagObjectUnion", + })(typia.llm.application()); + +interface CommentTagObjectUnionApplication { + insert(p: { first: CommentTagObjectUnion }): Promise; + reduce(p: { + first: CommentTagObjectUnion; + second: CommentTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagObjectUnion | null; + second: CommentTagObjectUnion | null; + third?: CommentTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagPattern.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagPattern.ts new file mode 100644 index 0000000000..4434825c04 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagPattern.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_application_3_0_CommentTagPattern = _test_llm_application( + { + model: "3.0", + name: "CommentTagPattern", + }, +)(typia.llm.application()); + +interface CommentTagPatternApplication { + insert(p: { first: CommentTagPattern }): Promise; + reduce(p: { + first: CommentTagPattern; + second: CommentTagPattern | null; + }): Promise; + coalesce(p: { + first: CommentTagPattern | null; + second: CommentTagPattern | null; + third?: CommentTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagRange.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagRange.ts new file mode 100644 index 0000000000..fb76c80f85 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_application_3_0_CommentTagRange = _test_llm_application({ + model: "3.0", + name: "CommentTagRange", +})(typia.llm.application()); + +interface CommentTagRangeApplication { + insert(p: { first: CommentTagRange }): Promise; + reduce(p: { + first: CommentTagRange; + second: CommentTagRange | null; + }): Promise; + coalesce(p: { + first: CommentTagRange | null; + second: CommentTagRange | null; + third?: CommentTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagType.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagType.ts new file mode 100644 index 0000000000..d0c86e4f88 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_CommentTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_application_3_0_CommentTagType = _test_llm_application({ + model: "3.0", + name: "CommentTagType", +})(typia.llm.application()); + +interface CommentTagTypeApplication { + insert(p: { first: CommentTagType }): Promise; + reduce(p: { + first: CommentTagType; + second: CommentTagType | null; + }): Promise; + coalesce(p: { + first: CommentTagType | null; + second: CommentTagType | null; + third?: CommentTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicAbsorbed.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..4f16abb3d5 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicAbsorbed.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_application_3_0_ConstantAtomicAbsorbed = + _test_llm_application({ + model: "3.0", + name: "ConstantAtomicAbsorbed", + })(typia.llm.application()); + +interface ConstantAtomicAbsorbedApplication { + insert(p: { first: ConstantAtomicAbsorbed }): Promise; + reduce(p: { + first: ConstantAtomicAbsorbed; + second: ConstantAtomicAbsorbed | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicAbsorbed | null; + second: ConstantAtomicAbsorbed | null; + third?: ConstantAtomicAbsorbed | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicTagged.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..fdcdc69229 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicTagged.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_application_3_0_ConstantAtomicTagged = + _test_llm_application({ + model: "3.0", + name: "ConstantAtomicTagged", + })(typia.llm.application()); + +interface ConstantAtomicTaggedApplication { + insert(p: { first: ConstantAtomicTagged }): Promise; + reduce(p: { + first: ConstantAtomicTagged; + second: ConstantAtomicTagged | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicTagged | null; + second: ConstantAtomicTagged | null; + third?: ConstantAtomicTagged | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..666cb05377 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_application_3_0_ConstantAtomicUnion = + _test_llm_application({ + model: "3.0", + name: "ConstantAtomicUnion", + })(typia.llm.application()); + +interface ConstantAtomicUnionApplication { + insert(p: { first: ConstantAtomicUnion }): Promise; + reduce(p: { + first: ConstantAtomicUnion; + second: ConstantAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicUnion | null; + second: ConstantAtomicUnion | null; + third?: ConstantAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantConstEnumeration.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..fe5cdacb59 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantConstEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_application_3_0_ConstantConstEnumeration = + _test_llm_application({ + model: "3.0", + name: "ConstantConstEnumeration", + })(typia.llm.application()); + +interface ConstantConstEnumerationApplication { + insert(p: { first: ConstantConstEnumeration }): Promise; + reduce(p: { + first: ConstantConstEnumeration; + second: ConstantConstEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantConstEnumeration | null; + second: ConstantConstEnumeration | null; + third?: ConstantConstEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantEnumeration.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantEnumeration.ts new file mode 100644 index 0000000000..be2db7bfc1 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ConstantEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_application_3_0_ConstantEnumeration = + _test_llm_application({ + model: "3.0", + name: "ConstantEnumeration", + })(typia.llm.application()); + +interface ConstantEnumerationApplication { + insert(p: { first: ConstantEnumeration }): Promise; + reduce(p: { + first: ConstantEnumeration; + second: ConstantEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantEnumeration | null; + second: ConstantEnumeration | null; + third?: ConstantEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicArray.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicArray.ts new file mode 100644 index 0000000000..3cc7248101 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_application_3_0_DynamicArray = _test_llm_application({ + model: "3.0", + name: "DynamicArray", +})(typia.llm.application()); + +interface DynamicArrayApplication { + insert(p: { first: DynamicArray }): Promise; + reduce(p: { + first: DynamicArray; + second: DynamicArray | null; + }): Promise; + coalesce(p: { + first: DynamicArray | null; + second: DynamicArray | null; + third?: DynamicArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicComposite.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicComposite.ts new file mode 100644 index 0000000000..bdbecec12b --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicComposite.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_application_3_0_DynamicComposite = _test_llm_application({ + model: "3.0", + name: "DynamicComposite", +})(typia.llm.application()); + +interface DynamicCompositeApplication { + insert(p: { first: DynamicComposite }): Promise; + reduce(p: { + first: DynamicComposite; + second: DynamicComposite | null; + }): Promise; + coalesce(p: { + first: DynamicComposite | null; + second: DynamicComposite | null; + third?: DynamicComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicConstant.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicConstant.ts new file mode 100644 index 0000000000..7a6525fdec --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicConstant.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_application_3_0_DynamicConstant = _test_llm_application({ + model: "3.0", + name: "DynamicConstant", +})(typia.llm.application()); + +interface DynamicConstantApplication { + insert(p: { first: DynamicConstant }): Promise; + reduce(p: { + first: DynamicConstant; + second: DynamicConstant | null; + }): Promise; + coalesce(p: { + first: DynamicConstant | null; + second: DynamicConstant | null; + third?: DynamicConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicEnumeration.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicEnumeration.ts new file mode 100644 index 0000000000..5ed3f55a0b --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_application_3_0_DynamicEnumeration = + _test_llm_application({ + model: "3.0", + name: "DynamicEnumeration", + })(typia.llm.application()); + +interface DynamicEnumerationApplication { + insert(p: { first: DynamicEnumeration }): Promise; + reduce(p: { + first: DynamicEnumeration; + second: DynamicEnumeration | null; + }): Promise; + coalesce(p: { + first: DynamicEnumeration | null; + second: DynamicEnumeration | null; + third?: DynamicEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicNever.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicNever.ts new file mode 100644 index 0000000000..b60cce7445 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicNever.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_application_3_0_DynamicNever = _test_llm_application({ + model: "3.0", + name: "DynamicNever", +})(typia.llm.application()); + +interface DynamicNeverApplication { + insert(p: { first: DynamicNever }): Promise; + reduce(p: { + first: DynamicNever; + second: DynamicNever | null; + }): Promise; + coalesce(p: { + first: DynamicNever | null; + second: DynamicNever | null; + third?: DynamicNever | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicSimple.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicSimple.ts new file mode 100644 index 0000000000..c65bcdc2e2 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_application_3_0_DynamicSimple = _test_llm_application({ + model: "3.0", + name: "DynamicSimple", +})(typia.llm.application()); + +interface DynamicSimpleApplication { + insert(p: { first: DynamicSimple }): Promise; + reduce(p: { + first: DynamicSimple; + second: DynamicSimple | null; + }): Promise; + coalesce(p: { + first: DynamicSimple | null; + second: DynamicSimple | null; + third?: DynamicSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicTemplate.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicTemplate.ts new file mode 100644 index 0000000000..955f6d891a --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicTemplate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_application_3_0_DynamicTemplate = _test_llm_application({ + model: "3.0", + name: "DynamicTemplate", +})(typia.llm.application()); + +interface DynamicTemplateApplication { + insert(p: { first: DynamicTemplate }): Promise; + reduce(p: { + first: DynamicTemplate; + second: DynamicTemplate | null; + }): Promise; + coalesce(p: { + first: DynamicTemplate | null; + second: DynamicTemplate | null; + third?: DynamicTemplate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicTree.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicTree.ts new file mode 100644 index 0000000000..e2ceb11dd7 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicTree.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_application_3_0_DynamicTree = _test_llm_application({ + model: "3.0", + name: "DynamicTree", +})(typia.llm.application()); + +interface DynamicTreeApplication { + insert(p: { first: DynamicTree }): Promise; + reduce(p: { + first: DynamicTree; + second: DynamicTree | null; + }): Promise; + coalesce(p: { + first: DynamicTree | null; + second: DynamicTree | null; + third?: DynamicTree | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicUndefined.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicUndefined.ts new file mode 100644 index 0000000000..90c795f271 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicUndefined.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_application_3_0_DynamicUndefined = _test_llm_application({ + model: "3.0", + name: "DynamicUndefined", +})(typia.llm.application()); + +interface DynamicUndefinedApplication { + insert(p: { first: DynamicUndefined }): Promise; + reduce(p: { + first: DynamicUndefined; + second: DynamicUndefined | null; + }): Promise; + coalesce(p: { + first: DynamicUndefined | null; + second: DynamicUndefined | null; + third?: DynamicUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicUnion.ts new file mode 100644 index 0000000000..bd07adbf4c --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_DynamicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_application_3_0_DynamicUnion = _test_llm_application({ + model: "3.0", + name: "DynamicUnion", +})(typia.llm.application()); + +interface DynamicUnionApplication { + insert(p: { first: DynamicUnion }): Promise; + reduce(p: { + first: DynamicUnion; + second: DynamicUnion | null; + }): Promise; + coalesce(p: { + first: DynamicUnion | null; + second: DynamicUnion | null; + third?: DynamicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectAlias.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectAlias.ts new file mode 100644 index 0000000000..c571f223ce --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectAlias.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_application_3_0_ObjectAlias = _test_llm_application({ + model: "3.0", + name: "ObjectAlias", +})(typia.llm.application()); + +interface ObjectAliasApplication { + insert(p: { first: ObjectAlias }): Promise; + reduce(p: { + first: ObjectAlias; + second: ObjectAlias | null; + }): Promise; + coalesce(p: { + first: ObjectAlias | null; + second: ObjectAlias | null; + third?: ObjectAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDate.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDate.ts new file mode 100644 index 0000000000..d72cc7a0a2 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_application_3_0_ObjectDate = _test_llm_application({ + model: "3.0", + name: "ObjectDate", +})(typia.llm.application()); + +interface ObjectDateApplication { + insert(p: { first: ObjectDate }): Promise; + reduce(p: { + first: ObjectDate; + second: ObjectDate | null; + }): Promise; + coalesce(p: { + first: ObjectDate | null; + second: ObjectDate | null; + third?: ObjectDate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDescription.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDescription.ts new file mode 100644 index 0000000000..2d6ac94888 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDescription.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_application_3_0_ObjectDescription = _test_llm_application( + { + model: "3.0", + name: "ObjectDescription", + }, +)(typia.llm.application()); + +interface ObjectDescriptionApplication { + insert(p: { first: ObjectDescription }): Promise; + reduce(p: { + first: ObjectDescription; + second: ObjectDescription | null; + }): Promise; + coalesce(p: { + first: ObjectDescription | null; + second: ObjectDescription | null; + third?: ObjectDescription | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDynamic.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDynamic.ts new file mode 100644 index 0000000000..d9d83b9885 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectDynamic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_application_3_0_ObjectDynamic = _test_llm_application({ + model: "3.0", + name: "ObjectDynamic", +})(typia.llm.application()); + +interface ObjectDynamicApplication { + insert(p: { first: ObjectDynamic }): Promise; + reduce(p: { + first: ObjectDynamic; + second: ObjectDynamic | null; + }): Promise; + coalesce(p: { + first: ObjectDynamic | null; + second: ObjectDynamic | null; + third?: ObjectDynamic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericAlias.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericAlias.ts new file mode 100644 index 0000000000..2654880a57 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericAlias.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_application_3_0_ObjectGenericAlias = + _test_llm_application({ + model: "3.0", + name: "ObjectGenericAlias", + })(typia.llm.application()); + +interface ObjectGenericAliasApplication { + insert(p: { first: ObjectGenericAlias }): Promise; + reduce(p: { + first: ObjectGenericAlias; + second: ObjectGenericAlias | null; + }): Promise; + coalesce(p: { + first: ObjectGenericAlias | null; + second: ObjectGenericAlias | null; + third?: ObjectGenericAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericArray.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericArray.ts new file mode 100644 index 0000000000..adcd085828 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_application_3_0_ObjectGenericArray = + _test_llm_application({ + model: "3.0", + name: "ObjectGenericArray", + })(typia.llm.application()); + +interface ObjectGenericArrayApplication { + insert(p: { first: ObjectGenericArray }): Promise; + reduce(p: { + first: ObjectGenericArray; + second: ObjectGenericArray | null; + }): Promise; + coalesce(p: { + first: ObjectGenericArray | null; + second: ObjectGenericArray | null; + third?: ObjectGenericArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericUnion.ts new file mode 100644 index 0000000000..5401396f71 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectGenericUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_application_3_0_ObjectGenericUnion = + _test_llm_application({ + model: "3.0", + name: "ObjectGenericUnion", + })(typia.llm.application()); + +interface ObjectGenericUnionApplication { + insert(p: { first: ObjectGenericUnion }): Promise; + reduce(p: { + first: ObjectGenericUnion; + second: ObjectGenericUnion | null; + }): Promise; + coalesce(p: { + first: ObjectGenericUnion | null; + second: ObjectGenericUnion | null; + third?: ObjectGenericUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectInternal.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectInternal.ts new file mode 100644 index 0000000000..b8679f3200 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectInternal.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_application_3_0_ObjectInternal = _test_llm_application({ + model: "3.0", + name: "ObjectInternal", +})(typia.llm.application()); + +interface ObjectInternalApplication { + insert(p: { first: ObjectInternal }): Promise; + reduce(p: { + first: ObjectInternal; + second: ObjectInternal | null; + }): Promise; + coalesce(p: { + first: ObjectInternal | null; + second: ObjectInternal | null; + third?: ObjectInternal | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectIntersection.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectIntersection.ts new file mode 100644 index 0000000000..7ebb2b921e --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectIntersection.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_application_3_0_ObjectIntersection = + _test_llm_application({ + model: "3.0", + name: "ObjectIntersection", + })(typia.llm.application()); + +interface ObjectIntersectionApplication { + insert(p: { first: ObjectIntersection }): Promise; + reduce(p: { + first: ObjectIntersection; + second: ObjectIntersection | null; + }): Promise; + coalesce(p: { + first: ObjectIntersection | null; + second: ObjectIntersection | null; + third?: ObjectIntersection | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectJsonTag.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectJsonTag.ts new file mode 100644 index 0000000000..b0495d263c --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectJsonTag.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_application_3_0_ObjectJsonTag = _test_llm_application({ + model: "3.0", + name: "ObjectJsonTag", +})(typia.llm.application()); + +interface ObjectJsonTagApplication { + insert(p: { first: ObjectJsonTag }): Promise; + reduce(p: { + first: ObjectJsonTag; + second: ObjectJsonTag | null; + }): Promise; + coalesce(p: { + first: ObjectJsonTag | null; + second: ObjectJsonTag | null; + third?: ObjectJsonTag | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectLiteralProperty.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..720d9d99c4 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectLiteralProperty.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_application_3_0_ObjectLiteralProperty = + _test_llm_application({ + model: "3.0", + name: "ObjectLiteralProperty", + })(typia.llm.application()); + +interface ObjectLiteralPropertyApplication { + insert(p: { first: ObjectLiteralProperty }): Promise; + reduce(p: { + first: ObjectLiteralProperty; + second: ObjectLiteralProperty | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralProperty | null; + second: ObjectLiteralProperty | null; + third?: ObjectLiteralProperty | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectLiteralType.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectLiteralType.ts new file mode 100644 index 0000000000..7ff196d6e1 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectLiteralType.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_application_3_0_ObjectLiteralType = _test_llm_application( + { + model: "3.0", + name: "ObjectLiteralType", + }, +)(typia.llm.application()); + +interface ObjectLiteralTypeApplication { + insert(p: { first: ObjectLiteralType }): Promise; + reduce(p: { + first: ObjectLiteralType; + second: ObjectLiteralType | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralType | null; + second: ObjectLiteralType | null; + third?: ObjectLiteralType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectNullable.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectNullable.ts new file mode 100644 index 0000000000..27ce4bb178 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectNullable.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_application_3_0_ObjectNullable = _test_llm_application({ + model: "3.0", + name: "ObjectNullable", +})(typia.llm.application()); + +interface ObjectNullableApplication { + insert(p: { first: ObjectNullable }): Promise; + reduce(p: { + first: ObjectNullable; + second: ObjectNullable | null; + }): Promise; + coalesce(p: { + first: ObjectNullable | null; + second: ObjectNullable | null; + third?: ObjectNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectOptional.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectOptional.ts new file mode 100644 index 0000000000..6c771e784f --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectOptional.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_application_3_0_ObjectOptional = _test_llm_application({ + model: "3.0", + name: "ObjectOptional", +})(typia.llm.application()); + +interface ObjectOptionalApplication { + insert(p: { first: ObjectOptional }): Promise; + reduce(p: { + first: ObjectOptional; + second: ObjectOptional | null; + }): Promise; + coalesce(p: { + first: ObjectOptional | null; + second: ObjectOptional | null; + third?: ObjectOptional | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPartial.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPartial.ts new file mode 100644 index 0000000000..b339ede678 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPartial.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_application_3_0_ObjectPartial = _test_llm_application({ + model: "3.0", + name: "ObjectPartial", +})(typia.llm.application()); + +interface ObjectPartialApplication { + insert(p: { first: ObjectPartial }): Promise; + reduce(p: { + first: ObjectPartial; + second: ObjectPartial | null; + }): Promise; + coalesce(p: { + first: ObjectPartial | null; + second: ObjectPartial | null; + third?: ObjectPartial | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPartialAndRequired.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..83c074d8c7 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPartialAndRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_application_3_0_ObjectPartialAndRequired = + _test_llm_application({ + model: "3.0", + name: "ObjectPartialAndRequired", + })(typia.llm.application()); + +interface ObjectPartialAndRequiredApplication { + insert(p: { first: ObjectPartialAndRequired }): Promise; + reduce(p: { + first: ObjectPartialAndRequired; + second: ObjectPartialAndRequired | null; + }): Promise; + coalesce(p: { + first: ObjectPartialAndRequired | null; + second: ObjectPartialAndRequired | null; + third?: ObjectPartialAndRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPrimitive.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPrimitive.ts new file mode 100644 index 0000000000..7ad52e0adf --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectPrimitive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_application_3_0_ObjectPrimitive = _test_llm_application({ + model: "3.0", + name: "ObjectPrimitive", +})(typia.llm.application()); + +interface ObjectPrimitiveApplication { + insert(p: { first: ObjectPrimitive }): Promise; + reduce(p: { + first: ObjectPrimitive; + second: ObjectPrimitive | null; + }): Promise; + coalesce(p: { + first: ObjectPrimitive | null; + second: ObjectPrimitive | null; + third?: ObjectPrimitive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectRecursive.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectRecursive.ts new file mode 100644 index 0000000000..181200d800 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectRecursive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_application_3_0_ObjectRecursive = _test_llm_application({ + model: "3.0", + name: "ObjectRecursive", +})(typia.llm.application()); + +interface ObjectRecursiveApplication { + insert(p: { first: ObjectRecursive }): Promise; + reduce(p: { + first: ObjectRecursive; + second: ObjectRecursive | null; + }): Promise; + coalesce(p: { + first: ObjectRecursive | null; + second: ObjectRecursive | null; + third?: ObjectRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectRequired.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectRequired.ts new file mode 100644 index 0000000000..47dbb9ec23 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectRequired.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_application_3_0_ObjectRequired = _test_llm_application({ + model: "3.0", + name: "ObjectRequired", +})(typia.llm.application()); + +interface ObjectRequiredApplication { + insert(p: { first: ObjectRequired }): Promise; + reduce(p: { + first: ObjectRequired; + second: ObjectRequired | null; + }): Promise; + coalesce(p: { + first: ObjectRequired | null; + second: ObjectRequired | null; + third?: ObjectRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectSimple.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectSimple.ts new file mode 100644 index 0000000000..e36098e8f9 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_application_3_0_ObjectSimple = _test_llm_application({ + model: "3.0", + name: "ObjectSimple", +})(typia.llm.application()); + +interface ObjectSimpleApplication { + insert(p: { first: ObjectSimple }): Promise; + reduce(p: { + first: ObjectSimple; + second: ObjectSimple | null; + }): Promise; + coalesce(p: { + first: ObjectSimple | null; + second: ObjectSimple | null; + third?: ObjectSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUndefined.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUndefined.ts new file mode 100644 index 0000000000..c06c880041 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUndefined.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_application_3_0_ObjectUndefined = _test_llm_application({ + model: "3.0", + name: "ObjectUndefined", +})(typia.llm.application()); + +interface ObjectUndefinedApplication { + insert(p: { first: ObjectUndefined }): Promise; + reduce(p: { + first: ObjectUndefined; + second: ObjectUndefined | null; + }): Promise; + coalesce(p: { + first: ObjectUndefined | null; + second: ObjectUndefined | null; + third?: ObjectUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionComposite.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionComposite.ts new file mode 100644 index 0000000000..e7be79a871 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_application_3_0_ObjectUnionComposite = + _test_llm_application({ + model: "3.0", + name: "ObjectUnionComposite", + })(typia.llm.application()); + +interface ObjectUnionCompositeApplication { + insert(p: { first: ObjectUnionComposite }): Promise; + reduce(p: { + first: ObjectUnionComposite; + second: ObjectUnionComposite | null; + }): Promise; + coalesce(p: { + first: ObjectUnionComposite | null; + second: ObjectUnionComposite | null; + third?: ObjectUnionComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionCompositePointer.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..0c2a6583a2 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionCompositePointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_application_3_0_ObjectUnionCompositePointer = + _test_llm_application({ + model: "3.0", + name: "ObjectUnionCompositePointer", + })(typia.llm.application()); + +interface ObjectUnionCompositePointerApplication { + insert(p: { first: ObjectUnionCompositePointer }): Promise; + reduce(p: { + first: ObjectUnionCompositePointer; + second: ObjectUnionCompositePointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionCompositePointer | null; + second: ObjectUnionCompositePointer | null; + third?: ObjectUnionCompositePointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionDouble.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionDouble.ts new file mode 100644 index 0000000000..f49657c1af --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionDouble.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_application_3_0_ObjectUnionDouble = _test_llm_application( + { + model: "3.0", + name: "ObjectUnionDouble", + }, +)(typia.llm.application()); + +interface ObjectUnionDoubleApplication { + insert(p: { first: ObjectUnionDouble }): Promise; + reduce(p: { + first: ObjectUnionDouble; + second: ObjectUnionDouble | null; + }): Promise; + coalesce(p: { + first: ObjectUnionDouble | null; + second: ObjectUnionDouble | null; + third?: ObjectUnionDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionExplicit.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..bc4f0b2bd4 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_application_3_0_ObjectUnionExplicit = + _test_llm_application({ + model: "3.0", + name: "ObjectUnionExplicit", + })(typia.llm.application()); + +interface ObjectUnionExplicitApplication { + insert(p: { first: ObjectUnionExplicit }): Promise; + reduce(p: { + first: ObjectUnionExplicit; + second: ObjectUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicit | null; + second: ObjectUnionExplicit | null; + third?: ObjectUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionExplicitPointer.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..b676818b53 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_application_3_0_ObjectUnionExplicitPointer = + _test_llm_application({ + model: "3.0", + name: "ObjectUnionExplicitPointer", + })(typia.llm.application()); + +interface ObjectUnionExplicitPointerApplication { + insert(p: { first: ObjectUnionExplicitPointer }): Promise; + reduce(p: { + first: ObjectUnionExplicitPointer; + second: ObjectUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicitPointer | null; + second: ObjectUnionExplicitPointer | null; + third?: ObjectUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionImplicit.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..ea1b7f0581 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_application_3_0_ObjectUnionImplicit = + _test_llm_application({ + model: "3.0", + name: "ObjectUnionImplicit", + })(typia.llm.application()); + +interface ObjectUnionImplicitApplication { + insert(p: { first: ObjectUnionImplicit }): Promise; + reduce(p: { + first: ObjectUnionImplicit; + second: ObjectUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionImplicit | null; + second: ObjectUnionImplicit | null; + third?: ObjectUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionNonPredictable.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..af521a0fc6 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ObjectUnionNonPredictable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_application_3_0_ObjectUnionNonPredictable = + _test_llm_application({ + model: "3.0", + name: "ObjectUnionNonPredictable", + })(typia.llm.application()); + +interface ObjectUnionNonPredictableApplication { + insert(p: { first: ObjectUnionNonPredictable }): Promise; + reduce(p: { + first: ObjectUnionNonPredictable; + second: ObjectUnionNonPredictable | null; + }): Promise; + coalesce(p: { + first: ObjectUnionNonPredictable | null; + second: ObjectUnionNonPredictable | null; + third?: ObjectUnionNonPredictable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateAtomic.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateAtomic.ts new file mode 100644 index 0000000000..8bf9d62ef8 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateAtomic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_application_3_0_TemplateAtomic = _test_llm_application({ + model: "3.0", + name: "TemplateAtomic", +})(typia.llm.application()); + +interface TemplateAtomicApplication { + insert(p: { first: TemplateAtomic }): Promise; + reduce(p: { + first: TemplateAtomic; + second: TemplateAtomic | null; + }): Promise; + coalesce(p: { + first: TemplateAtomic | null; + second: TemplateAtomic | null; + third?: TemplateAtomic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateConstant.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateConstant.ts new file mode 100644 index 0000000000..5127e82ecd --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateConstant.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_application_3_0_TemplateConstant = _test_llm_application({ + model: "3.0", + name: "TemplateConstant", +})(typia.llm.application()); + +interface TemplateConstantApplication { + insert(p: { first: TemplateConstant }): Promise; + reduce(p: { + first: TemplateConstant; + second: TemplateConstant | null; + }): Promise; + coalesce(p: { + first: TemplateConstant | null; + second: TemplateConstant | null; + third?: TemplateConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateUnion.ts new file mode 100644 index 0000000000..9ec4c383a5 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TemplateUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_application_3_0_TemplateUnion = _test_llm_application({ + model: "3.0", + name: "TemplateUnion", +})(typia.llm.application()); + +interface TemplateUnionApplication { + insert(p: { first: TemplateUnion }): Promise; + reduce(p: { + first: TemplateUnion; + second: TemplateUnion | null; + }): Promise; + coalesce(p: { + first: TemplateUnion | null; + second: TemplateUnion | null; + third?: TemplateUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonAtomicUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..bb116ac0fe --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonAtomicUnion.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_application_3_0_ToJsonAtomicUnion = _test_llm_application( + { + model: "3.0", + name: "ToJsonAtomicUnion", + }, +)(typia.llm.application()); + +interface ToJsonAtomicUnionApplication { + insert(p: { first: ToJsonAtomicUnion }): Promise; + reduce(p: { + first: ToJsonAtomicUnion; + second: ToJsonAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonAtomicUnion | null; + second: ToJsonAtomicUnion | null; + third?: ToJsonAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonDouble.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonDouble.ts new file mode 100644 index 0000000000..1fe460695c --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonDouble.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_application_3_0_ToJsonDouble = _test_llm_application({ + model: "3.0", + name: "ToJsonDouble", +})(typia.llm.application()); + +interface ToJsonDoubleApplication { + insert(p: { first: ToJsonDouble }): Promise; + reduce(p: { + first: ToJsonDouble; + second: ToJsonDouble | null; + }): Promise; + coalesce(p: { + first: ToJsonDouble | null; + second: ToJsonDouble | null; + third?: ToJsonDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonNull.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonNull.ts new file mode 100644 index 0000000000..14763c5a80 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonNull.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_application_3_0_ToJsonNull = _test_llm_application({ + model: "3.0", + name: "ToJsonNull", +})(typia.llm.application()); + +interface ToJsonNullApplication { + insert(p: { first: ToJsonNull }): Promise; + reduce(p: { + first: ToJsonNull; + second: ToJsonNull | null; + }): Promise; + coalesce(p: { + first: ToJsonNull | null; + second: ToJsonNull | null; + third?: ToJsonNull | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonUnion.ts new file mode 100644 index 0000000000..6076b65f50 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_ToJsonUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_application_3_0_ToJsonUnion = _test_llm_application({ + model: "3.0", + name: "ToJsonUnion", +})(typia.llm.application()); + +interface ToJsonUnionApplication { + insert(p: { first: ToJsonUnion }): Promise; + reduce(p: { + first: ToJsonUnion; + second: ToJsonUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonUnion | null; + second: ToJsonUnion | null; + third?: ToJsonUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagArray.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagArray.ts new file mode 100644 index 0000000000..77e8bb57dc --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_application_3_0_TypeTagArray = _test_llm_application({ + model: "3.0", + name: "TypeTagArray", +})(typia.llm.application()); + +interface TypeTagArrayApplication { + insert(p: { first: TypeTagArray }): Promise; + reduce(p: { + first: TypeTagArray; + second: TypeTagArray | null; + }): Promise; + coalesce(p: { + first: TypeTagArray | null; + second: TypeTagArray | null; + third?: TypeTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagArrayUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..70d0cf1bc1 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagArrayUnion.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_application_3_0_TypeTagArrayUnion = _test_llm_application( + { + model: "3.0", + name: "TypeTagArrayUnion", + }, +)(typia.llm.application()); + +interface TypeTagArrayUnionApplication { + insert(p: { first: TypeTagArrayUnion }): Promise; + reduce(p: { + first: TypeTagArrayUnion; + second: TypeTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagArrayUnion | null; + second: TypeTagArrayUnion | null; + third?: TypeTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagAtomicUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..bafdd85099 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_application_3_0_TypeTagAtomicUnion = + _test_llm_application({ + model: "3.0", + name: "TypeTagAtomicUnion", + })(typia.llm.application()); + +interface TypeTagAtomicUnionApplication { + insert(p: { first: TypeTagAtomicUnion }): Promise; + reduce(p: { + first: TypeTagAtomicUnion; + second: TypeTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagAtomicUnion | null; + second: TypeTagAtomicUnion | null; + third?: TypeTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagCustom.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagCustom.ts new file mode 100644 index 0000000000..ac2f32f38c --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagCustom.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_application_3_0_TypeTagCustom = _test_llm_application({ + model: "3.0", + name: "TypeTagCustom", +})(typia.llm.application()); + +interface TypeTagCustomApplication { + insert(p: { first: TypeTagCustom }): Promise; + reduce(p: { + first: TypeTagCustom; + second: TypeTagCustom | null; + }): Promise; + coalesce(p: { + first: TypeTagCustom | null; + second: TypeTagCustom | null; + third?: TypeTagCustom | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagDefault.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagDefault.ts new file mode 100644 index 0000000000..4511c7ce64 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagDefault.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_application_3_0_TypeTagDefault = _test_llm_application({ + model: "3.0", + name: "TypeTagDefault", +})(typia.llm.application()); + +interface TypeTagDefaultApplication { + insert(p: { first: TypeTagDefault }): Promise; + reduce(p: { + first: TypeTagDefault; + second: TypeTagDefault | null; + }): Promise; + coalesce(p: { + first: TypeTagDefault | null; + second: TypeTagDefault | null; + third?: TypeTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagFormat.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagFormat.ts new file mode 100644 index 0000000000..db146ec69c --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_application_3_0_TypeTagFormat = _test_llm_application({ + model: "3.0", + name: "TypeTagFormat", +})(typia.llm.application()); + +interface TypeTagFormatApplication { + insert(p: { first: TypeTagFormat }): Promise; + reduce(p: { + first: TypeTagFormat; + second: TypeTagFormat | null; + }): Promise; + coalesce(p: { + first: TypeTagFormat | null; + second: TypeTagFormat | null; + third?: TypeTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagLength.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagLength.ts new file mode 100644 index 0000000000..48bdcb5dc5 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_application_3_0_TypeTagLength = _test_llm_application({ + model: "3.0", + name: "TypeTagLength", +})(typia.llm.application()); + +interface TypeTagLengthApplication { + insert(p: { first: TypeTagLength }): Promise; + reduce(p: { + first: TypeTagLength; + second: TypeTagLength | null; + }): Promise; + coalesce(p: { + first: TypeTagLength | null; + second: TypeTagLength | null; + third?: TypeTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagMatrix.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagMatrix.ts new file mode 100644 index 0000000000..eda8dc2129 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_application_3_0_TypeTagMatrix = _test_llm_application({ + model: "3.0", + name: "TypeTagMatrix", +})(typia.llm.application()); + +interface TypeTagMatrixApplication { + insert(p: { first: TypeTagMatrix }): Promise; + reduce(p: { + first: TypeTagMatrix; + second: TypeTagMatrix | null; + }): Promise; + coalesce(p: { + first: TypeTagMatrix | null; + second: TypeTagMatrix | null; + third?: TypeTagMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagObjectUnion.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..b76253027d --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_application_3_0_TypeTagObjectUnion = + _test_llm_application({ + model: "3.0", + name: "TypeTagObjectUnion", + })(typia.llm.application()); + +interface TypeTagObjectUnionApplication { + insert(p: { first: TypeTagObjectUnion }): Promise; + reduce(p: { + first: TypeTagObjectUnion; + second: TypeTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagObjectUnion | null; + second: TypeTagObjectUnion | null; + third?: TypeTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagPattern.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagPattern.ts new file mode 100644 index 0000000000..657d71324e --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagPattern.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_application_3_0_TypeTagPattern = _test_llm_application({ + model: "3.0", + name: "TypeTagPattern", +})(typia.llm.application()); + +interface TypeTagPatternApplication { + insert(p: { first: TypeTagPattern }): Promise; + reduce(p: { + first: TypeTagPattern; + second: TypeTagPattern | null; + }): Promise; + coalesce(p: { + first: TypeTagPattern | null; + second: TypeTagPattern | null; + third?: TypeTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagRange.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagRange.ts new file mode 100644 index 0000000000..0685abdc81 --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_application_3_0_TypeTagRange = _test_llm_application({ + model: "3.0", + name: "TypeTagRange", +})(typia.llm.application()); + +interface TypeTagRangeApplication { + insert(p: { first: TypeTagRange }): Promise; + reduce(p: { + first: TypeTagRange; + second: TypeTagRange | null; + }): Promise; + coalesce(p: { + first: TypeTagRange | null; + second: TypeTagRange | null; + third?: TypeTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagType.ts b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagType.ts new file mode 100644 index 0000000000..2efcda9c9f --- /dev/null +++ b/test/src/features/llm.application/3.0/test_llm_application_3_0_TypeTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_application_3_0_TypeTagType = _test_llm_application({ + model: "3.0", + name: "TypeTagType", +})(typia.llm.application()); + +interface TypeTagTypeApplication { + insert(p: { first: TypeTagType }): Promise; + reduce(p: { + first: TypeTagType; + second: TypeTagType | null; + }): Promise; + coalesce(p: { + first: TypeTagType | null; + second: TypeTagType | null; + third?: TypeTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayAny.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayAny.ts new file mode 100644 index 0000000000..c5460a11d0 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayAny.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_application_3_1_ArrayAny = _test_llm_application({ + model: "3.1", + name: "ArrayAny", +})(typia.llm.application()); + +interface ArrayAnyApplication { + insert(p: { first: ArrayAny }): Promise; + reduce(p: { first: ArrayAny; second: ArrayAny | null }): Promise; + coalesce(p: { + first: ArrayAny | null; + second: ArrayAny | null; + third?: ArrayAny | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayHierarchical.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayHierarchical.ts new file mode 100644 index 0000000000..f6ce68781b --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayHierarchical.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_application_3_1_ArrayHierarchical = _test_llm_application( + { + model: "3.1", + name: "ArrayHierarchical", + }, +)(typia.llm.application()); + +interface ArrayHierarchicalApplication { + insert(p: { first: ArrayHierarchical }): Promise; + reduce(p: { + first: ArrayHierarchical; + second: ArrayHierarchical | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchical | null; + second: ArrayHierarchical | null; + third?: ArrayHierarchical | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayHierarchicalPointer.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..cfe45063cf --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayHierarchicalPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_application_3_1_ArrayHierarchicalPointer = + _test_llm_application({ + model: "3.1", + name: "ArrayHierarchicalPointer", + })(typia.llm.application()); + +interface ArrayHierarchicalPointerApplication { + insert(p: { first: ArrayHierarchicalPointer }): Promise; + reduce(p: { + first: ArrayHierarchicalPointer; + second: ArrayHierarchicalPointer | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchicalPointer | null; + second: ArrayHierarchicalPointer | null; + third?: ArrayHierarchicalPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayMatrix.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayMatrix.ts new file mode 100644 index 0000000000..a9205c7ba9 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_application_3_1_ArrayMatrix = _test_llm_application({ + model: "3.1", + name: "ArrayMatrix", +})(typia.llm.application()); + +interface ArrayMatrixApplication { + insert(p: { first: ArrayMatrix }): Promise; + reduce(p: { + first: ArrayMatrix; + second: ArrayMatrix | null; + }): Promise; + coalesce(p: { + first: ArrayMatrix | null; + second: ArrayMatrix | null; + third?: ArrayMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursive.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursive.ts new file mode 100644 index 0000000000..bc76328c81 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_application_3_1_ArrayRecursive = _test_llm_application({ + model: "3.1", + name: "ArrayRecursive", +})(typia.llm.application()); + +interface ArrayRecursiveApplication { + insert(p: { first: ArrayRecursive }): Promise; + reduce(p: { + first: ArrayRecursive; + second: ArrayRecursive | null; + }): Promise; + coalesce(p: { + first: ArrayRecursive | null; + second: ArrayRecursive | null; + third?: ArrayRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..c9bd819a40 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_application_3_1_ArrayRecursiveUnionExplicit = + _test_llm_application({ + model: "3.1", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionExplicitApplication { + insert(p: { first: ArrayRecursiveUnionExplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicit; + second: ArrayRecursiveUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicit | null; + second: ArrayRecursiveUnionExplicit | null; + third?: ArrayRecursiveUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..614024b0c6 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,28 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_application_3_1_ArrayRecursiveUnionExplicitPointer = + _test_llm_application({ + model: "3.1", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.application< + ArrayRecursiveUnionExplicitPointerApplication, + "3.1" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerApplication { + insert(p: { first: ArrayRecursiveUnionExplicitPointer }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicitPointer; + second: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicitPointer | null; + second: ArrayRecursiveUnionExplicitPointer | null; + third?: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..b7b66b9182 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_application_3_1_ArrayRecursiveUnionImplicit = + _test_llm_application({ + model: "3.1", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionImplicitApplication { + insert(p: { first: ArrayRecursiveUnionImplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionImplicit; + second: ArrayRecursiveUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionImplicit | null; + second: ArrayRecursiveUnionImplicit | null; + third?: ArrayRecursiveUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedNullable.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..3ed68a5c23 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedNullable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_application_3_1_ArrayRepeatedNullable = + _test_llm_application({ + model: "3.1", + name: "ArrayRepeatedNullable", + })(typia.llm.application()); + +interface ArrayRepeatedNullableApplication { + insert(p: { first: ArrayRepeatedNullable }): Promise; + reduce(p: { + first: ArrayRepeatedNullable; + second: ArrayRepeatedNullable | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedNullable | null; + second: ArrayRepeatedNullable | null; + third?: ArrayRepeatedNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedRequired.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..0ecb956af7 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_application_3_1_ArrayRepeatedRequired = + _test_llm_application({ + model: "3.1", + name: "ArrayRepeatedRequired", + })(typia.llm.application()); + +interface ArrayRepeatedRequiredApplication { + insert(p: { first: ArrayRepeatedRequired }): Promise; + reduce(p: { + first: ArrayRepeatedRequired; + second: ArrayRepeatedRequired | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedRequired | null; + second: ArrayRepeatedRequired | null; + third?: ArrayRepeatedRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..976c46e8da --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayRepeatedUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_application_3_1_ArrayRepeatedUnion = + _test_llm_application({ + model: "3.1", + name: "ArrayRepeatedUnion", + })(typia.llm.application()); + +interface ArrayRepeatedUnionApplication { + insert(p: { first: ArrayRepeatedUnion }): Promise; + reduce(p: { + first: ArrayRepeatedUnion; + second: ArrayRepeatedUnion | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedUnion | null; + second: ArrayRepeatedUnion | null; + third?: ArrayRepeatedUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArraySimple.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArraySimple.ts new file mode 100644 index 0000000000..9c3bd3cd0f --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArraySimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_application_3_1_ArraySimple = _test_llm_application({ + model: "3.1", + name: "ArraySimple", +})(typia.llm.application()); + +interface ArraySimpleApplication { + insert(p: { first: ArraySimple }): Promise; + reduce(p: { + first: ArraySimple; + second: ArraySimple | null; + }): Promise; + coalesce(p: { + first: ArraySimple | null; + second: ArraySimple | null; + third?: ArraySimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayUnion.ts new file mode 100644 index 0000000000..30cebac0cc --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ArrayUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_application_3_1_ArrayUnion = _test_llm_application({ + model: "3.1", + name: "ArrayUnion", +})(typia.llm.application()); + +interface ArrayUnionApplication { + insert(p: { first: ArrayUnion }): Promise; + reduce(p: { + first: ArrayUnion; + second: ArrayUnion | null; + }): Promise; + coalesce(p: { + first: ArrayUnion | null; + second: ArrayUnion | null; + third?: ArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_AtomicUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_AtomicUnion.ts new file mode 100644 index 0000000000..df589bc428 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_AtomicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_application_3_1_AtomicUnion = _test_llm_application({ + model: "3.1", + name: "AtomicUnion", +})(typia.llm.application()); + +interface AtomicUnionApplication { + insert(p: { first: AtomicUnion }): Promise; + reduce(p: { + first: AtomicUnion; + second: AtomicUnion | null; + }): Promise; + coalesce(p: { + first: AtomicUnion | null; + second: AtomicUnion | null; + third?: AtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassGetter.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassGetter.ts new file mode 100644 index 0000000000..1d31f38467 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassGetter.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_application_3_1_ClassGetter = _test_llm_application({ + model: "3.1", + name: "ClassGetter", +})(typia.llm.application()); + +interface ClassGetterApplication { + insert(p: { first: ClassGetter }): Promise; + reduce(p: { + first: ClassGetter; + second: ClassGetter | null; + }): Promise; + coalesce(p: { + first: ClassGetter | null; + second: ClassGetter | null; + third?: ClassGetter | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassMethod.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassMethod.ts new file mode 100644 index 0000000000..9058011403 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassMethod.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_application_3_1_ClassMethod = _test_llm_application({ + model: "3.1", + name: "ClassMethod", +})(typia.llm.application()); + +interface ClassMethodApplication { + insert(p: { first: ClassMethod }): Promise; + reduce(p: { + first: ClassMethod; + second: ClassMethod | null; + }): Promise; + coalesce(p: { + first: ClassMethod | null; + second: ClassMethod | null; + third?: ClassMethod | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassPropertyAssignment.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..fe135ea611 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ClassPropertyAssignment.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_application_3_1_ClassPropertyAssignment = + _test_llm_application({ + model: "3.1", + name: "ClassPropertyAssignment", + })(typia.llm.application()); + +interface ClassPropertyAssignmentApplication { + insert(p: { first: ClassPropertyAssignment }): Promise; + reduce(p: { + first: ClassPropertyAssignment; + second: ClassPropertyAssignment | null; + }): Promise; + coalesce(p: { + first: ClassPropertyAssignment | null; + second: ClassPropertyAssignment | null; + third?: ClassPropertyAssignment | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagArray.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagArray.ts new file mode 100644 index 0000000000..7b1848cfcb --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_application_3_1_CommentTagArray = _test_llm_application({ + model: "3.1", + name: "CommentTagArray", +})(typia.llm.application()); + +interface CommentTagArrayApplication { + insert(p: { first: CommentTagArray }): Promise; + reduce(p: { + first: CommentTagArray; + second: CommentTagArray | null; + }): Promise; + coalesce(p: { + first: CommentTagArray | null; + second: CommentTagArray | null; + third?: CommentTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagArrayUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..8027638d56 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_application_3_1_CommentTagArrayUnion = + _test_llm_application({ + model: "3.1", + name: "CommentTagArrayUnion", + })(typia.llm.application()); + +interface CommentTagArrayUnionApplication { + insert(p: { first: CommentTagArrayUnion }): Promise; + reduce(p: { + first: CommentTagArrayUnion; + second: CommentTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagArrayUnion | null; + second: CommentTagArrayUnion | null; + third?: CommentTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagAtomicUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..be28880737 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_application_3_1_CommentTagAtomicUnion = + _test_llm_application({ + model: "3.1", + name: "CommentTagAtomicUnion", + })(typia.llm.application()); + +interface CommentTagAtomicUnionApplication { + insert(p: { first: CommentTagAtomicUnion }): Promise; + reduce(p: { + first: CommentTagAtomicUnion; + second: CommentTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagAtomicUnion | null; + second: CommentTagAtomicUnion | null; + third?: CommentTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagDefault.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagDefault.ts new file mode 100644 index 0000000000..681efa44e7 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagDefault.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_application_3_1_CommentTagDefault = _test_llm_application( + { + model: "3.1", + name: "CommentTagDefault", + }, +)(typia.llm.application()); + +interface CommentTagDefaultApplication { + insert(p: { first: CommentTagDefault }): Promise; + reduce(p: { + first: CommentTagDefault; + second: CommentTagDefault | null; + }): Promise; + coalesce(p: { + first: CommentTagDefault | null; + second: CommentTagDefault | null; + third?: CommentTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagFormat.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagFormat.ts new file mode 100644 index 0000000000..7e7fb248ac --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_application_3_1_CommentTagFormat = _test_llm_application({ + model: "3.1", + name: "CommentTagFormat", +})(typia.llm.application()); + +interface CommentTagFormatApplication { + insert(p: { first: CommentTagFormat }): Promise; + reduce(p: { + first: CommentTagFormat; + second: CommentTagFormat | null; + }): Promise; + coalesce(p: { + first: CommentTagFormat | null; + second: CommentTagFormat | null; + third?: CommentTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagLength.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagLength.ts new file mode 100644 index 0000000000..7713e768dd --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_application_3_1_CommentTagLength = _test_llm_application({ + model: "3.1", + name: "CommentTagLength", +})(typia.llm.application()); + +interface CommentTagLengthApplication { + insert(p: { first: CommentTagLength }): Promise; + reduce(p: { + first: CommentTagLength; + second: CommentTagLength | null; + }): Promise; + coalesce(p: { + first: CommentTagLength | null; + second: CommentTagLength | null; + third?: CommentTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagObjectUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..cea90180a7 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_application_3_1_CommentTagObjectUnion = + _test_llm_application({ + model: "3.1", + name: "CommentTagObjectUnion", + })(typia.llm.application()); + +interface CommentTagObjectUnionApplication { + insert(p: { first: CommentTagObjectUnion }): Promise; + reduce(p: { + first: CommentTagObjectUnion; + second: CommentTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagObjectUnion | null; + second: CommentTagObjectUnion | null; + third?: CommentTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagPattern.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagPattern.ts new file mode 100644 index 0000000000..da918da6c3 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagPattern.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_application_3_1_CommentTagPattern = _test_llm_application( + { + model: "3.1", + name: "CommentTagPattern", + }, +)(typia.llm.application()); + +interface CommentTagPatternApplication { + insert(p: { first: CommentTagPattern }): Promise; + reduce(p: { + first: CommentTagPattern; + second: CommentTagPattern | null; + }): Promise; + coalesce(p: { + first: CommentTagPattern | null; + second: CommentTagPattern | null; + third?: CommentTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagRange.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagRange.ts new file mode 100644 index 0000000000..f59f66ec2e --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_application_3_1_CommentTagRange = _test_llm_application({ + model: "3.1", + name: "CommentTagRange", +})(typia.llm.application()); + +interface CommentTagRangeApplication { + insert(p: { first: CommentTagRange }): Promise; + reduce(p: { + first: CommentTagRange; + second: CommentTagRange | null; + }): Promise; + coalesce(p: { + first: CommentTagRange | null; + second: CommentTagRange | null; + third?: CommentTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagType.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagType.ts new file mode 100644 index 0000000000..78b789647d --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_CommentTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_application_3_1_CommentTagType = _test_llm_application({ + model: "3.1", + name: "CommentTagType", +})(typia.llm.application()); + +interface CommentTagTypeApplication { + insert(p: { first: CommentTagType }): Promise; + reduce(p: { + first: CommentTagType; + second: CommentTagType | null; + }): Promise; + coalesce(p: { + first: CommentTagType | null; + second: CommentTagType | null; + third?: CommentTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicAbsorbed.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..39a115a7f1 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicAbsorbed.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_application_3_1_ConstantAtomicAbsorbed = + _test_llm_application({ + model: "3.1", + name: "ConstantAtomicAbsorbed", + })(typia.llm.application()); + +interface ConstantAtomicAbsorbedApplication { + insert(p: { first: ConstantAtomicAbsorbed }): Promise; + reduce(p: { + first: ConstantAtomicAbsorbed; + second: ConstantAtomicAbsorbed | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicAbsorbed | null; + second: ConstantAtomicAbsorbed | null; + third?: ConstantAtomicAbsorbed | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicTagged.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..ea27eaad07 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicTagged.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_application_3_1_ConstantAtomicTagged = + _test_llm_application({ + model: "3.1", + name: "ConstantAtomicTagged", + })(typia.llm.application()); + +interface ConstantAtomicTaggedApplication { + insert(p: { first: ConstantAtomicTagged }): Promise; + reduce(p: { + first: ConstantAtomicTagged; + second: ConstantAtomicTagged | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicTagged | null; + second: ConstantAtomicTagged | null; + third?: ConstantAtomicTagged | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..3c6f86532c --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_application_3_1_ConstantAtomicUnion = + _test_llm_application({ + model: "3.1", + name: "ConstantAtomicUnion", + })(typia.llm.application()); + +interface ConstantAtomicUnionApplication { + insert(p: { first: ConstantAtomicUnion }): Promise; + reduce(p: { + first: ConstantAtomicUnion; + second: ConstantAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicUnion | null; + second: ConstantAtomicUnion | null; + third?: ConstantAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantConstEnumeration.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..ad20cc0e3e --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantConstEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_application_3_1_ConstantConstEnumeration = + _test_llm_application({ + model: "3.1", + name: "ConstantConstEnumeration", + })(typia.llm.application()); + +interface ConstantConstEnumerationApplication { + insert(p: { first: ConstantConstEnumeration }): Promise; + reduce(p: { + first: ConstantConstEnumeration; + second: ConstantConstEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantConstEnumeration | null; + second: ConstantConstEnumeration | null; + third?: ConstantConstEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantEnumeration.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantEnumeration.ts new file mode 100644 index 0000000000..ee46718df7 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ConstantEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_application_3_1_ConstantEnumeration = + _test_llm_application({ + model: "3.1", + name: "ConstantEnumeration", + })(typia.llm.application()); + +interface ConstantEnumerationApplication { + insert(p: { first: ConstantEnumeration }): Promise; + reduce(p: { + first: ConstantEnumeration; + second: ConstantEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantEnumeration | null; + second: ConstantEnumeration | null; + third?: ConstantEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicArray.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicArray.ts new file mode 100644 index 0000000000..50c48da3d8 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_application_3_1_DynamicArray = _test_llm_application({ + model: "3.1", + name: "DynamicArray", +})(typia.llm.application()); + +interface DynamicArrayApplication { + insert(p: { first: DynamicArray }): Promise; + reduce(p: { + first: DynamicArray; + second: DynamicArray | null; + }): Promise; + coalesce(p: { + first: DynamicArray | null; + second: DynamicArray | null; + third?: DynamicArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicComposite.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicComposite.ts new file mode 100644 index 0000000000..f8a8dfc967 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicComposite.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_application_3_1_DynamicComposite = _test_llm_application({ + model: "3.1", + name: "DynamicComposite", +})(typia.llm.application()); + +interface DynamicCompositeApplication { + insert(p: { first: DynamicComposite }): Promise; + reduce(p: { + first: DynamicComposite; + second: DynamicComposite | null; + }): Promise; + coalesce(p: { + first: DynamicComposite | null; + second: DynamicComposite | null; + third?: DynamicComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicConstant.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicConstant.ts new file mode 100644 index 0000000000..cb56993182 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicConstant.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_application_3_1_DynamicConstant = _test_llm_application({ + model: "3.1", + name: "DynamicConstant", +})(typia.llm.application()); + +interface DynamicConstantApplication { + insert(p: { first: DynamicConstant }): Promise; + reduce(p: { + first: DynamicConstant; + second: DynamicConstant | null; + }): Promise; + coalesce(p: { + first: DynamicConstant | null; + second: DynamicConstant | null; + third?: DynamicConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicEnumeration.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicEnumeration.ts new file mode 100644 index 0000000000..4b0e822a71 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_application_3_1_DynamicEnumeration = + _test_llm_application({ + model: "3.1", + name: "DynamicEnumeration", + })(typia.llm.application()); + +interface DynamicEnumerationApplication { + insert(p: { first: DynamicEnumeration }): Promise; + reduce(p: { + first: DynamicEnumeration; + second: DynamicEnumeration | null; + }): Promise; + coalesce(p: { + first: DynamicEnumeration | null; + second: DynamicEnumeration | null; + third?: DynamicEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicNever.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicNever.ts new file mode 100644 index 0000000000..82aaf8290d --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicNever.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_application_3_1_DynamicNever = _test_llm_application({ + model: "3.1", + name: "DynamicNever", +})(typia.llm.application()); + +interface DynamicNeverApplication { + insert(p: { first: DynamicNever }): Promise; + reduce(p: { + first: DynamicNever; + second: DynamicNever | null; + }): Promise; + coalesce(p: { + first: DynamicNever | null; + second: DynamicNever | null; + third?: DynamicNever | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicSimple.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicSimple.ts new file mode 100644 index 0000000000..29ed8a8c8d --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_application_3_1_DynamicSimple = _test_llm_application({ + model: "3.1", + name: "DynamicSimple", +})(typia.llm.application()); + +interface DynamicSimpleApplication { + insert(p: { first: DynamicSimple }): Promise; + reduce(p: { + first: DynamicSimple; + second: DynamicSimple | null; + }): Promise; + coalesce(p: { + first: DynamicSimple | null; + second: DynamicSimple | null; + third?: DynamicSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicTemplate.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicTemplate.ts new file mode 100644 index 0000000000..7d9fce4be9 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicTemplate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_application_3_1_DynamicTemplate = _test_llm_application({ + model: "3.1", + name: "DynamicTemplate", +})(typia.llm.application()); + +interface DynamicTemplateApplication { + insert(p: { first: DynamicTemplate }): Promise; + reduce(p: { + first: DynamicTemplate; + second: DynamicTemplate | null; + }): Promise; + coalesce(p: { + first: DynamicTemplate | null; + second: DynamicTemplate | null; + third?: DynamicTemplate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicTree.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicTree.ts new file mode 100644 index 0000000000..839a928ec7 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicTree.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_application_3_1_DynamicTree = _test_llm_application({ + model: "3.1", + name: "DynamicTree", +})(typia.llm.application()); + +interface DynamicTreeApplication { + insert(p: { first: DynamicTree }): Promise; + reduce(p: { + first: DynamicTree; + second: DynamicTree | null; + }): Promise; + coalesce(p: { + first: DynamicTree | null; + second: DynamicTree | null; + third?: DynamicTree | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicUndefined.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicUndefined.ts new file mode 100644 index 0000000000..0d4d61e141 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicUndefined.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_application_3_1_DynamicUndefined = _test_llm_application({ + model: "3.1", + name: "DynamicUndefined", +})(typia.llm.application()); + +interface DynamicUndefinedApplication { + insert(p: { first: DynamicUndefined }): Promise; + reduce(p: { + first: DynamicUndefined; + second: DynamicUndefined | null; + }): Promise; + coalesce(p: { + first: DynamicUndefined | null; + second: DynamicUndefined | null; + third?: DynamicUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicUnion.ts new file mode 100644 index 0000000000..aeb91f79f3 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_DynamicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_application_3_1_DynamicUnion = _test_llm_application({ + model: "3.1", + name: "DynamicUnion", +})(typia.llm.application()); + +interface DynamicUnionApplication { + insert(p: { first: DynamicUnion }): Promise; + reduce(p: { + first: DynamicUnion; + second: DynamicUnion | null; + }): Promise; + coalesce(p: { + first: DynamicUnion | null; + second: DynamicUnion | null; + third?: DynamicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectAlias.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectAlias.ts new file mode 100644 index 0000000000..ac9c0685a1 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectAlias.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_application_3_1_ObjectAlias = _test_llm_application({ + model: "3.1", + name: "ObjectAlias", +})(typia.llm.application()); + +interface ObjectAliasApplication { + insert(p: { first: ObjectAlias }): Promise; + reduce(p: { + first: ObjectAlias; + second: ObjectAlias | null; + }): Promise; + coalesce(p: { + first: ObjectAlias | null; + second: ObjectAlias | null; + third?: ObjectAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDate.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDate.ts new file mode 100644 index 0000000000..5736bba20d --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_application_3_1_ObjectDate = _test_llm_application({ + model: "3.1", + name: "ObjectDate", +})(typia.llm.application()); + +interface ObjectDateApplication { + insert(p: { first: ObjectDate }): Promise; + reduce(p: { + first: ObjectDate; + second: ObjectDate | null; + }): Promise; + coalesce(p: { + first: ObjectDate | null; + second: ObjectDate | null; + third?: ObjectDate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDescription.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDescription.ts new file mode 100644 index 0000000000..73c6e9b419 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDescription.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_application_3_1_ObjectDescription = _test_llm_application( + { + model: "3.1", + name: "ObjectDescription", + }, +)(typia.llm.application()); + +interface ObjectDescriptionApplication { + insert(p: { first: ObjectDescription }): Promise; + reduce(p: { + first: ObjectDescription; + second: ObjectDescription | null; + }): Promise; + coalesce(p: { + first: ObjectDescription | null; + second: ObjectDescription | null; + third?: ObjectDescription | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDynamic.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDynamic.ts new file mode 100644 index 0000000000..de01c1d16e --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectDynamic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_application_3_1_ObjectDynamic = _test_llm_application({ + model: "3.1", + name: "ObjectDynamic", +})(typia.llm.application()); + +interface ObjectDynamicApplication { + insert(p: { first: ObjectDynamic }): Promise; + reduce(p: { + first: ObjectDynamic; + second: ObjectDynamic | null; + }): Promise; + coalesce(p: { + first: ObjectDynamic | null; + second: ObjectDynamic | null; + third?: ObjectDynamic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericAlias.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericAlias.ts new file mode 100644 index 0000000000..323eea37f8 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericAlias.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_application_3_1_ObjectGenericAlias = + _test_llm_application({ + model: "3.1", + name: "ObjectGenericAlias", + })(typia.llm.application()); + +interface ObjectGenericAliasApplication { + insert(p: { first: ObjectGenericAlias }): Promise; + reduce(p: { + first: ObjectGenericAlias; + second: ObjectGenericAlias | null; + }): Promise; + coalesce(p: { + first: ObjectGenericAlias | null; + second: ObjectGenericAlias | null; + third?: ObjectGenericAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericArray.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericArray.ts new file mode 100644 index 0000000000..4fcc62877a --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_application_3_1_ObjectGenericArray = + _test_llm_application({ + model: "3.1", + name: "ObjectGenericArray", + })(typia.llm.application()); + +interface ObjectGenericArrayApplication { + insert(p: { first: ObjectGenericArray }): Promise; + reduce(p: { + first: ObjectGenericArray; + second: ObjectGenericArray | null; + }): Promise; + coalesce(p: { + first: ObjectGenericArray | null; + second: ObjectGenericArray | null; + third?: ObjectGenericArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericUnion.ts new file mode 100644 index 0000000000..422fec79be --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectGenericUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_application_3_1_ObjectGenericUnion = + _test_llm_application({ + model: "3.1", + name: "ObjectGenericUnion", + })(typia.llm.application()); + +interface ObjectGenericUnionApplication { + insert(p: { first: ObjectGenericUnion }): Promise; + reduce(p: { + first: ObjectGenericUnion; + second: ObjectGenericUnion | null; + }): Promise; + coalesce(p: { + first: ObjectGenericUnion | null; + second: ObjectGenericUnion | null; + third?: ObjectGenericUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectInternal.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectInternal.ts new file mode 100644 index 0000000000..08d5550a6b --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectInternal.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_application_3_1_ObjectInternal = _test_llm_application({ + model: "3.1", + name: "ObjectInternal", +})(typia.llm.application()); + +interface ObjectInternalApplication { + insert(p: { first: ObjectInternal }): Promise; + reduce(p: { + first: ObjectInternal; + second: ObjectInternal | null; + }): Promise; + coalesce(p: { + first: ObjectInternal | null; + second: ObjectInternal | null; + third?: ObjectInternal | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectIntersection.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectIntersection.ts new file mode 100644 index 0000000000..ef0f57b7d1 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectIntersection.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_application_3_1_ObjectIntersection = + _test_llm_application({ + model: "3.1", + name: "ObjectIntersection", + })(typia.llm.application()); + +interface ObjectIntersectionApplication { + insert(p: { first: ObjectIntersection }): Promise; + reduce(p: { + first: ObjectIntersection; + second: ObjectIntersection | null; + }): Promise; + coalesce(p: { + first: ObjectIntersection | null; + second: ObjectIntersection | null; + third?: ObjectIntersection | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectJsonTag.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectJsonTag.ts new file mode 100644 index 0000000000..3908dcdd5f --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectJsonTag.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_application_3_1_ObjectJsonTag = _test_llm_application({ + model: "3.1", + name: "ObjectJsonTag", +})(typia.llm.application()); + +interface ObjectJsonTagApplication { + insert(p: { first: ObjectJsonTag }): Promise; + reduce(p: { + first: ObjectJsonTag; + second: ObjectJsonTag | null; + }): Promise; + coalesce(p: { + first: ObjectJsonTag | null; + second: ObjectJsonTag | null; + third?: ObjectJsonTag | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectLiteralProperty.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..a5c0b57f52 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectLiteralProperty.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_application_3_1_ObjectLiteralProperty = + _test_llm_application({ + model: "3.1", + name: "ObjectLiteralProperty", + })(typia.llm.application()); + +interface ObjectLiteralPropertyApplication { + insert(p: { first: ObjectLiteralProperty }): Promise; + reduce(p: { + first: ObjectLiteralProperty; + second: ObjectLiteralProperty | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralProperty | null; + second: ObjectLiteralProperty | null; + third?: ObjectLiteralProperty | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectLiteralType.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectLiteralType.ts new file mode 100644 index 0000000000..8a58d51643 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectLiteralType.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_application_3_1_ObjectLiteralType = _test_llm_application( + { + model: "3.1", + name: "ObjectLiteralType", + }, +)(typia.llm.application()); + +interface ObjectLiteralTypeApplication { + insert(p: { first: ObjectLiteralType }): Promise; + reduce(p: { + first: ObjectLiteralType; + second: ObjectLiteralType | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralType | null; + second: ObjectLiteralType | null; + third?: ObjectLiteralType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectNullable.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectNullable.ts new file mode 100644 index 0000000000..17a458c176 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectNullable.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_application_3_1_ObjectNullable = _test_llm_application({ + model: "3.1", + name: "ObjectNullable", +})(typia.llm.application()); + +interface ObjectNullableApplication { + insert(p: { first: ObjectNullable }): Promise; + reduce(p: { + first: ObjectNullable; + second: ObjectNullable | null; + }): Promise; + coalesce(p: { + first: ObjectNullable | null; + second: ObjectNullable | null; + third?: ObjectNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectOptional.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectOptional.ts new file mode 100644 index 0000000000..62e3fbce9b --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectOptional.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_application_3_1_ObjectOptional = _test_llm_application({ + model: "3.1", + name: "ObjectOptional", +})(typia.llm.application()); + +interface ObjectOptionalApplication { + insert(p: { first: ObjectOptional }): Promise; + reduce(p: { + first: ObjectOptional; + second: ObjectOptional | null; + }): Promise; + coalesce(p: { + first: ObjectOptional | null; + second: ObjectOptional | null; + third?: ObjectOptional | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPartial.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPartial.ts new file mode 100644 index 0000000000..dc18d12ad5 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPartial.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_application_3_1_ObjectPartial = _test_llm_application({ + model: "3.1", + name: "ObjectPartial", +})(typia.llm.application()); + +interface ObjectPartialApplication { + insert(p: { first: ObjectPartial }): Promise; + reduce(p: { + first: ObjectPartial; + second: ObjectPartial | null; + }): Promise; + coalesce(p: { + first: ObjectPartial | null; + second: ObjectPartial | null; + third?: ObjectPartial | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPartialAndRequired.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..8b659da1be --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPartialAndRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_application_3_1_ObjectPartialAndRequired = + _test_llm_application({ + model: "3.1", + name: "ObjectPartialAndRequired", + })(typia.llm.application()); + +interface ObjectPartialAndRequiredApplication { + insert(p: { first: ObjectPartialAndRequired }): Promise; + reduce(p: { + first: ObjectPartialAndRequired; + second: ObjectPartialAndRequired | null; + }): Promise; + coalesce(p: { + first: ObjectPartialAndRequired | null; + second: ObjectPartialAndRequired | null; + third?: ObjectPartialAndRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPrimitive.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPrimitive.ts new file mode 100644 index 0000000000..a5a8f396a2 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectPrimitive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_application_3_1_ObjectPrimitive = _test_llm_application({ + model: "3.1", + name: "ObjectPrimitive", +})(typia.llm.application()); + +interface ObjectPrimitiveApplication { + insert(p: { first: ObjectPrimitive }): Promise; + reduce(p: { + first: ObjectPrimitive; + second: ObjectPrimitive | null; + }): Promise; + coalesce(p: { + first: ObjectPrimitive | null; + second: ObjectPrimitive | null; + third?: ObjectPrimitive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectRecursive.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectRecursive.ts new file mode 100644 index 0000000000..1e928c762a --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectRecursive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_application_3_1_ObjectRecursive = _test_llm_application({ + model: "3.1", + name: "ObjectRecursive", +})(typia.llm.application()); + +interface ObjectRecursiveApplication { + insert(p: { first: ObjectRecursive }): Promise; + reduce(p: { + first: ObjectRecursive; + second: ObjectRecursive | null; + }): Promise; + coalesce(p: { + first: ObjectRecursive | null; + second: ObjectRecursive | null; + third?: ObjectRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectRequired.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectRequired.ts new file mode 100644 index 0000000000..0d31bfd0a2 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectRequired.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_application_3_1_ObjectRequired = _test_llm_application({ + model: "3.1", + name: "ObjectRequired", +})(typia.llm.application()); + +interface ObjectRequiredApplication { + insert(p: { first: ObjectRequired }): Promise; + reduce(p: { + first: ObjectRequired; + second: ObjectRequired | null; + }): Promise; + coalesce(p: { + first: ObjectRequired | null; + second: ObjectRequired | null; + third?: ObjectRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectSimple.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectSimple.ts new file mode 100644 index 0000000000..f37610dddc --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_application_3_1_ObjectSimple = _test_llm_application({ + model: "3.1", + name: "ObjectSimple", +})(typia.llm.application()); + +interface ObjectSimpleApplication { + insert(p: { first: ObjectSimple }): Promise; + reduce(p: { + first: ObjectSimple; + second: ObjectSimple | null; + }): Promise; + coalesce(p: { + first: ObjectSimple | null; + second: ObjectSimple | null; + third?: ObjectSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUndefined.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUndefined.ts new file mode 100644 index 0000000000..3dc9775d66 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUndefined.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_application_3_1_ObjectUndefined = _test_llm_application({ + model: "3.1", + name: "ObjectUndefined", +})(typia.llm.application()); + +interface ObjectUndefinedApplication { + insert(p: { first: ObjectUndefined }): Promise; + reduce(p: { + first: ObjectUndefined; + second: ObjectUndefined | null; + }): Promise; + coalesce(p: { + first: ObjectUndefined | null; + second: ObjectUndefined | null; + third?: ObjectUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionComposite.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionComposite.ts new file mode 100644 index 0000000000..51542a98a8 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_application_3_1_ObjectUnionComposite = + _test_llm_application({ + model: "3.1", + name: "ObjectUnionComposite", + })(typia.llm.application()); + +interface ObjectUnionCompositeApplication { + insert(p: { first: ObjectUnionComposite }): Promise; + reduce(p: { + first: ObjectUnionComposite; + second: ObjectUnionComposite | null; + }): Promise; + coalesce(p: { + first: ObjectUnionComposite | null; + second: ObjectUnionComposite | null; + third?: ObjectUnionComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionCompositePointer.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..131a7901a4 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionCompositePointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_application_3_1_ObjectUnionCompositePointer = + _test_llm_application({ + model: "3.1", + name: "ObjectUnionCompositePointer", + })(typia.llm.application()); + +interface ObjectUnionCompositePointerApplication { + insert(p: { first: ObjectUnionCompositePointer }): Promise; + reduce(p: { + first: ObjectUnionCompositePointer; + second: ObjectUnionCompositePointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionCompositePointer | null; + second: ObjectUnionCompositePointer | null; + third?: ObjectUnionCompositePointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionDouble.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionDouble.ts new file mode 100644 index 0000000000..61ca8c899b --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionDouble.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_application_3_1_ObjectUnionDouble = _test_llm_application( + { + model: "3.1", + name: "ObjectUnionDouble", + }, +)(typia.llm.application()); + +interface ObjectUnionDoubleApplication { + insert(p: { first: ObjectUnionDouble }): Promise; + reduce(p: { + first: ObjectUnionDouble; + second: ObjectUnionDouble | null; + }): Promise; + coalesce(p: { + first: ObjectUnionDouble | null; + second: ObjectUnionDouble | null; + third?: ObjectUnionDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionExplicit.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..fb43d92d37 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_application_3_1_ObjectUnionExplicit = + _test_llm_application({ + model: "3.1", + name: "ObjectUnionExplicit", + })(typia.llm.application()); + +interface ObjectUnionExplicitApplication { + insert(p: { first: ObjectUnionExplicit }): Promise; + reduce(p: { + first: ObjectUnionExplicit; + second: ObjectUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicit | null; + second: ObjectUnionExplicit | null; + third?: ObjectUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionExplicitPointer.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..da7a16042f --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_application_3_1_ObjectUnionExplicitPointer = + _test_llm_application({ + model: "3.1", + name: "ObjectUnionExplicitPointer", + })(typia.llm.application()); + +interface ObjectUnionExplicitPointerApplication { + insert(p: { first: ObjectUnionExplicitPointer }): Promise; + reduce(p: { + first: ObjectUnionExplicitPointer; + second: ObjectUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicitPointer | null; + second: ObjectUnionExplicitPointer | null; + third?: ObjectUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionImplicit.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..5e23a95d12 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_application_3_1_ObjectUnionImplicit = + _test_llm_application({ + model: "3.1", + name: "ObjectUnionImplicit", + })(typia.llm.application()); + +interface ObjectUnionImplicitApplication { + insert(p: { first: ObjectUnionImplicit }): Promise; + reduce(p: { + first: ObjectUnionImplicit; + second: ObjectUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionImplicit | null; + second: ObjectUnionImplicit | null; + third?: ObjectUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionNonPredictable.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..3bd8334626 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ObjectUnionNonPredictable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_application_3_1_ObjectUnionNonPredictable = + _test_llm_application({ + model: "3.1", + name: "ObjectUnionNonPredictable", + })(typia.llm.application()); + +interface ObjectUnionNonPredictableApplication { + insert(p: { first: ObjectUnionNonPredictable }): Promise; + reduce(p: { + first: ObjectUnionNonPredictable; + second: ObjectUnionNonPredictable | null; + }): Promise; + coalesce(p: { + first: ObjectUnionNonPredictable | null; + second: ObjectUnionNonPredictable | null; + third?: ObjectUnionNonPredictable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateAtomic.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateAtomic.ts new file mode 100644 index 0000000000..63fa686a95 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateAtomic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_application_3_1_TemplateAtomic = _test_llm_application({ + model: "3.1", + name: "TemplateAtomic", +})(typia.llm.application()); + +interface TemplateAtomicApplication { + insert(p: { first: TemplateAtomic }): Promise; + reduce(p: { + first: TemplateAtomic; + second: TemplateAtomic | null; + }): Promise; + coalesce(p: { + first: TemplateAtomic | null; + second: TemplateAtomic | null; + third?: TemplateAtomic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateConstant.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateConstant.ts new file mode 100644 index 0000000000..7e9310e7d4 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateConstant.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_application_3_1_TemplateConstant = _test_llm_application({ + model: "3.1", + name: "TemplateConstant", +})(typia.llm.application()); + +interface TemplateConstantApplication { + insert(p: { first: TemplateConstant }): Promise; + reduce(p: { + first: TemplateConstant; + second: TemplateConstant | null; + }): Promise; + coalesce(p: { + first: TemplateConstant | null; + second: TemplateConstant | null; + third?: TemplateConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateUnion.ts new file mode 100644 index 0000000000..f9d492538d --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TemplateUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_application_3_1_TemplateUnion = _test_llm_application({ + model: "3.1", + name: "TemplateUnion", +})(typia.llm.application()); + +interface TemplateUnionApplication { + insert(p: { first: TemplateUnion }): Promise; + reduce(p: { + first: TemplateUnion; + second: TemplateUnion | null; + }): Promise; + coalesce(p: { + first: TemplateUnion | null; + second: TemplateUnion | null; + third?: TemplateUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonAtomicUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..fbb85a8165 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonAtomicUnion.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_application_3_1_ToJsonAtomicUnion = _test_llm_application( + { + model: "3.1", + name: "ToJsonAtomicUnion", + }, +)(typia.llm.application()); + +interface ToJsonAtomicUnionApplication { + insert(p: { first: ToJsonAtomicUnion }): Promise; + reduce(p: { + first: ToJsonAtomicUnion; + second: ToJsonAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonAtomicUnion | null; + second: ToJsonAtomicUnion | null; + third?: ToJsonAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonDouble.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonDouble.ts new file mode 100644 index 0000000000..867a57a824 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonDouble.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_application_3_1_ToJsonDouble = _test_llm_application({ + model: "3.1", + name: "ToJsonDouble", +})(typia.llm.application()); + +interface ToJsonDoubleApplication { + insert(p: { first: ToJsonDouble }): Promise; + reduce(p: { + first: ToJsonDouble; + second: ToJsonDouble | null; + }): Promise; + coalesce(p: { + first: ToJsonDouble | null; + second: ToJsonDouble | null; + third?: ToJsonDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonNull.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonNull.ts new file mode 100644 index 0000000000..cbcdd8d68c --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonNull.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_application_3_1_ToJsonNull = _test_llm_application({ + model: "3.1", + name: "ToJsonNull", +})(typia.llm.application()); + +interface ToJsonNullApplication { + insert(p: { first: ToJsonNull }): Promise; + reduce(p: { + first: ToJsonNull; + second: ToJsonNull | null; + }): Promise; + coalesce(p: { + first: ToJsonNull | null; + second: ToJsonNull | null; + third?: ToJsonNull | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonUnion.ts new file mode 100644 index 0000000000..45c5a8faed --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_ToJsonUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_application_3_1_ToJsonUnion = _test_llm_application({ + model: "3.1", + name: "ToJsonUnion", +})(typia.llm.application()); + +interface ToJsonUnionApplication { + insert(p: { first: ToJsonUnion }): Promise; + reduce(p: { + first: ToJsonUnion; + second: ToJsonUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonUnion | null; + second: ToJsonUnion | null; + third?: ToJsonUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagArray.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagArray.ts new file mode 100644 index 0000000000..6ea0371f12 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_application_3_1_TypeTagArray = _test_llm_application({ + model: "3.1", + name: "TypeTagArray", +})(typia.llm.application()); + +interface TypeTagArrayApplication { + insert(p: { first: TypeTagArray }): Promise; + reduce(p: { + first: TypeTagArray; + second: TypeTagArray | null; + }): Promise; + coalesce(p: { + first: TypeTagArray | null; + second: TypeTagArray | null; + third?: TypeTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagArrayUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..7c7f214202 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagArrayUnion.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_application_3_1_TypeTagArrayUnion = _test_llm_application( + { + model: "3.1", + name: "TypeTagArrayUnion", + }, +)(typia.llm.application()); + +interface TypeTagArrayUnionApplication { + insert(p: { first: TypeTagArrayUnion }): Promise; + reduce(p: { + first: TypeTagArrayUnion; + second: TypeTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagArrayUnion | null; + second: TypeTagArrayUnion | null; + third?: TypeTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagAtomicUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..819d621db9 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_application_3_1_TypeTagAtomicUnion = + _test_llm_application({ + model: "3.1", + name: "TypeTagAtomicUnion", + })(typia.llm.application()); + +interface TypeTagAtomicUnionApplication { + insert(p: { first: TypeTagAtomicUnion }): Promise; + reduce(p: { + first: TypeTagAtomicUnion; + second: TypeTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagAtomicUnion | null; + second: TypeTagAtomicUnion | null; + third?: TypeTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagCustom.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagCustom.ts new file mode 100644 index 0000000000..d2222ce5e2 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagCustom.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_application_3_1_TypeTagCustom = _test_llm_application({ + model: "3.1", + name: "TypeTagCustom", +})(typia.llm.application()); + +interface TypeTagCustomApplication { + insert(p: { first: TypeTagCustom }): Promise; + reduce(p: { + first: TypeTagCustom; + second: TypeTagCustom | null; + }): Promise; + coalesce(p: { + first: TypeTagCustom | null; + second: TypeTagCustom | null; + third?: TypeTagCustom | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagDefault.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagDefault.ts new file mode 100644 index 0000000000..ea63933e5f --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagDefault.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_application_3_1_TypeTagDefault = _test_llm_application({ + model: "3.1", + name: "TypeTagDefault", +})(typia.llm.application()); + +interface TypeTagDefaultApplication { + insert(p: { first: TypeTagDefault }): Promise; + reduce(p: { + first: TypeTagDefault; + second: TypeTagDefault | null; + }): Promise; + coalesce(p: { + first: TypeTagDefault | null; + second: TypeTagDefault | null; + third?: TypeTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagFormat.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagFormat.ts new file mode 100644 index 0000000000..e7f1d65e2a --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_application_3_1_TypeTagFormat = _test_llm_application({ + model: "3.1", + name: "TypeTagFormat", +})(typia.llm.application()); + +interface TypeTagFormatApplication { + insert(p: { first: TypeTagFormat }): Promise; + reduce(p: { + first: TypeTagFormat; + second: TypeTagFormat | null; + }): Promise; + coalesce(p: { + first: TypeTagFormat | null; + second: TypeTagFormat | null; + third?: TypeTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagLength.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagLength.ts new file mode 100644 index 0000000000..8873bd6e13 --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_application_3_1_TypeTagLength = _test_llm_application({ + model: "3.1", + name: "TypeTagLength", +})(typia.llm.application()); + +interface TypeTagLengthApplication { + insert(p: { first: TypeTagLength }): Promise; + reduce(p: { + first: TypeTagLength; + second: TypeTagLength | null; + }): Promise; + coalesce(p: { + first: TypeTagLength | null; + second: TypeTagLength | null; + third?: TypeTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagMatrix.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagMatrix.ts new file mode 100644 index 0000000000..54459ec1ce --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_application_3_1_TypeTagMatrix = _test_llm_application({ + model: "3.1", + name: "TypeTagMatrix", +})(typia.llm.application()); + +interface TypeTagMatrixApplication { + insert(p: { first: TypeTagMatrix }): Promise; + reduce(p: { + first: TypeTagMatrix; + second: TypeTagMatrix | null; + }): Promise; + coalesce(p: { + first: TypeTagMatrix | null; + second: TypeTagMatrix | null; + third?: TypeTagMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagObjectUnion.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..b38048248b --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_application_3_1_TypeTagObjectUnion = + _test_llm_application({ + model: "3.1", + name: "TypeTagObjectUnion", + })(typia.llm.application()); + +interface TypeTagObjectUnionApplication { + insert(p: { first: TypeTagObjectUnion }): Promise; + reduce(p: { + first: TypeTagObjectUnion; + second: TypeTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagObjectUnion | null; + second: TypeTagObjectUnion | null; + third?: TypeTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagPattern.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagPattern.ts new file mode 100644 index 0000000000..9afb5a876b --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagPattern.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_application_3_1_TypeTagPattern = _test_llm_application({ + model: "3.1", + name: "TypeTagPattern", +})(typia.llm.application()); + +interface TypeTagPatternApplication { + insert(p: { first: TypeTagPattern }): Promise; + reduce(p: { + first: TypeTagPattern; + second: TypeTagPattern | null; + }): Promise; + coalesce(p: { + first: TypeTagPattern | null; + second: TypeTagPattern | null; + third?: TypeTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagRange.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagRange.ts new file mode 100644 index 0000000000..777faf565c --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_application_3_1_TypeTagRange = _test_llm_application({ + model: "3.1", + name: "TypeTagRange", +})(typia.llm.application()); + +interface TypeTagRangeApplication { + insert(p: { first: TypeTagRange }): Promise; + reduce(p: { + first: TypeTagRange; + second: TypeTagRange | null; + }): Promise; + coalesce(p: { + first: TypeTagRange | null; + second: TypeTagRange | null; + third?: TypeTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagType.ts b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagType.ts new file mode 100644 index 0000000000..570eecf6fb --- /dev/null +++ b/test/src/features/llm.application/3.1/test_llm_application_3_1_TypeTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_application_3_1_TypeTagType = _test_llm_application({ + model: "3.1", + name: "TypeTagType", +})(typia.llm.application()); + +interface TypeTagTypeApplication { + insert(p: { first: TypeTagType }): Promise; + reduce(p: { + first: TypeTagType; + second: TypeTagType | null; + }): Promise; + coalesce(p: { + first: TypeTagType | null; + second: TypeTagType | null; + third?: TypeTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayAny.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayAny.ts new file mode 100644 index 0000000000..94673a0eb8 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayAny.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_application_chatgpt_ArrayAny = _test_llm_application({ + model: "chatgpt", + name: "ArrayAny", +})(typia.llm.application()); + +interface ArrayAnyApplication { + insert(p: { first: ArrayAny }): Promise; + reduce(p: { first: ArrayAny; second: ArrayAny | null }): Promise; + coalesce(p: { + first: ArrayAny | null; + second: ArrayAny | null; + third?: ArrayAny | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayHierarchical.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayHierarchical.ts new file mode 100644 index 0000000000..e4abbc3a22 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayHierarchical.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_application_chatgpt_ArrayHierarchical = + _test_llm_application({ + model: "chatgpt", + name: "ArrayHierarchical", + })(typia.llm.application()); + +interface ArrayHierarchicalApplication { + insert(p: { first: ArrayHierarchical }): Promise; + reduce(p: { + first: ArrayHierarchical; + second: ArrayHierarchical | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchical | null; + second: ArrayHierarchical | null; + third?: ArrayHierarchical | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayHierarchicalPointer.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..1cfb13e25f --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayHierarchicalPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_application_chatgpt_ArrayHierarchicalPointer = + _test_llm_application({ + model: "chatgpt", + name: "ArrayHierarchicalPointer", + })(typia.llm.application()); + +interface ArrayHierarchicalPointerApplication { + insert(p: { first: ArrayHierarchicalPointer }): Promise; + reduce(p: { + first: ArrayHierarchicalPointer; + second: ArrayHierarchicalPointer | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchicalPointer | null; + second: ArrayHierarchicalPointer | null; + third?: ArrayHierarchicalPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayMatrix.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayMatrix.ts new file mode 100644 index 0000000000..4e8ebd95d3 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_application_chatgpt_ArrayMatrix = _test_llm_application({ + model: "chatgpt", + name: "ArrayMatrix", +})(typia.llm.application()); + +interface ArrayMatrixApplication { + insert(p: { first: ArrayMatrix }): Promise; + reduce(p: { + first: ArrayMatrix; + second: ArrayMatrix | null; + }): Promise; + coalesce(p: { + first: ArrayMatrix | null; + second: ArrayMatrix | null; + third?: ArrayMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursive.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursive.ts new file mode 100644 index 0000000000..8e808ab978 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_application_chatgpt_ArrayRecursive = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRecursive", + })(typia.llm.application()); + +interface ArrayRecursiveApplication { + insert(p: { first: ArrayRecursive }): Promise; + reduce(p: { + first: ArrayRecursive; + second: ArrayRecursive | null; + }): Promise; + coalesce(p: { + first: ArrayRecursive | null; + second: ArrayRecursive | null; + third?: ArrayRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..59299b5ab3 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,25 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_application_chatgpt_ArrayRecursiveUnionExplicit = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRecursiveUnionExplicit", + })( + typia.llm.application(), + ); + +interface ArrayRecursiveUnionExplicitApplication { + insert(p: { first: ArrayRecursiveUnionExplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicit; + second: ArrayRecursiveUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicit | null; + second: ArrayRecursiveUnionExplicit | null; + third?: ArrayRecursiveUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..a1098ce8e0 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,28 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_application_chatgpt_ArrayRecursiveUnionExplicitPointer = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.application< + ArrayRecursiveUnionExplicitPointerApplication, + "chatgpt" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerApplication { + insert(p: { first: ArrayRecursiveUnionExplicitPointer }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicitPointer; + second: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicitPointer | null; + second: ArrayRecursiveUnionExplicitPointer | null; + third?: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..2843ec64e1 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,25 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_application_chatgpt_ArrayRecursiveUnionImplicit = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRecursiveUnionImplicit", + })( + typia.llm.application(), + ); + +interface ArrayRecursiveUnionImplicitApplication { + insert(p: { first: ArrayRecursiveUnionImplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionImplicit; + second: ArrayRecursiveUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionImplicit | null; + second: ArrayRecursiveUnionImplicit | null; + third?: ArrayRecursiveUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedNullable.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..c1dd328b3b --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedNullable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_application_chatgpt_ArrayRepeatedNullable = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRepeatedNullable", + })(typia.llm.application()); + +interface ArrayRepeatedNullableApplication { + insert(p: { first: ArrayRepeatedNullable }): Promise; + reduce(p: { + first: ArrayRepeatedNullable; + second: ArrayRepeatedNullable | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedNullable | null; + second: ArrayRepeatedNullable | null; + third?: ArrayRepeatedNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedRequired.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..57d860ab34 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_application_chatgpt_ArrayRepeatedRequired = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRepeatedRequired", + })(typia.llm.application()); + +interface ArrayRepeatedRequiredApplication { + insert(p: { first: ArrayRepeatedRequired }): Promise; + reduce(p: { + first: ArrayRepeatedRequired; + second: ArrayRepeatedRequired | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedRequired | null; + second: ArrayRepeatedRequired | null; + third?: ArrayRepeatedRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..a9b373bc5f --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayRepeatedUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_application_chatgpt_ArrayRepeatedUnion = + _test_llm_application({ + model: "chatgpt", + name: "ArrayRepeatedUnion", + })(typia.llm.application()); + +interface ArrayRepeatedUnionApplication { + insert(p: { first: ArrayRepeatedUnion }): Promise; + reduce(p: { + first: ArrayRepeatedUnion; + second: ArrayRepeatedUnion | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedUnion | null; + second: ArrayRepeatedUnion | null; + third?: ArrayRepeatedUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArraySimple.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArraySimple.ts new file mode 100644 index 0000000000..2e131d6df9 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArraySimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_application_chatgpt_ArraySimple = _test_llm_application({ + model: "chatgpt", + name: "ArraySimple", +})(typia.llm.application()); + +interface ArraySimpleApplication { + insert(p: { first: ArraySimple }): Promise; + reduce(p: { + first: ArraySimple; + second: ArraySimple | null; + }): Promise; + coalesce(p: { + first: ArraySimple | null; + second: ArraySimple | null; + third?: ArraySimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayUnion.ts new file mode 100644 index 0000000000..88165fb0d4 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ArrayUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_application_chatgpt_ArrayUnion = _test_llm_application({ + model: "chatgpt", + name: "ArrayUnion", +})(typia.llm.application()); + +interface ArrayUnionApplication { + insert(p: { first: ArrayUnion }): Promise; + reduce(p: { + first: ArrayUnion; + second: ArrayUnion | null; + }): Promise; + coalesce(p: { + first: ArrayUnion | null; + second: ArrayUnion | null; + third?: ArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_AtomicUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_AtomicUnion.ts new file mode 100644 index 0000000000..9a9f647f71 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_AtomicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_application_chatgpt_AtomicUnion = _test_llm_application({ + model: "chatgpt", + name: "AtomicUnion", +})(typia.llm.application()); + +interface AtomicUnionApplication { + insert(p: { first: AtomicUnion }): Promise; + reduce(p: { + first: AtomicUnion; + second: AtomicUnion | null; + }): Promise; + coalesce(p: { + first: AtomicUnion | null; + second: AtomicUnion | null; + third?: AtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassGetter.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassGetter.ts new file mode 100644 index 0000000000..c9918d413a --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassGetter.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_application_chatgpt_ClassGetter = _test_llm_application({ + model: "chatgpt", + name: "ClassGetter", +})(typia.llm.application()); + +interface ClassGetterApplication { + insert(p: { first: ClassGetter }): Promise; + reduce(p: { + first: ClassGetter; + second: ClassGetter | null; + }): Promise; + coalesce(p: { + first: ClassGetter | null; + second: ClassGetter | null; + third?: ClassGetter | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassMethod.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassMethod.ts new file mode 100644 index 0000000000..12184da65e --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassMethod.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_application_chatgpt_ClassMethod = _test_llm_application({ + model: "chatgpt", + name: "ClassMethod", +})(typia.llm.application()); + +interface ClassMethodApplication { + insert(p: { first: ClassMethod }): Promise; + reduce(p: { + first: ClassMethod; + second: ClassMethod | null; + }): Promise; + coalesce(p: { + first: ClassMethod | null; + second: ClassMethod | null; + third?: ClassMethod | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassPropertyAssignment.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..5d3c4df08c --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ClassPropertyAssignment.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_application_chatgpt_ClassPropertyAssignment = + _test_llm_application({ + model: "chatgpt", + name: "ClassPropertyAssignment", + })(typia.llm.application()); + +interface ClassPropertyAssignmentApplication { + insert(p: { first: ClassPropertyAssignment }): Promise; + reduce(p: { + first: ClassPropertyAssignment; + second: ClassPropertyAssignment | null; + }): Promise; + coalesce(p: { + first: ClassPropertyAssignment | null; + second: ClassPropertyAssignment | null; + third?: ClassPropertyAssignment | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagArray.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagArray.ts new file mode 100644 index 0000000000..c4583c3678 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_application_chatgpt_CommentTagArray = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagArray", + })(typia.llm.application()); + +interface CommentTagArrayApplication { + insert(p: { first: CommentTagArray }): Promise; + reduce(p: { + first: CommentTagArray; + second: CommentTagArray | null; + }): Promise; + coalesce(p: { + first: CommentTagArray | null; + second: CommentTagArray | null; + third?: CommentTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagArrayUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..1550c9af4b --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_application_chatgpt_CommentTagArrayUnion = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagArrayUnion", + })(typia.llm.application()); + +interface CommentTagArrayUnionApplication { + insert(p: { first: CommentTagArrayUnion }): Promise; + reduce(p: { + first: CommentTagArrayUnion; + second: CommentTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagArrayUnion | null; + second: CommentTagArrayUnion | null; + third?: CommentTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagAtomicUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..655df5f870 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_application_chatgpt_CommentTagAtomicUnion = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagAtomicUnion", + })(typia.llm.application()); + +interface CommentTagAtomicUnionApplication { + insert(p: { first: CommentTagAtomicUnion }): Promise; + reduce(p: { + first: CommentTagAtomicUnion; + second: CommentTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagAtomicUnion | null; + second: CommentTagAtomicUnion | null; + third?: CommentTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagDefault.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagDefault.ts new file mode 100644 index 0000000000..b8cd9139fd --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagDefault.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_application_chatgpt_CommentTagDefault = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagDefault", + })(typia.llm.application()); + +interface CommentTagDefaultApplication { + insert(p: { first: CommentTagDefault }): Promise; + reduce(p: { + first: CommentTagDefault; + second: CommentTagDefault | null; + }): Promise; + coalesce(p: { + first: CommentTagDefault | null; + second: CommentTagDefault | null; + third?: CommentTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagFormat.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagFormat.ts new file mode 100644 index 0000000000..133652147a --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagFormat.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_application_chatgpt_CommentTagFormat = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagFormat", + })(typia.llm.application()); + +interface CommentTagFormatApplication { + insert(p: { first: CommentTagFormat }): Promise; + reduce(p: { + first: CommentTagFormat; + second: CommentTagFormat | null; + }): Promise; + coalesce(p: { + first: CommentTagFormat | null; + second: CommentTagFormat | null; + third?: CommentTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagLength.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagLength.ts new file mode 100644 index 0000000000..bf5b18ae94 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagLength.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_application_chatgpt_CommentTagLength = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagLength", + })(typia.llm.application()); + +interface CommentTagLengthApplication { + insert(p: { first: CommentTagLength }): Promise; + reduce(p: { + first: CommentTagLength; + second: CommentTagLength | null; + }): Promise; + coalesce(p: { + first: CommentTagLength | null; + second: CommentTagLength | null; + third?: CommentTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagObjectUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..098929206b --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_application_chatgpt_CommentTagObjectUnion = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagObjectUnion", + })(typia.llm.application()); + +interface CommentTagObjectUnionApplication { + insert(p: { first: CommentTagObjectUnion }): Promise; + reduce(p: { + first: CommentTagObjectUnion; + second: CommentTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagObjectUnion | null; + second: CommentTagObjectUnion | null; + third?: CommentTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagPattern.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagPattern.ts new file mode 100644 index 0000000000..b61ebdaa5d --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagPattern.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_application_chatgpt_CommentTagPattern = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagPattern", + })(typia.llm.application()); + +interface CommentTagPatternApplication { + insert(p: { first: CommentTagPattern }): Promise; + reduce(p: { + first: CommentTagPattern; + second: CommentTagPattern | null; + }): Promise; + coalesce(p: { + first: CommentTagPattern | null; + second: CommentTagPattern | null; + third?: CommentTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagRange.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagRange.ts new file mode 100644 index 0000000000..456c295dc4 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagRange.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_application_chatgpt_CommentTagRange = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagRange", + })(typia.llm.application()); + +interface CommentTagRangeApplication { + insert(p: { first: CommentTagRange }): Promise; + reduce(p: { + first: CommentTagRange; + second: CommentTagRange | null; + }): Promise; + coalesce(p: { + first: CommentTagRange | null; + second: CommentTagRange | null; + third?: CommentTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagType.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagType.ts new file mode 100644 index 0000000000..108a5ef06d --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_CommentTagType.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_application_chatgpt_CommentTagType = + _test_llm_application({ + model: "chatgpt", + name: "CommentTagType", + })(typia.llm.application()); + +interface CommentTagTypeApplication { + insert(p: { first: CommentTagType }): Promise; + reduce(p: { + first: CommentTagType; + second: CommentTagType | null; + }): Promise; + coalesce(p: { + first: CommentTagType | null; + second: CommentTagType | null; + third?: CommentTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicAbsorbed.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..187bed27c9 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicAbsorbed.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_application_chatgpt_ConstantAtomicAbsorbed = + _test_llm_application({ + model: "chatgpt", + name: "ConstantAtomicAbsorbed", + })(typia.llm.application()); + +interface ConstantAtomicAbsorbedApplication { + insert(p: { first: ConstantAtomicAbsorbed }): Promise; + reduce(p: { + first: ConstantAtomicAbsorbed; + second: ConstantAtomicAbsorbed | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicAbsorbed | null; + second: ConstantAtomicAbsorbed | null; + third?: ConstantAtomicAbsorbed | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicTagged.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..36f27e709e --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicTagged.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_application_chatgpt_ConstantAtomicTagged = + _test_llm_application({ + model: "chatgpt", + name: "ConstantAtomicTagged", + })(typia.llm.application()); + +interface ConstantAtomicTaggedApplication { + insert(p: { first: ConstantAtomicTagged }): Promise; + reduce(p: { + first: ConstantAtomicTagged; + second: ConstantAtomicTagged | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicTagged | null; + second: ConstantAtomicTagged | null; + third?: ConstantAtomicTagged | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..0b38a62fba --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_application_chatgpt_ConstantAtomicUnion = + _test_llm_application({ + model: "chatgpt", + name: "ConstantAtomicUnion", + })(typia.llm.application()); + +interface ConstantAtomicUnionApplication { + insert(p: { first: ConstantAtomicUnion }): Promise; + reduce(p: { + first: ConstantAtomicUnion; + second: ConstantAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicUnion | null; + second: ConstantAtomicUnion | null; + third?: ConstantAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantConstEnumeration.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..41f1ca7d77 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantConstEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_application_chatgpt_ConstantConstEnumeration = + _test_llm_application({ + model: "chatgpt", + name: "ConstantConstEnumeration", + })(typia.llm.application()); + +interface ConstantConstEnumerationApplication { + insert(p: { first: ConstantConstEnumeration }): Promise; + reduce(p: { + first: ConstantConstEnumeration; + second: ConstantConstEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantConstEnumeration | null; + second: ConstantConstEnumeration | null; + third?: ConstantConstEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantEnumeration.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantEnumeration.ts new file mode 100644 index 0000000000..67a4da2276 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ConstantEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_application_chatgpt_ConstantEnumeration = + _test_llm_application({ + model: "chatgpt", + name: "ConstantEnumeration", + })(typia.llm.application()); + +interface ConstantEnumerationApplication { + insert(p: { first: ConstantEnumeration }): Promise; + reduce(p: { + first: ConstantEnumeration; + second: ConstantEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantEnumeration | null; + second: ConstantEnumeration | null; + third?: ConstantEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicConstant.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicConstant.ts new file mode 100644 index 0000000000..1e065f82e1 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_application_chatgpt_DynamicConstant = + _test_llm_application({ + model: "chatgpt", + name: "DynamicConstant", + })(typia.llm.application()); + +interface DynamicConstantApplication { + insert(p: { first: DynamicConstant }): Promise; + reduce(p: { + first: DynamicConstant; + second: DynamicConstant | null; + }): Promise; + coalesce(p: { + first: DynamicConstant | null; + second: DynamicConstant | null; + third?: DynamicConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicEnumeration.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicEnumeration.ts new file mode 100644 index 0000000000..31b946c364 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_application_chatgpt_DynamicEnumeration = + _test_llm_application({ + model: "chatgpt", + name: "DynamicEnumeration", + })(typia.llm.application()); + +interface DynamicEnumerationApplication { + insert(p: { first: DynamicEnumeration }): Promise; + reduce(p: { + first: DynamicEnumeration; + second: DynamicEnumeration | null; + }): Promise; + coalesce(p: { + first: DynamicEnumeration | null; + second: DynamicEnumeration | null; + third?: DynamicEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicNever.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicNever.ts new file mode 100644 index 0000000000..3759d9629e --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicNever.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_application_chatgpt_DynamicNever = _test_llm_application({ + model: "chatgpt", + name: "DynamicNever", +})(typia.llm.application()); + +interface DynamicNeverApplication { + insert(p: { first: DynamicNever }): Promise; + reduce(p: { + first: DynamicNever; + second: DynamicNever | null; + }): Promise; + coalesce(p: { + first: DynamicNever | null; + second: DynamicNever | null; + third?: DynamicNever | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicUndefined.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicUndefined.ts new file mode 100644 index 0000000000..f4a1b891a2 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_DynamicUndefined.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_application_chatgpt_DynamicUndefined = + _test_llm_application({ + model: "chatgpt", + name: "DynamicUndefined", + })(typia.llm.application()); + +interface DynamicUndefinedApplication { + insert(p: { first: DynamicUndefined }): Promise; + reduce(p: { + first: DynamicUndefined; + second: DynamicUndefined | null; + }): Promise; + coalesce(p: { + first: DynamicUndefined | null; + second: DynamicUndefined | null; + third?: DynamicUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectAlias.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectAlias.ts new file mode 100644 index 0000000000..d5362b524d --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectAlias.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_application_chatgpt_ObjectAlias = _test_llm_application({ + model: "chatgpt", + name: "ObjectAlias", +})(typia.llm.application()); + +interface ObjectAliasApplication { + insert(p: { first: ObjectAlias }): Promise; + reduce(p: { + first: ObjectAlias; + second: ObjectAlias | null; + }): Promise; + coalesce(p: { + first: ObjectAlias | null; + second: ObjectAlias | null; + third?: ObjectAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectDate.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectDate.ts new file mode 100644 index 0000000000..7bde0fdb3b --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectDate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_application_chatgpt_ObjectDate = _test_llm_application({ + model: "chatgpt", + name: "ObjectDate", +})(typia.llm.application()); + +interface ObjectDateApplication { + insert(p: { first: ObjectDate }): Promise; + reduce(p: { + first: ObjectDate; + second: ObjectDate | null; + }): Promise; + coalesce(p: { + first: ObjectDate | null; + second: ObjectDate | null; + third?: ObjectDate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectDescription.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectDescription.ts new file mode 100644 index 0000000000..61a81b27ea --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectDescription.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_application_chatgpt_ObjectDescription = + _test_llm_application({ + model: "chatgpt", + name: "ObjectDescription", + })(typia.llm.application()); + +interface ObjectDescriptionApplication { + insert(p: { first: ObjectDescription }): Promise; + reduce(p: { + first: ObjectDescription; + second: ObjectDescription | null; + }): Promise; + coalesce(p: { + first: ObjectDescription | null; + second: ObjectDescription | null; + third?: ObjectDescription | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericAlias.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericAlias.ts new file mode 100644 index 0000000000..c4b01c29d4 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericAlias.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_application_chatgpt_ObjectGenericAlias = + _test_llm_application({ + model: "chatgpt", + name: "ObjectGenericAlias", + })(typia.llm.application()); + +interface ObjectGenericAliasApplication { + insert(p: { first: ObjectGenericAlias }): Promise; + reduce(p: { + first: ObjectGenericAlias; + second: ObjectGenericAlias | null; + }): Promise; + coalesce(p: { + first: ObjectGenericAlias | null; + second: ObjectGenericAlias | null; + third?: ObjectGenericAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericArray.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericArray.ts new file mode 100644 index 0000000000..2d683dedbf --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_application_chatgpt_ObjectGenericArray = + _test_llm_application({ + model: "chatgpt", + name: "ObjectGenericArray", + })(typia.llm.application()); + +interface ObjectGenericArrayApplication { + insert(p: { first: ObjectGenericArray }): Promise; + reduce(p: { + first: ObjectGenericArray; + second: ObjectGenericArray | null; + }): Promise; + coalesce(p: { + first: ObjectGenericArray | null; + second: ObjectGenericArray | null; + third?: ObjectGenericArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericUnion.ts new file mode 100644 index 0000000000..b11e94fa28 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectGenericUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_application_chatgpt_ObjectGenericUnion = + _test_llm_application({ + model: "chatgpt", + name: "ObjectGenericUnion", + })(typia.llm.application()); + +interface ObjectGenericUnionApplication { + insert(p: { first: ObjectGenericUnion }): Promise; + reduce(p: { + first: ObjectGenericUnion; + second: ObjectGenericUnion | null; + }): Promise; + coalesce(p: { + first: ObjectGenericUnion | null; + second: ObjectGenericUnion | null; + third?: ObjectGenericUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectInternal.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectInternal.ts new file mode 100644 index 0000000000..6548e81e06 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectInternal.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_application_chatgpt_ObjectInternal = + _test_llm_application({ + model: "chatgpt", + name: "ObjectInternal", + })(typia.llm.application()); + +interface ObjectInternalApplication { + insert(p: { first: ObjectInternal }): Promise; + reduce(p: { + first: ObjectInternal; + second: ObjectInternal | null; + }): Promise; + coalesce(p: { + first: ObjectInternal | null; + second: ObjectInternal | null; + third?: ObjectInternal | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectIntersection.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectIntersection.ts new file mode 100644 index 0000000000..3e85c030d4 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectIntersection.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_application_chatgpt_ObjectIntersection = + _test_llm_application({ + model: "chatgpt", + name: "ObjectIntersection", + })(typia.llm.application()); + +interface ObjectIntersectionApplication { + insert(p: { first: ObjectIntersection }): Promise; + reduce(p: { + first: ObjectIntersection; + second: ObjectIntersection | null; + }): Promise; + coalesce(p: { + first: ObjectIntersection | null; + second: ObjectIntersection | null; + third?: ObjectIntersection | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectJsonTag.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectJsonTag.ts new file mode 100644 index 0000000000..d4d6737694 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectJsonTag.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_application_chatgpt_ObjectJsonTag = _test_llm_application( + { + model: "chatgpt", + name: "ObjectJsonTag", + }, +)(typia.llm.application()); + +interface ObjectJsonTagApplication { + insert(p: { first: ObjectJsonTag }): Promise; + reduce(p: { + first: ObjectJsonTag; + second: ObjectJsonTag | null; + }): Promise; + coalesce(p: { + first: ObjectJsonTag | null; + second: ObjectJsonTag | null; + third?: ObjectJsonTag | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectLiteralProperty.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..2a809917c5 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectLiteralProperty.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_application_chatgpt_ObjectLiteralProperty = + _test_llm_application({ + model: "chatgpt", + name: "ObjectLiteralProperty", + })(typia.llm.application()); + +interface ObjectLiteralPropertyApplication { + insert(p: { first: ObjectLiteralProperty }): Promise; + reduce(p: { + first: ObjectLiteralProperty; + second: ObjectLiteralProperty | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralProperty | null; + second: ObjectLiteralProperty | null; + third?: ObjectLiteralProperty | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectLiteralType.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectLiteralType.ts new file mode 100644 index 0000000000..d404c7b239 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectLiteralType.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_application_chatgpt_ObjectLiteralType = + _test_llm_application({ + model: "chatgpt", + name: "ObjectLiteralType", + })(typia.llm.application()); + +interface ObjectLiteralTypeApplication { + insert(p: { first: ObjectLiteralType }): Promise; + reduce(p: { + first: ObjectLiteralType; + second: ObjectLiteralType | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralType | null; + second: ObjectLiteralType | null; + third?: ObjectLiteralType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectNullable.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectNullable.ts new file mode 100644 index 0000000000..a527bfdde9 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectNullable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_application_chatgpt_ObjectNullable = + _test_llm_application({ + model: "chatgpt", + name: "ObjectNullable", + })(typia.llm.application()); + +interface ObjectNullableApplication { + insert(p: { first: ObjectNullable }): Promise; + reduce(p: { + first: ObjectNullable; + second: ObjectNullable | null; + }): Promise; + coalesce(p: { + first: ObjectNullable | null; + second: ObjectNullable | null; + third?: ObjectNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectOptional.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectOptional.ts new file mode 100644 index 0000000000..95e543520d --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectOptional.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_application_chatgpt_ObjectOptional = + _test_llm_application({ + model: "chatgpt", + name: "ObjectOptional", + })(typia.llm.application()); + +interface ObjectOptionalApplication { + insert(p: { first: ObjectOptional }): Promise; + reduce(p: { + first: ObjectOptional; + second: ObjectOptional | null; + }): Promise; + coalesce(p: { + first: ObjectOptional | null; + second: ObjectOptional | null; + third?: ObjectOptional | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPartial.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPartial.ts new file mode 100644 index 0000000000..3faa7aa6e7 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPartial.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_application_chatgpt_ObjectPartial = _test_llm_application( + { + model: "chatgpt", + name: "ObjectPartial", + }, +)(typia.llm.application()); + +interface ObjectPartialApplication { + insert(p: { first: ObjectPartial }): Promise; + reduce(p: { + first: ObjectPartial; + second: ObjectPartial | null; + }): Promise; + coalesce(p: { + first: ObjectPartial | null; + second: ObjectPartial | null; + third?: ObjectPartial | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPartialAndRequired.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..092601aca7 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPartialAndRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_application_chatgpt_ObjectPartialAndRequired = + _test_llm_application({ + model: "chatgpt", + name: "ObjectPartialAndRequired", + })(typia.llm.application()); + +interface ObjectPartialAndRequiredApplication { + insert(p: { first: ObjectPartialAndRequired }): Promise; + reduce(p: { + first: ObjectPartialAndRequired; + second: ObjectPartialAndRequired | null; + }): Promise; + coalesce(p: { + first: ObjectPartialAndRequired | null; + second: ObjectPartialAndRequired | null; + third?: ObjectPartialAndRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPrimitive.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPrimitive.ts new file mode 100644 index 0000000000..33521003cf --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectPrimitive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_application_chatgpt_ObjectPrimitive = + _test_llm_application({ + model: "chatgpt", + name: "ObjectPrimitive", + })(typia.llm.application()); + +interface ObjectPrimitiveApplication { + insert(p: { first: ObjectPrimitive }): Promise; + reduce(p: { + first: ObjectPrimitive; + second: ObjectPrimitive | null; + }): Promise; + coalesce(p: { + first: ObjectPrimitive | null; + second: ObjectPrimitive | null; + third?: ObjectPrimitive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectRecursive.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectRecursive.ts new file mode 100644 index 0000000000..6b52bbb006 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectRecursive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_application_chatgpt_ObjectRecursive = + _test_llm_application({ + model: "chatgpt", + name: "ObjectRecursive", + })(typia.llm.application()); + +interface ObjectRecursiveApplication { + insert(p: { first: ObjectRecursive }): Promise; + reduce(p: { + first: ObjectRecursive; + second: ObjectRecursive | null; + }): Promise; + coalesce(p: { + first: ObjectRecursive | null; + second: ObjectRecursive | null; + third?: ObjectRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectRequired.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectRequired.ts new file mode 100644 index 0000000000..5b49053ff9 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_application_chatgpt_ObjectRequired = + _test_llm_application({ + model: "chatgpt", + name: "ObjectRequired", + })(typia.llm.application()); + +interface ObjectRequiredApplication { + insert(p: { first: ObjectRequired }): Promise; + reduce(p: { + first: ObjectRequired; + second: ObjectRequired | null; + }): Promise; + coalesce(p: { + first: ObjectRequired | null; + second: ObjectRequired | null; + third?: ObjectRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectSimple.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectSimple.ts new file mode 100644 index 0000000000..2fd3407d97 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_application_chatgpt_ObjectSimple = _test_llm_application({ + model: "chatgpt", + name: "ObjectSimple", +})(typia.llm.application()); + +interface ObjectSimpleApplication { + insert(p: { first: ObjectSimple }): Promise; + reduce(p: { + first: ObjectSimple; + second: ObjectSimple | null; + }): Promise; + coalesce(p: { + first: ObjectSimple | null; + second: ObjectSimple | null; + third?: ObjectSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUndefined.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUndefined.ts new file mode 100644 index 0000000000..8f95a3de47 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUndefined.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_application_chatgpt_ObjectUndefined = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUndefined", + })(typia.llm.application()); + +interface ObjectUndefinedApplication { + insert(p: { first: ObjectUndefined }): Promise; + reduce(p: { + first: ObjectUndefined; + second: ObjectUndefined | null; + }): Promise; + coalesce(p: { + first: ObjectUndefined | null; + second: ObjectUndefined | null; + third?: ObjectUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionComposite.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionComposite.ts new file mode 100644 index 0000000000..2756762735 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_application_chatgpt_ObjectUnionComposite = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionComposite", + })(typia.llm.application()); + +interface ObjectUnionCompositeApplication { + insert(p: { first: ObjectUnionComposite }): Promise; + reduce(p: { + first: ObjectUnionComposite; + second: ObjectUnionComposite | null; + }): Promise; + coalesce(p: { + first: ObjectUnionComposite | null; + second: ObjectUnionComposite | null; + third?: ObjectUnionComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionCompositePointer.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..95039261b7 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionCompositePointer.ts @@ -0,0 +1,25 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_application_chatgpt_ObjectUnionCompositePointer = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionCompositePointer", + })( + typia.llm.application(), + ); + +interface ObjectUnionCompositePointerApplication { + insert(p: { first: ObjectUnionCompositePointer }): Promise; + reduce(p: { + first: ObjectUnionCompositePointer; + second: ObjectUnionCompositePointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionCompositePointer | null; + second: ObjectUnionCompositePointer | null; + third?: ObjectUnionCompositePointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionDouble.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionDouble.ts new file mode 100644 index 0000000000..322a85a4e4 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionDouble.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_application_chatgpt_ObjectUnionDouble = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionDouble", + })(typia.llm.application()); + +interface ObjectUnionDoubleApplication { + insert(p: { first: ObjectUnionDouble }): Promise; + reduce(p: { + first: ObjectUnionDouble; + second: ObjectUnionDouble | null; + }): Promise; + coalesce(p: { + first: ObjectUnionDouble | null; + second: ObjectUnionDouble | null; + third?: ObjectUnionDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionExplicit.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..717574003c --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_application_chatgpt_ObjectUnionExplicit = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionExplicit", + })(typia.llm.application()); + +interface ObjectUnionExplicitApplication { + insert(p: { first: ObjectUnionExplicit }): Promise; + reduce(p: { + first: ObjectUnionExplicit; + second: ObjectUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicit | null; + second: ObjectUnionExplicit | null; + third?: ObjectUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionExplicitPointer.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..fd6f946d48 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_application_chatgpt_ObjectUnionExplicitPointer = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionExplicitPointer", + })(typia.llm.application()); + +interface ObjectUnionExplicitPointerApplication { + insert(p: { first: ObjectUnionExplicitPointer }): Promise; + reduce(p: { + first: ObjectUnionExplicitPointer; + second: ObjectUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicitPointer | null; + second: ObjectUnionExplicitPointer | null; + third?: ObjectUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionImplicit.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..feeb785d25 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_application_chatgpt_ObjectUnionImplicit = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionImplicit", + })(typia.llm.application()); + +interface ObjectUnionImplicitApplication { + insert(p: { first: ObjectUnionImplicit }): Promise; + reduce(p: { + first: ObjectUnionImplicit; + second: ObjectUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionImplicit | null; + second: ObjectUnionImplicit | null; + third?: ObjectUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionNonPredictable.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..4fbac0e183 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ObjectUnionNonPredictable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_application_chatgpt_ObjectUnionNonPredictable = + _test_llm_application({ + model: "chatgpt", + name: "ObjectUnionNonPredictable", + })(typia.llm.application()); + +interface ObjectUnionNonPredictableApplication { + insert(p: { first: ObjectUnionNonPredictable }): Promise; + reduce(p: { + first: ObjectUnionNonPredictable; + second: ObjectUnionNonPredictable | null; + }): Promise; + coalesce(p: { + first: ObjectUnionNonPredictable | null; + second: ObjectUnionNonPredictable | null; + third?: ObjectUnionNonPredictable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateAtomic.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateAtomic.ts new file mode 100644 index 0000000000..12cff473e3 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateAtomic.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_application_chatgpt_TemplateAtomic = + _test_llm_application({ + model: "chatgpt", + name: "TemplateAtomic", + })(typia.llm.application()); + +interface TemplateAtomicApplication { + insert(p: { first: TemplateAtomic }): Promise; + reduce(p: { + first: TemplateAtomic; + second: TemplateAtomic | null; + }): Promise; + coalesce(p: { + first: TemplateAtomic | null; + second: TemplateAtomic | null; + third?: TemplateAtomic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateConstant.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateConstant.ts new file mode 100644 index 0000000000..23baa41418 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_application_chatgpt_TemplateConstant = + _test_llm_application({ + model: "chatgpt", + name: "TemplateConstant", + })(typia.llm.application()); + +interface TemplateConstantApplication { + insert(p: { first: TemplateConstant }): Promise; + reduce(p: { + first: TemplateConstant; + second: TemplateConstant | null; + }): Promise; + coalesce(p: { + first: TemplateConstant | null; + second: TemplateConstant | null; + third?: TemplateConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateUnion.ts new file mode 100644 index 0000000000..bed6f27b53 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TemplateUnion.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_application_chatgpt_TemplateUnion = _test_llm_application( + { + model: "chatgpt", + name: "TemplateUnion", + }, +)(typia.llm.application()); + +interface TemplateUnionApplication { + insert(p: { first: TemplateUnion }): Promise; + reduce(p: { + first: TemplateUnion; + second: TemplateUnion | null; + }): Promise; + coalesce(p: { + first: TemplateUnion | null; + second: TemplateUnion | null; + third?: TemplateUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonAtomicUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..0d04a8b271 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_application_chatgpt_ToJsonAtomicUnion = + _test_llm_application({ + model: "chatgpt", + name: "ToJsonAtomicUnion", + })(typia.llm.application()); + +interface ToJsonAtomicUnionApplication { + insert(p: { first: ToJsonAtomicUnion }): Promise; + reduce(p: { + first: ToJsonAtomicUnion; + second: ToJsonAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonAtomicUnion | null; + second: ToJsonAtomicUnion | null; + third?: ToJsonAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonDouble.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonDouble.ts new file mode 100644 index 0000000000..1328d58779 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonDouble.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_application_chatgpt_ToJsonDouble = _test_llm_application({ + model: "chatgpt", + name: "ToJsonDouble", +})(typia.llm.application()); + +interface ToJsonDoubleApplication { + insert(p: { first: ToJsonDouble }): Promise; + reduce(p: { + first: ToJsonDouble; + second: ToJsonDouble | null; + }): Promise; + coalesce(p: { + first: ToJsonDouble | null; + second: ToJsonDouble | null; + third?: ToJsonDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonNull.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonNull.ts new file mode 100644 index 0000000000..ded2870dc2 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonNull.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_application_chatgpt_ToJsonNull = _test_llm_application({ + model: "chatgpt", + name: "ToJsonNull", +})(typia.llm.application()); + +interface ToJsonNullApplication { + insert(p: { first: ToJsonNull }): Promise; + reduce(p: { + first: ToJsonNull; + second: ToJsonNull | null; + }): Promise; + coalesce(p: { + first: ToJsonNull | null; + second: ToJsonNull | null; + third?: ToJsonNull | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonUnion.ts new file mode 100644 index 0000000000..0802940f91 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_ToJsonUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_application_chatgpt_ToJsonUnion = _test_llm_application({ + model: "chatgpt", + name: "ToJsonUnion", +})(typia.llm.application()); + +interface ToJsonUnionApplication { + insert(p: { first: ToJsonUnion }): Promise; + reduce(p: { + first: ToJsonUnion; + second: ToJsonUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonUnion | null; + second: ToJsonUnion | null; + third?: ToJsonUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagArray.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagArray.ts new file mode 100644 index 0000000000..0b286cf82a --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_application_chatgpt_TypeTagArray = _test_llm_application({ + model: "chatgpt", + name: "TypeTagArray", +})(typia.llm.application()); + +interface TypeTagArrayApplication { + insert(p: { first: TypeTagArray }): Promise; + reduce(p: { + first: TypeTagArray; + second: TypeTagArray | null; + }): Promise; + coalesce(p: { + first: TypeTagArray | null; + second: TypeTagArray | null; + third?: TypeTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagArrayUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..8eddf57767 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_application_chatgpt_TypeTagArrayUnion = + _test_llm_application({ + model: "chatgpt", + name: "TypeTagArrayUnion", + })(typia.llm.application()); + +interface TypeTagArrayUnionApplication { + insert(p: { first: TypeTagArrayUnion }): Promise; + reduce(p: { + first: TypeTagArrayUnion; + second: TypeTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagArrayUnion | null; + second: TypeTagArrayUnion | null; + third?: TypeTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagAtomicUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..ee61a0732c --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_application_chatgpt_TypeTagAtomicUnion = + _test_llm_application({ + model: "chatgpt", + name: "TypeTagAtomicUnion", + })(typia.llm.application()); + +interface TypeTagAtomicUnionApplication { + insert(p: { first: TypeTagAtomicUnion }): Promise; + reduce(p: { + first: TypeTagAtomicUnion; + second: TypeTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagAtomicUnion | null; + second: TypeTagAtomicUnion | null; + third?: TypeTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagCustom.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagCustom.ts new file mode 100644 index 0000000000..ccafdb673b --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagCustom.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_application_chatgpt_TypeTagCustom = _test_llm_application( + { + model: "chatgpt", + name: "TypeTagCustom", + }, +)(typia.llm.application()); + +interface TypeTagCustomApplication { + insert(p: { first: TypeTagCustom }): Promise; + reduce(p: { + first: TypeTagCustom; + second: TypeTagCustom | null; + }): Promise; + coalesce(p: { + first: TypeTagCustom | null; + second: TypeTagCustom | null; + third?: TypeTagCustom | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagDefault.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagDefault.ts new file mode 100644 index 0000000000..0c52c6c241 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagDefault.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_application_chatgpt_TypeTagDefault = + _test_llm_application({ + model: "chatgpt", + name: "TypeTagDefault", + })(typia.llm.application()); + +interface TypeTagDefaultApplication { + insert(p: { first: TypeTagDefault }): Promise; + reduce(p: { + first: TypeTagDefault; + second: TypeTagDefault | null; + }): Promise; + coalesce(p: { + first: TypeTagDefault | null; + second: TypeTagDefault | null; + third?: TypeTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagFormat.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagFormat.ts new file mode 100644 index 0000000000..fafe356b74 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagFormat.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_application_chatgpt_TypeTagFormat = _test_llm_application( + { + model: "chatgpt", + name: "TypeTagFormat", + }, +)(typia.llm.application()); + +interface TypeTagFormatApplication { + insert(p: { first: TypeTagFormat }): Promise; + reduce(p: { + first: TypeTagFormat; + second: TypeTagFormat | null; + }): Promise; + coalesce(p: { + first: TypeTagFormat | null; + second: TypeTagFormat | null; + third?: TypeTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagLength.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagLength.ts new file mode 100644 index 0000000000..220d2ddb33 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagLength.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_application_chatgpt_TypeTagLength = _test_llm_application( + { + model: "chatgpt", + name: "TypeTagLength", + }, +)(typia.llm.application()); + +interface TypeTagLengthApplication { + insert(p: { first: TypeTagLength }): Promise; + reduce(p: { + first: TypeTagLength; + second: TypeTagLength | null; + }): Promise; + coalesce(p: { + first: TypeTagLength | null; + second: TypeTagLength | null; + third?: TypeTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagMatrix.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagMatrix.ts new file mode 100644 index 0000000000..af57ec9714 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagMatrix.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_application_chatgpt_TypeTagMatrix = _test_llm_application( + { + model: "chatgpt", + name: "TypeTagMatrix", + }, +)(typia.llm.application()); + +interface TypeTagMatrixApplication { + insert(p: { first: TypeTagMatrix }): Promise; + reduce(p: { + first: TypeTagMatrix; + second: TypeTagMatrix | null; + }): Promise; + coalesce(p: { + first: TypeTagMatrix | null; + second: TypeTagMatrix | null; + third?: TypeTagMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagObjectUnion.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..bba3f29d6f --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_application_chatgpt_TypeTagObjectUnion = + _test_llm_application({ + model: "chatgpt", + name: "TypeTagObjectUnion", + })(typia.llm.application()); + +interface TypeTagObjectUnionApplication { + insert(p: { first: TypeTagObjectUnion }): Promise; + reduce(p: { + first: TypeTagObjectUnion; + second: TypeTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagObjectUnion | null; + second: TypeTagObjectUnion | null; + third?: TypeTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagPattern.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagPattern.ts new file mode 100644 index 0000000000..d5271d3ea0 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagPattern.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_application_chatgpt_TypeTagPattern = + _test_llm_application({ + model: "chatgpt", + name: "TypeTagPattern", + })(typia.llm.application()); + +interface TypeTagPatternApplication { + insert(p: { first: TypeTagPattern }): Promise; + reduce(p: { + first: TypeTagPattern; + second: TypeTagPattern | null; + }): Promise; + coalesce(p: { + first: TypeTagPattern | null; + second: TypeTagPattern | null; + third?: TypeTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagRange.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagRange.ts new file mode 100644 index 0000000000..fea182bb9f --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_application_chatgpt_TypeTagRange = _test_llm_application({ + model: "chatgpt", + name: "TypeTagRange", +})(typia.llm.application()); + +interface TypeTagRangeApplication { + insert(p: { first: TypeTagRange }): Promise; + reduce(p: { + first: TypeTagRange; + second: TypeTagRange | null; + }): Promise; + coalesce(p: { + first: TypeTagRange | null; + second: TypeTagRange | null; + third?: TypeTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagType.ts b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagType.ts new file mode 100644 index 0000000000..fefe865f35 --- /dev/null +++ b/test/src/features/llm.application/chatgpt/test_llm_application_chatgpt_TypeTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_application_chatgpt_TypeTagType = _test_llm_application({ + model: "chatgpt", + name: "TypeTagType", +})(typia.llm.application()); + +interface TypeTagTypeApplication { + insert(p: { first: TypeTagType }): Promise; + reduce(p: { + first: TypeTagType; + second: TypeTagType | null; + }): Promise; + coalesce(p: { + first: TypeTagType | null; + second: TypeTagType | null; + third?: TypeTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayAny.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayAny.ts new file mode 100644 index 0000000000..c83969f101 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayAny.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_application_claude_ArrayAny = _test_llm_application({ + model: "claude", + name: "ArrayAny", +})(typia.llm.application()); + +interface ArrayAnyApplication { + insert(p: { first: ArrayAny }): Promise; + reduce(p: { first: ArrayAny; second: ArrayAny | null }): Promise; + coalesce(p: { + first: ArrayAny | null; + second: ArrayAny | null; + third?: ArrayAny | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayHierarchical.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayHierarchical.ts new file mode 100644 index 0000000000..bf5ca4253a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayHierarchical.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_application_claude_ArrayHierarchical = + _test_llm_application({ + model: "claude", + name: "ArrayHierarchical", + })(typia.llm.application()); + +interface ArrayHierarchicalApplication { + insert(p: { first: ArrayHierarchical }): Promise; + reduce(p: { + first: ArrayHierarchical; + second: ArrayHierarchical | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchical | null; + second: ArrayHierarchical | null; + third?: ArrayHierarchical | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayHierarchicalPointer.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..fceda72ebd --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayHierarchicalPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_application_claude_ArrayHierarchicalPointer = + _test_llm_application({ + model: "claude", + name: "ArrayHierarchicalPointer", + })(typia.llm.application()); + +interface ArrayHierarchicalPointerApplication { + insert(p: { first: ArrayHierarchicalPointer }): Promise; + reduce(p: { + first: ArrayHierarchicalPointer; + second: ArrayHierarchicalPointer | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchicalPointer | null; + second: ArrayHierarchicalPointer | null; + third?: ArrayHierarchicalPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayMatrix.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayMatrix.ts new file mode 100644 index 0000000000..b35d4d9328 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_application_claude_ArrayMatrix = _test_llm_application({ + model: "claude", + name: "ArrayMatrix", +})(typia.llm.application()); + +interface ArrayMatrixApplication { + insert(p: { first: ArrayMatrix }): Promise; + reduce(p: { + first: ArrayMatrix; + second: ArrayMatrix | null; + }): Promise; + coalesce(p: { + first: ArrayMatrix | null; + second: ArrayMatrix | null; + third?: ArrayMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursive.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursive.ts new file mode 100644 index 0000000000..dccb44dac5 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursive.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_application_claude_ArrayRecursive = _test_llm_application( + { + model: "claude", + name: "ArrayRecursive", + }, +)(typia.llm.application()); + +interface ArrayRecursiveApplication { + insert(p: { first: ArrayRecursive }): Promise; + reduce(p: { + first: ArrayRecursive; + second: ArrayRecursive | null; + }): Promise; + coalesce(p: { + first: ArrayRecursive | null; + second: ArrayRecursive | null; + third?: ArrayRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..1eef4b24f9 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_application_claude_ArrayRecursiveUnionExplicit = + _test_llm_application({ + model: "claude", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionExplicitApplication { + insert(p: { first: ArrayRecursiveUnionExplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicit; + second: ArrayRecursiveUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicit | null; + second: ArrayRecursiveUnionExplicit | null; + third?: ArrayRecursiveUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..d1dcbbe7a6 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,28 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_application_claude_ArrayRecursiveUnionExplicitPointer = + _test_llm_application({ + model: "claude", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.application< + ArrayRecursiveUnionExplicitPointerApplication, + "claude" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerApplication { + insert(p: { first: ArrayRecursiveUnionExplicitPointer }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicitPointer; + second: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicitPointer | null; + second: ArrayRecursiveUnionExplicitPointer | null; + third?: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..9677b9f3be --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_application_claude_ArrayRecursiveUnionImplicit = + _test_llm_application({ + model: "claude", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionImplicitApplication { + insert(p: { first: ArrayRecursiveUnionImplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionImplicit; + second: ArrayRecursiveUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionImplicit | null; + second: ArrayRecursiveUnionImplicit | null; + third?: ArrayRecursiveUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedNullable.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..e16d51d8e4 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedNullable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_application_claude_ArrayRepeatedNullable = + _test_llm_application({ + model: "claude", + name: "ArrayRepeatedNullable", + })(typia.llm.application()); + +interface ArrayRepeatedNullableApplication { + insert(p: { first: ArrayRepeatedNullable }): Promise; + reduce(p: { + first: ArrayRepeatedNullable; + second: ArrayRepeatedNullable | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedNullable | null; + second: ArrayRepeatedNullable | null; + third?: ArrayRepeatedNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedRequired.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..978cae490a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_application_claude_ArrayRepeatedRequired = + _test_llm_application({ + model: "claude", + name: "ArrayRepeatedRequired", + })(typia.llm.application()); + +interface ArrayRepeatedRequiredApplication { + insert(p: { first: ArrayRepeatedRequired }): Promise; + reduce(p: { + first: ArrayRepeatedRequired; + second: ArrayRepeatedRequired | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedRequired | null; + second: ArrayRepeatedRequired | null; + third?: ArrayRepeatedRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..c4f5bbec77 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayRepeatedUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_application_claude_ArrayRepeatedUnion = + _test_llm_application({ + model: "claude", + name: "ArrayRepeatedUnion", + })(typia.llm.application()); + +interface ArrayRepeatedUnionApplication { + insert(p: { first: ArrayRepeatedUnion }): Promise; + reduce(p: { + first: ArrayRepeatedUnion; + second: ArrayRepeatedUnion | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedUnion | null; + second: ArrayRepeatedUnion | null; + third?: ArrayRepeatedUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArraySimple.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArraySimple.ts new file mode 100644 index 0000000000..5bc1647114 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArraySimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_application_claude_ArraySimple = _test_llm_application({ + model: "claude", + name: "ArraySimple", +})(typia.llm.application()); + +interface ArraySimpleApplication { + insert(p: { first: ArraySimple }): Promise; + reduce(p: { + first: ArraySimple; + second: ArraySimple | null; + }): Promise; + coalesce(p: { + first: ArraySimple | null; + second: ArraySimple | null; + third?: ArraySimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ArrayUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayUnion.ts new file mode 100644 index 0000000000..df6e2f3b8a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ArrayUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_application_claude_ArrayUnion = _test_llm_application({ + model: "claude", + name: "ArrayUnion", +})(typia.llm.application()); + +interface ArrayUnionApplication { + insert(p: { first: ArrayUnion }): Promise; + reduce(p: { + first: ArrayUnion; + second: ArrayUnion | null; + }): Promise; + coalesce(p: { + first: ArrayUnion | null; + second: ArrayUnion | null; + third?: ArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_AtomicUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_AtomicUnion.ts new file mode 100644 index 0000000000..d4e56e0c7b --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_AtomicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_application_claude_AtomicUnion = _test_llm_application({ + model: "claude", + name: "AtomicUnion", +})(typia.llm.application()); + +interface AtomicUnionApplication { + insert(p: { first: AtomicUnion }): Promise; + reduce(p: { + first: AtomicUnion; + second: AtomicUnion | null; + }): Promise; + coalesce(p: { + first: AtomicUnion | null; + second: AtomicUnion | null; + third?: AtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ClassGetter.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ClassGetter.ts new file mode 100644 index 0000000000..391878d954 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ClassGetter.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_application_claude_ClassGetter = _test_llm_application({ + model: "claude", + name: "ClassGetter", +})(typia.llm.application()); + +interface ClassGetterApplication { + insert(p: { first: ClassGetter }): Promise; + reduce(p: { + first: ClassGetter; + second: ClassGetter | null; + }): Promise; + coalesce(p: { + first: ClassGetter | null; + second: ClassGetter | null; + third?: ClassGetter | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ClassMethod.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ClassMethod.ts new file mode 100644 index 0000000000..b08f1a0682 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ClassMethod.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_application_claude_ClassMethod = _test_llm_application({ + model: "claude", + name: "ClassMethod", +})(typia.llm.application()); + +interface ClassMethodApplication { + insert(p: { first: ClassMethod }): Promise; + reduce(p: { + first: ClassMethod; + second: ClassMethod | null; + }): Promise; + coalesce(p: { + first: ClassMethod | null; + second: ClassMethod | null; + third?: ClassMethod | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ClassPropertyAssignment.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..f69b944cbd --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ClassPropertyAssignment.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_application_claude_ClassPropertyAssignment = + _test_llm_application({ + model: "claude", + name: "ClassPropertyAssignment", + })(typia.llm.application()); + +interface ClassPropertyAssignmentApplication { + insert(p: { first: ClassPropertyAssignment }): Promise; + reduce(p: { + first: ClassPropertyAssignment; + second: ClassPropertyAssignment | null; + }): Promise; + coalesce(p: { + first: ClassPropertyAssignment | null; + second: ClassPropertyAssignment | null; + third?: ClassPropertyAssignment | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagArray.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagArray.ts new file mode 100644 index 0000000000..2c4cb0f8b2 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_application_claude_CommentTagArray = + _test_llm_application({ + model: "claude", + name: "CommentTagArray", + })(typia.llm.application()); + +interface CommentTagArrayApplication { + insert(p: { first: CommentTagArray }): Promise; + reduce(p: { + first: CommentTagArray; + second: CommentTagArray | null; + }): Promise; + coalesce(p: { + first: CommentTagArray | null; + second: CommentTagArray | null; + third?: CommentTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagArrayUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..4c922c31e6 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_application_claude_CommentTagArrayUnion = + _test_llm_application({ + model: "claude", + name: "CommentTagArrayUnion", + })(typia.llm.application()); + +interface CommentTagArrayUnionApplication { + insert(p: { first: CommentTagArrayUnion }): Promise; + reduce(p: { + first: CommentTagArrayUnion; + second: CommentTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagArrayUnion | null; + second: CommentTagArrayUnion | null; + third?: CommentTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagAtomicUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..e78e2e786c --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_application_claude_CommentTagAtomicUnion = + _test_llm_application({ + model: "claude", + name: "CommentTagAtomicUnion", + })(typia.llm.application()); + +interface CommentTagAtomicUnionApplication { + insert(p: { first: CommentTagAtomicUnion }): Promise; + reduce(p: { + first: CommentTagAtomicUnion; + second: CommentTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagAtomicUnion | null; + second: CommentTagAtomicUnion | null; + third?: CommentTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagDefault.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagDefault.ts new file mode 100644 index 0000000000..39a8e15115 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagDefault.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_application_claude_CommentTagDefault = + _test_llm_application({ + model: "claude", + name: "CommentTagDefault", + })(typia.llm.application()); + +interface CommentTagDefaultApplication { + insert(p: { first: CommentTagDefault }): Promise; + reduce(p: { + first: CommentTagDefault; + second: CommentTagDefault | null; + }): Promise; + coalesce(p: { + first: CommentTagDefault | null; + second: CommentTagDefault | null; + third?: CommentTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagFormat.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagFormat.ts new file mode 100644 index 0000000000..2a767f9e6a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagFormat.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_application_claude_CommentTagFormat = + _test_llm_application({ + model: "claude", + name: "CommentTagFormat", + })(typia.llm.application()); + +interface CommentTagFormatApplication { + insert(p: { first: CommentTagFormat }): Promise; + reduce(p: { + first: CommentTagFormat; + second: CommentTagFormat | null; + }): Promise; + coalesce(p: { + first: CommentTagFormat | null; + second: CommentTagFormat | null; + third?: CommentTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagLength.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagLength.ts new file mode 100644 index 0000000000..cd98dabb6f --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagLength.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_application_claude_CommentTagLength = + _test_llm_application({ + model: "claude", + name: "CommentTagLength", + })(typia.llm.application()); + +interface CommentTagLengthApplication { + insert(p: { first: CommentTagLength }): Promise; + reduce(p: { + first: CommentTagLength; + second: CommentTagLength | null; + }): Promise; + coalesce(p: { + first: CommentTagLength | null; + second: CommentTagLength | null; + third?: CommentTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagObjectUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..d71b850452 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_application_claude_CommentTagObjectUnion = + _test_llm_application({ + model: "claude", + name: "CommentTagObjectUnion", + })(typia.llm.application()); + +interface CommentTagObjectUnionApplication { + insert(p: { first: CommentTagObjectUnion }): Promise; + reduce(p: { + first: CommentTagObjectUnion; + second: CommentTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagObjectUnion | null; + second: CommentTagObjectUnion | null; + third?: CommentTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagPattern.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagPattern.ts new file mode 100644 index 0000000000..5643094312 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagPattern.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_application_claude_CommentTagPattern = + _test_llm_application({ + model: "claude", + name: "CommentTagPattern", + })(typia.llm.application()); + +interface CommentTagPatternApplication { + insert(p: { first: CommentTagPattern }): Promise; + reduce(p: { + first: CommentTagPattern; + second: CommentTagPattern | null; + }): Promise; + coalesce(p: { + first: CommentTagPattern | null; + second: CommentTagPattern | null; + third?: CommentTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagRange.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagRange.ts new file mode 100644 index 0000000000..f650fa15c2 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagRange.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_application_claude_CommentTagRange = + _test_llm_application({ + model: "claude", + name: "CommentTagRange", + })(typia.llm.application()); + +interface CommentTagRangeApplication { + insert(p: { first: CommentTagRange }): Promise; + reduce(p: { + first: CommentTagRange; + second: CommentTagRange | null; + }): Promise; + coalesce(p: { + first: CommentTagRange | null; + second: CommentTagRange | null; + third?: CommentTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagType.ts b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagType.ts new file mode 100644 index 0000000000..ebc151d24f --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_CommentTagType.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_application_claude_CommentTagType = _test_llm_application( + { + model: "claude", + name: "CommentTagType", + }, +)(typia.llm.application()); + +interface CommentTagTypeApplication { + insert(p: { first: CommentTagType }): Promise; + reduce(p: { + first: CommentTagType; + second: CommentTagType | null; + }): Promise; + coalesce(p: { + first: CommentTagType | null; + second: CommentTagType | null; + third?: CommentTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicAbsorbed.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..e940e55d57 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicAbsorbed.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_application_claude_ConstantAtomicAbsorbed = + _test_llm_application({ + model: "claude", + name: "ConstantAtomicAbsorbed", + })(typia.llm.application()); + +interface ConstantAtomicAbsorbedApplication { + insert(p: { first: ConstantAtomicAbsorbed }): Promise; + reduce(p: { + first: ConstantAtomicAbsorbed; + second: ConstantAtomicAbsorbed | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicAbsorbed | null; + second: ConstantAtomicAbsorbed | null; + third?: ConstantAtomicAbsorbed | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicTagged.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..168c9a1275 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicTagged.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_application_claude_ConstantAtomicTagged = + _test_llm_application({ + model: "claude", + name: "ConstantAtomicTagged", + })(typia.llm.application()); + +interface ConstantAtomicTaggedApplication { + insert(p: { first: ConstantAtomicTagged }): Promise; + reduce(p: { + first: ConstantAtomicTagged; + second: ConstantAtomicTagged | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicTagged | null; + second: ConstantAtomicTagged | null; + third?: ConstantAtomicTagged | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..4ae3b7ac91 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_application_claude_ConstantAtomicUnion = + _test_llm_application({ + model: "claude", + name: "ConstantAtomicUnion", + })(typia.llm.application()); + +interface ConstantAtomicUnionApplication { + insert(p: { first: ConstantAtomicUnion }): Promise; + reduce(p: { + first: ConstantAtomicUnion; + second: ConstantAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicUnion | null; + second: ConstantAtomicUnion | null; + third?: ConstantAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ConstantConstEnumeration.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..76fa668596 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantConstEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_application_claude_ConstantConstEnumeration = + _test_llm_application({ + model: "claude", + name: "ConstantConstEnumeration", + })(typia.llm.application()); + +interface ConstantConstEnumerationApplication { + insert(p: { first: ConstantConstEnumeration }): Promise; + reduce(p: { + first: ConstantConstEnumeration; + second: ConstantConstEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantConstEnumeration | null; + second: ConstantConstEnumeration | null; + third?: ConstantConstEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ConstantEnumeration.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantEnumeration.ts new file mode 100644 index 0000000000..964487ba13 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ConstantEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_application_claude_ConstantEnumeration = + _test_llm_application({ + model: "claude", + name: "ConstantEnumeration", + })(typia.llm.application()); + +interface ConstantEnumerationApplication { + insert(p: { first: ConstantEnumeration }): Promise; + reduce(p: { + first: ConstantEnumeration; + second: ConstantEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantEnumeration | null; + second: ConstantEnumeration | null; + third?: ConstantEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicArray.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicArray.ts new file mode 100644 index 0000000000..8952ad52cb --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_application_claude_DynamicArray = _test_llm_application({ + model: "claude", + name: "DynamicArray", +})(typia.llm.application()); + +interface DynamicArrayApplication { + insert(p: { first: DynamicArray }): Promise; + reduce(p: { + first: DynamicArray; + second: DynamicArray | null; + }): Promise; + coalesce(p: { + first: DynamicArray | null; + second: DynamicArray | null; + third?: DynamicArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicComposite.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicComposite.ts new file mode 100644 index 0000000000..4d28910a44 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_application_claude_DynamicComposite = + _test_llm_application({ + model: "claude", + name: "DynamicComposite", + })(typia.llm.application()); + +interface DynamicCompositeApplication { + insert(p: { first: DynamicComposite }): Promise; + reduce(p: { + first: DynamicComposite; + second: DynamicComposite | null; + }): Promise; + coalesce(p: { + first: DynamicComposite | null; + second: DynamicComposite | null; + third?: DynamicComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicConstant.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicConstant.ts new file mode 100644 index 0000000000..2c802de4de --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_application_claude_DynamicConstant = + _test_llm_application({ + model: "claude", + name: "DynamicConstant", + })(typia.llm.application()); + +interface DynamicConstantApplication { + insert(p: { first: DynamicConstant }): Promise; + reduce(p: { + first: DynamicConstant; + second: DynamicConstant | null; + }): Promise; + coalesce(p: { + first: DynamicConstant | null; + second: DynamicConstant | null; + third?: DynamicConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicEnumeration.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicEnumeration.ts new file mode 100644 index 0000000000..cf7818c178 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_application_claude_DynamicEnumeration = + _test_llm_application({ + model: "claude", + name: "DynamicEnumeration", + })(typia.llm.application()); + +interface DynamicEnumerationApplication { + insert(p: { first: DynamicEnumeration }): Promise; + reduce(p: { + first: DynamicEnumeration; + second: DynamicEnumeration | null; + }): Promise; + coalesce(p: { + first: DynamicEnumeration | null; + second: DynamicEnumeration | null; + third?: DynamicEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicNever.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicNever.ts new file mode 100644 index 0000000000..ef8e8747ca --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicNever.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_application_claude_DynamicNever = _test_llm_application({ + model: "claude", + name: "DynamicNever", +})(typia.llm.application()); + +interface DynamicNeverApplication { + insert(p: { first: DynamicNever }): Promise; + reduce(p: { + first: DynamicNever; + second: DynamicNever | null; + }): Promise; + coalesce(p: { + first: DynamicNever | null; + second: DynamicNever | null; + third?: DynamicNever | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicSimple.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicSimple.ts new file mode 100644 index 0000000000..5398fdb0af --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_application_claude_DynamicSimple = _test_llm_application({ + model: "claude", + name: "DynamicSimple", +})(typia.llm.application()); + +interface DynamicSimpleApplication { + insert(p: { first: DynamicSimple }): Promise; + reduce(p: { + first: DynamicSimple; + second: DynamicSimple | null; + }): Promise; + coalesce(p: { + first: DynamicSimple | null; + second: DynamicSimple | null; + third?: DynamicSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicTemplate.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicTemplate.ts new file mode 100644 index 0000000000..ad14338ab6 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicTemplate.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_application_claude_DynamicTemplate = + _test_llm_application({ + model: "claude", + name: "DynamicTemplate", + })(typia.llm.application()); + +interface DynamicTemplateApplication { + insert(p: { first: DynamicTemplate }): Promise; + reduce(p: { + first: DynamicTemplate; + second: DynamicTemplate | null; + }): Promise; + coalesce(p: { + first: DynamicTemplate | null; + second: DynamicTemplate | null; + third?: DynamicTemplate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicTree.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicTree.ts new file mode 100644 index 0000000000..fc7045c6db --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicTree.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_application_claude_DynamicTree = _test_llm_application({ + model: "claude", + name: "DynamicTree", +})(typia.llm.application()); + +interface DynamicTreeApplication { + insert(p: { first: DynamicTree }): Promise; + reduce(p: { + first: DynamicTree; + second: DynamicTree | null; + }): Promise; + coalesce(p: { + first: DynamicTree | null; + second: DynamicTree | null; + third?: DynamicTree | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicUndefined.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicUndefined.ts new file mode 100644 index 0000000000..c163b785c9 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicUndefined.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_application_claude_DynamicUndefined = + _test_llm_application({ + model: "claude", + name: "DynamicUndefined", + })(typia.llm.application()); + +interface DynamicUndefinedApplication { + insert(p: { first: DynamicUndefined }): Promise; + reduce(p: { + first: DynamicUndefined; + second: DynamicUndefined | null; + }): Promise; + coalesce(p: { + first: DynamicUndefined | null; + second: DynamicUndefined | null; + third?: DynamicUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_DynamicUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicUnion.ts new file mode 100644 index 0000000000..21d06ff2fd --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_DynamicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_application_claude_DynamicUnion = _test_llm_application({ + model: "claude", + name: "DynamicUnion", +})(typia.llm.application()); + +interface DynamicUnionApplication { + insert(p: { first: DynamicUnion }): Promise; + reduce(p: { + first: DynamicUnion; + second: DynamicUnion | null; + }): Promise; + coalesce(p: { + first: DynamicUnion | null; + second: DynamicUnion | null; + third?: DynamicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectAlias.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectAlias.ts new file mode 100644 index 0000000000..c46ba345da --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectAlias.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_application_claude_ObjectAlias = _test_llm_application({ + model: "claude", + name: "ObjectAlias", +})(typia.llm.application()); + +interface ObjectAliasApplication { + insert(p: { first: ObjectAlias }): Promise; + reduce(p: { + first: ObjectAlias; + second: ObjectAlias | null; + }): Promise; + coalesce(p: { + first: ObjectAlias | null; + second: ObjectAlias | null; + third?: ObjectAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDate.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDate.ts new file mode 100644 index 0000000000..1affb8e8f7 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_application_claude_ObjectDate = _test_llm_application({ + model: "claude", + name: "ObjectDate", +})(typia.llm.application()); + +interface ObjectDateApplication { + insert(p: { first: ObjectDate }): Promise; + reduce(p: { + first: ObjectDate; + second: ObjectDate | null; + }): Promise; + coalesce(p: { + first: ObjectDate | null; + second: ObjectDate | null; + third?: ObjectDate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDescription.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDescription.ts new file mode 100644 index 0000000000..390bb2e81e --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDescription.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_application_claude_ObjectDescription = + _test_llm_application({ + model: "claude", + name: "ObjectDescription", + })(typia.llm.application()); + +interface ObjectDescriptionApplication { + insert(p: { first: ObjectDescription }): Promise; + reduce(p: { + first: ObjectDescription; + second: ObjectDescription | null; + }): Promise; + coalesce(p: { + first: ObjectDescription | null; + second: ObjectDescription | null; + third?: ObjectDescription | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDynamic.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDynamic.ts new file mode 100644 index 0000000000..6e1ebcccf7 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectDynamic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_application_claude_ObjectDynamic = _test_llm_application({ + model: "claude", + name: "ObjectDynamic", +})(typia.llm.application()); + +interface ObjectDynamicApplication { + insert(p: { first: ObjectDynamic }): Promise; + reduce(p: { + first: ObjectDynamic; + second: ObjectDynamic | null; + }): Promise; + coalesce(p: { + first: ObjectDynamic | null; + second: ObjectDynamic | null; + third?: ObjectDynamic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericAlias.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericAlias.ts new file mode 100644 index 0000000000..3b4b036b9b --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericAlias.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_application_claude_ObjectGenericAlias = + _test_llm_application({ + model: "claude", + name: "ObjectGenericAlias", + })(typia.llm.application()); + +interface ObjectGenericAliasApplication { + insert(p: { first: ObjectGenericAlias }): Promise; + reduce(p: { + first: ObjectGenericAlias; + second: ObjectGenericAlias | null; + }): Promise; + coalesce(p: { + first: ObjectGenericAlias | null; + second: ObjectGenericAlias | null; + third?: ObjectGenericAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericArray.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericArray.ts new file mode 100644 index 0000000000..2e0574497a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_application_claude_ObjectGenericArray = + _test_llm_application({ + model: "claude", + name: "ObjectGenericArray", + })(typia.llm.application()); + +interface ObjectGenericArrayApplication { + insert(p: { first: ObjectGenericArray }): Promise; + reduce(p: { + first: ObjectGenericArray; + second: ObjectGenericArray | null; + }): Promise; + coalesce(p: { + first: ObjectGenericArray | null; + second: ObjectGenericArray | null; + third?: ObjectGenericArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericUnion.ts new file mode 100644 index 0000000000..c41734fa4d --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectGenericUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_application_claude_ObjectGenericUnion = + _test_llm_application({ + model: "claude", + name: "ObjectGenericUnion", + })(typia.llm.application()); + +interface ObjectGenericUnionApplication { + insert(p: { first: ObjectGenericUnion }): Promise; + reduce(p: { + first: ObjectGenericUnion; + second: ObjectGenericUnion | null; + }): Promise; + coalesce(p: { + first: ObjectGenericUnion | null; + second: ObjectGenericUnion | null; + third?: ObjectGenericUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectInternal.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectInternal.ts new file mode 100644 index 0000000000..f6958b3662 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectInternal.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_application_claude_ObjectInternal = _test_llm_application( + { + model: "claude", + name: "ObjectInternal", + }, +)(typia.llm.application()); + +interface ObjectInternalApplication { + insert(p: { first: ObjectInternal }): Promise; + reduce(p: { + first: ObjectInternal; + second: ObjectInternal | null; + }): Promise; + coalesce(p: { + first: ObjectInternal | null; + second: ObjectInternal | null; + third?: ObjectInternal | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectIntersection.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectIntersection.ts new file mode 100644 index 0000000000..1e4a2ad812 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectIntersection.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_application_claude_ObjectIntersection = + _test_llm_application({ + model: "claude", + name: "ObjectIntersection", + })(typia.llm.application()); + +interface ObjectIntersectionApplication { + insert(p: { first: ObjectIntersection }): Promise; + reduce(p: { + first: ObjectIntersection; + second: ObjectIntersection | null; + }): Promise; + coalesce(p: { + first: ObjectIntersection | null; + second: ObjectIntersection | null; + third?: ObjectIntersection | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectJsonTag.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectJsonTag.ts new file mode 100644 index 0000000000..5d8482dc63 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectJsonTag.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_application_claude_ObjectJsonTag = _test_llm_application({ + model: "claude", + name: "ObjectJsonTag", +})(typia.llm.application()); + +interface ObjectJsonTagApplication { + insert(p: { first: ObjectJsonTag }): Promise; + reduce(p: { + first: ObjectJsonTag; + second: ObjectJsonTag | null; + }): Promise; + coalesce(p: { + first: ObjectJsonTag | null; + second: ObjectJsonTag | null; + third?: ObjectJsonTag | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectLiteralProperty.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..b066298135 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectLiteralProperty.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_application_claude_ObjectLiteralProperty = + _test_llm_application({ + model: "claude", + name: "ObjectLiteralProperty", + })(typia.llm.application()); + +interface ObjectLiteralPropertyApplication { + insert(p: { first: ObjectLiteralProperty }): Promise; + reduce(p: { + first: ObjectLiteralProperty; + second: ObjectLiteralProperty | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralProperty | null; + second: ObjectLiteralProperty | null; + third?: ObjectLiteralProperty | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectLiteralType.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectLiteralType.ts new file mode 100644 index 0000000000..f8b3942c47 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectLiteralType.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_application_claude_ObjectLiteralType = + _test_llm_application({ + model: "claude", + name: "ObjectLiteralType", + })(typia.llm.application()); + +interface ObjectLiteralTypeApplication { + insert(p: { first: ObjectLiteralType }): Promise; + reduce(p: { + first: ObjectLiteralType; + second: ObjectLiteralType | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralType | null; + second: ObjectLiteralType | null; + third?: ObjectLiteralType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectNullable.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectNullable.ts new file mode 100644 index 0000000000..09862b9989 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectNullable.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_application_claude_ObjectNullable = _test_llm_application( + { + model: "claude", + name: "ObjectNullable", + }, +)(typia.llm.application()); + +interface ObjectNullableApplication { + insert(p: { first: ObjectNullable }): Promise; + reduce(p: { + first: ObjectNullable; + second: ObjectNullable | null; + }): Promise; + coalesce(p: { + first: ObjectNullable | null; + second: ObjectNullable | null; + third?: ObjectNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectOptional.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectOptional.ts new file mode 100644 index 0000000000..7f62e3a441 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectOptional.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_application_claude_ObjectOptional = _test_llm_application( + { + model: "claude", + name: "ObjectOptional", + }, +)(typia.llm.application()); + +interface ObjectOptionalApplication { + insert(p: { first: ObjectOptional }): Promise; + reduce(p: { + first: ObjectOptional; + second: ObjectOptional | null; + }): Promise; + coalesce(p: { + first: ObjectOptional | null; + second: ObjectOptional | null; + third?: ObjectOptional | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPartial.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPartial.ts new file mode 100644 index 0000000000..a66475064a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPartial.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_application_claude_ObjectPartial = _test_llm_application({ + model: "claude", + name: "ObjectPartial", +})(typia.llm.application()); + +interface ObjectPartialApplication { + insert(p: { first: ObjectPartial }): Promise; + reduce(p: { + first: ObjectPartial; + second: ObjectPartial | null; + }): Promise; + coalesce(p: { + first: ObjectPartial | null; + second: ObjectPartial | null; + third?: ObjectPartial | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPartialAndRequired.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..844f999aa7 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPartialAndRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_application_claude_ObjectPartialAndRequired = + _test_llm_application({ + model: "claude", + name: "ObjectPartialAndRequired", + })(typia.llm.application()); + +interface ObjectPartialAndRequiredApplication { + insert(p: { first: ObjectPartialAndRequired }): Promise; + reduce(p: { + first: ObjectPartialAndRequired; + second: ObjectPartialAndRequired | null; + }): Promise; + coalesce(p: { + first: ObjectPartialAndRequired | null; + second: ObjectPartialAndRequired | null; + third?: ObjectPartialAndRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPrimitive.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPrimitive.ts new file mode 100644 index 0000000000..178346cd6d --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectPrimitive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_application_claude_ObjectPrimitive = + _test_llm_application({ + model: "claude", + name: "ObjectPrimitive", + })(typia.llm.application()); + +interface ObjectPrimitiveApplication { + insert(p: { first: ObjectPrimitive }): Promise; + reduce(p: { + first: ObjectPrimitive; + second: ObjectPrimitive | null; + }): Promise; + coalesce(p: { + first: ObjectPrimitive | null; + second: ObjectPrimitive | null; + third?: ObjectPrimitive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectRecursive.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectRecursive.ts new file mode 100644 index 0000000000..9a2dc7bf02 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectRecursive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_application_claude_ObjectRecursive = + _test_llm_application({ + model: "claude", + name: "ObjectRecursive", + })(typia.llm.application()); + +interface ObjectRecursiveApplication { + insert(p: { first: ObjectRecursive }): Promise; + reduce(p: { + first: ObjectRecursive; + second: ObjectRecursive | null; + }): Promise; + coalesce(p: { + first: ObjectRecursive | null; + second: ObjectRecursive | null; + third?: ObjectRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectRequired.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectRequired.ts new file mode 100644 index 0000000000..f359fcc22c --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectRequired.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_application_claude_ObjectRequired = _test_llm_application( + { + model: "claude", + name: "ObjectRequired", + }, +)(typia.llm.application()); + +interface ObjectRequiredApplication { + insert(p: { first: ObjectRequired }): Promise; + reduce(p: { + first: ObjectRequired; + second: ObjectRequired | null; + }): Promise; + coalesce(p: { + first: ObjectRequired | null; + second: ObjectRequired | null; + third?: ObjectRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectSimple.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectSimple.ts new file mode 100644 index 0000000000..a386439c12 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_application_claude_ObjectSimple = _test_llm_application({ + model: "claude", + name: "ObjectSimple", +})(typia.llm.application()); + +interface ObjectSimpleApplication { + insert(p: { first: ObjectSimple }): Promise; + reduce(p: { + first: ObjectSimple; + second: ObjectSimple | null; + }): Promise; + coalesce(p: { + first: ObjectSimple | null; + second: ObjectSimple | null; + third?: ObjectSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUndefined.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUndefined.ts new file mode 100644 index 0000000000..b87dfc0f9f --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUndefined.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_application_claude_ObjectUndefined = + _test_llm_application({ + model: "claude", + name: "ObjectUndefined", + })(typia.llm.application()); + +interface ObjectUndefinedApplication { + insert(p: { first: ObjectUndefined }): Promise; + reduce(p: { + first: ObjectUndefined; + second: ObjectUndefined | null; + }): Promise; + coalesce(p: { + first: ObjectUndefined | null; + second: ObjectUndefined | null; + third?: ObjectUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionComposite.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionComposite.ts new file mode 100644 index 0000000000..f5cc2df316 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_application_claude_ObjectUnionComposite = + _test_llm_application({ + model: "claude", + name: "ObjectUnionComposite", + })(typia.llm.application()); + +interface ObjectUnionCompositeApplication { + insert(p: { first: ObjectUnionComposite }): Promise; + reduce(p: { + first: ObjectUnionComposite; + second: ObjectUnionComposite | null; + }): Promise; + coalesce(p: { + first: ObjectUnionComposite | null; + second: ObjectUnionComposite | null; + third?: ObjectUnionComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionCompositePointer.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..10032371d1 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionCompositePointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_application_claude_ObjectUnionCompositePointer = + _test_llm_application({ + model: "claude", + name: "ObjectUnionCompositePointer", + })(typia.llm.application()); + +interface ObjectUnionCompositePointerApplication { + insert(p: { first: ObjectUnionCompositePointer }): Promise; + reduce(p: { + first: ObjectUnionCompositePointer; + second: ObjectUnionCompositePointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionCompositePointer | null; + second: ObjectUnionCompositePointer | null; + third?: ObjectUnionCompositePointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionDouble.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionDouble.ts new file mode 100644 index 0000000000..5989829ad6 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionDouble.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_application_claude_ObjectUnionDouble = + _test_llm_application({ + model: "claude", + name: "ObjectUnionDouble", + })(typia.llm.application()); + +interface ObjectUnionDoubleApplication { + insert(p: { first: ObjectUnionDouble }): Promise; + reduce(p: { + first: ObjectUnionDouble; + second: ObjectUnionDouble | null; + }): Promise; + coalesce(p: { + first: ObjectUnionDouble | null; + second: ObjectUnionDouble | null; + third?: ObjectUnionDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionExplicit.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..96b8a54277 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_application_claude_ObjectUnionExplicit = + _test_llm_application({ + model: "claude", + name: "ObjectUnionExplicit", + })(typia.llm.application()); + +interface ObjectUnionExplicitApplication { + insert(p: { first: ObjectUnionExplicit }): Promise; + reduce(p: { + first: ObjectUnionExplicit; + second: ObjectUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicit | null; + second: ObjectUnionExplicit | null; + third?: ObjectUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionExplicitPointer.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..c8fb817d60 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_application_claude_ObjectUnionExplicitPointer = + _test_llm_application({ + model: "claude", + name: "ObjectUnionExplicitPointer", + })(typia.llm.application()); + +interface ObjectUnionExplicitPointerApplication { + insert(p: { first: ObjectUnionExplicitPointer }): Promise; + reduce(p: { + first: ObjectUnionExplicitPointer; + second: ObjectUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicitPointer | null; + second: ObjectUnionExplicitPointer | null; + third?: ObjectUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionImplicit.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..9d1eb77306 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_application_claude_ObjectUnionImplicit = + _test_llm_application({ + model: "claude", + name: "ObjectUnionImplicit", + })(typia.llm.application()); + +interface ObjectUnionImplicitApplication { + insert(p: { first: ObjectUnionImplicit }): Promise; + reduce(p: { + first: ObjectUnionImplicit; + second: ObjectUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionImplicit | null; + second: ObjectUnionImplicit | null; + third?: ObjectUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionNonPredictable.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..3c4ba68b90 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ObjectUnionNonPredictable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_application_claude_ObjectUnionNonPredictable = + _test_llm_application({ + model: "claude", + name: "ObjectUnionNonPredictable", + })(typia.llm.application()); + +interface ObjectUnionNonPredictableApplication { + insert(p: { first: ObjectUnionNonPredictable }): Promise; + reduce(p: { + first: ObjectUnionNonPredictable; + second: ObjectUnionNonPredictable | null; + }): Promise; + coalesce(p: { + first: ObjectUnionNonPredictable | null; + second: ObjectUnionNonPredictable | null; + third?: ObjectUnionNonPredictable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TemplateAtomic.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TemplateAtomic.ts new file mode 100644 index 0000000000..a33638bc86 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TemplateAtomic.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_application_claude_TemplateAtomic = _test_llm_application( + { + model: "claude", + name: "TemplateAtomic", + }, +)(typia.llm.application()); + +interface TemplateAtomicApplication { + insert(p: { first: TemplateAtomic }): Promise; + reduce(p: { + first: TemplateAtomic; + second: TemplateAtomic | null; + }): Promise; + coalesce(p: { + first: TemplateAtomic | null; + second: TemplateAtomic | null; + third?: TemplateAtomic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TemplateConstant.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TemplateConstant.ts new file mode 100644 index 0000000000..ac2caa5c36 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TemplateConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_application_claude_TemplateConstant = + _test_llm_application({ + model: "claude", + name: "TemplateConstant", + })(typia.llm.application()); + +interface TemplateConstantApplication { + insert(p: { first: TemplateConstant }): Promise; + reduce(p: { + first: TemplateConstant; + second: TemplateConstant | null; + }): Promise; + coalesce(p: { + first: TemplateConstant | null; + second: TemplateConstant | null; + third?: TemplateConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TemplateUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TemplateUnion.ts new file mode 100644 index 0000000000..e2fbf672a5 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TemplateUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_application_claude_TemplateUnion = _test_llm_application({ + model: "claude", + name: "TemplateUnion", +})(typia.llm.application()); + +interface TemplateUnionApplication { + insert(p: { first: TemplateUnion }): Promise; + reduce(p: { + first: TemplateUnion; + second: TemplateUnion | null; + }): Promise; + coalesce(p: { + first: TemplateUnion | null; + second: TemplateUnion | null; + third?: TemplateUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonAtomicUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..9281e4e4f3 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_application_claude_ToJsonAtomicUnion = + _test_llm_application({ + model: "claude", + name: "ToJsonAtomicUnion", + })(typia.llm.application()); + +interface ToJsonAtomicUnionApplication { + insert(p: { first: ToJsonAtomicUnion }): Promise; + reduce(p: { + first: ToJsonAtomicUnion; + second: ToJsonAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonAtomicUnion | null; + second: ToJsonAtomicUnion | null; + third?: ToJsonAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonDouble.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonDouble.ts new file mode 100644 index 0000000000..c832f5dc12 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonDouble.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_application_claude_ToJsonDouble = _test_llm_application({ + model: "claude", + name: "ToJsonDouble", +})(typia.llm.application()); + +interface ToJsonDoubleApplication { + insert(p: { first: ToJsonDouble }): Promise; + reduce(p: { + first: ToJsonDouble; + second: ToJsonDouble | null; + }): Promise; + coalesce(p: { + first: ToJsonDouble | null; + second: ToJsonDouble | null; + third?: ToJsonDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonNull.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonNull.ts new file mode 100644 index 0000000000..62b63ba238 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonNull.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_application_claude_ToJsonNull = _test_llm_application({ + model: "claude", + name: "ToJsonNull", +})(typia.llm.application()); + +interface ToJsonNullApplication { + insert(p: { first: ToJsonNull }): Promise; + reduce(p: { + first: ToJsonNull; + second: ToJsonNull | null; + }): Promise; + coalesce(p: { + first: ToJsonNull | null; + second: ToJsonNull | null; + third?: ToJsonNull | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonUnion.ts new file mode 100644 index 0000000000..e9f5cab0b4 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_ToJsonUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_application_claude_ToJsonUnion = _test_llm_application({ + model: "claude", + name: "ToJsonUnion", +})(typia.llm.application()); + +interface ToJsonUnionApplication { + insert(p: { first: ToJsonUnion }): Promise; + reduce(p: { + first: ToJsonUnion; + second: ToJsonUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonUnion | null; + second: ToJsonUnion | null; + third?: ToJsonUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagArray.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagArray.ts new file mode 100644 index 0000000000..20e8e0e173 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_application_claude_TypeTagArray = _test_llm_application({ + model: "claude", + name: "TypeTagArray", +})(typia.llm.application()); + +interface TypeTagArrayApplication { + insert(p: { first: TypeTagArray }): Promise; + reduce(p: { + first: TypeTagArray; + second: TypeTagArray | null; + }): Promise; + coalesce(p: { + first: TypeTagArray | null; + second: TypeTagArray | null; + third?: TypeTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagArrayUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..8ffbe285b1 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_application_claude_TypeTagArrayUnion = + _test_llm_application({ + model: "claude", + name: "TypeTagArrayUnion", + })(typia.llm.application()); + +interface TypeTagArrayUnionApplication { + insert(p: { first: TypeTagArrayUnion }): Promise; + reduce(p: { + first: TypeTagArrayUnion; + second: TypeTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagArrayUnion | null; + second: TypeTagArrayUnion | null; + third?: TypeTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagAtomicUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..dbcde1db61 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_application_claude_TypeTagAtomicUnion = + _test_llm_application({ + model: "claude", + name: "TypeTagAtomicUnion", + })(typia.llm.application()); + +interface TypeTagAtomicUnionApplication { + insert(p: { first: TypeTagAtomicUnion }): Promise; + reduce(p: { + first: TypeTagAtomicUnion; + second: TypeTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagAtomicUnion | null; + second: TypeTagAtomicUnion | null; + third?: TypeTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagCustom.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagCustom.ts new file mode 100644 index 0000000000..0463ce3de3 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagCustom.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_application_claude_TypeTagCustom = _test_llm_application({ + model: "claude", + name: "TypeTagCustom", +})(typia.llm.application()); + +interface TypeTagCustomApplication { + insert(p: { first: TypeTagCustom }): Promise; + reduce(p: { + first: TypeTagCustom; + second: TypeTagCustom | null; + }): Promise; + coalesce(p: { + first: TypeTagCustom | null; + second: TypeTagCustom | null; + third?: TypeTagCustom | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagDefault.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagDefault.ts new file mode 100644 index 0000000000..ed6c465a21 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagDefault.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_application_claude_TypeTagDefault = _test_llm_application( + { + model: "claude", + name: "TypeTagDefault", + }, +)(typia.llm.application()); + +interface TypeTagDefaultApplication { + insert(p: { first: TypeTagDefault }): Promise; + reduce(p: { + first: TypeTagDefault; + second: TypeTagDefault | null; + }): Promise; + coalesce(p: { + first: TypeTagDefault | null; + second: TypeTagDefault | null; + third?: TypeTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagFormat.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagFormat.ts new file mode 100644 index 0000000000..93637284d5 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_application_claude_TypeTagFormat = _test_llm_application({ + model: "claude", + name: "TypeTagFormat", +})(typia.llm.application()); + +interface TypeTagFormatApplication { + insert(p: { first: TypeTagFormat }): Promise; + reduce(p: { + first: TypeTagFormat; + second: TypeTagFormat | null; + }): Promise; + coalesce(p: { + first: TypeTagFormat | null; + second: TypeTagFormat | null; + third?: TypeTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagLength.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagLength.ts new file mode 100644 index 0000000000..ebec7c9323 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_application_claude_TypeTagLength = _test_llm_application({ + model: "claude", + name: "TypeTagLength", +})(typia.llm.application()); + +interface TypeTagLengthApplication { + insert(p: { first: TypeTagLength }): Promise; + reduce(p: { + first: TypeTagLength; + second: TypeTagLength | null; + }): Promise; + coalesce(p: { + first: TypeTagLength | null; + second: TypeTagLength | null; + third?: TypeTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagMatrix.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagMatrix.ts new file mode 100644 index 0000000000..dfa1be2bbb --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_application_claude_TypeTagMatrix = _test_llm_application({ + model: "claude", + name: "TypeTagMatrix", +})(typia.llm.application()); + +interface TypeTagMatrixApplication { + insert(p: { first: TypeTagMatrix }): Promise; + reduce(p: { + first: TypeTagMatrix; + second: TypeTagMatrix | null; + }): Promise; + coalesce(p: { + first: TypeTagMatrix | null; + second: TypeTagMatrix | null; + third?: TypeTagMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagObjectUnion.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..22aca41a07 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_application_claude_TypeTagObjectUnion = + _test_llm_application({ + model: "claude", + name: "TypeTagObjectUnion", + })(typia.llm.application()); + +interface TypeTagObjectUnionApplication { + insert(p: { first: TypeTagObjectUnion }): Promise; + reduce(p: { + first: TypeTagObjectUnion; + second: TypeTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagObjectUnion | null; + second: TypeTagObjectUnion | null; + third?: TypeTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagPattern.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagPattern.ts new file mode 100644 index 0000000000..b4c599d935 --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagPattern.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_application_claude_TypeTagPattern = _test_llm_application( + { + model: "claude", + name: "TypeTagPattern", + }, +)(typia.llm.application()); + +interface TypeTagPatternApplication { + insert(p: { first: TypeTagPattern }): Promise; + reduce(p: { + first: TypeTagPattern; + second: TypeTagPattern | null; + }): Promise; + coalesce(p: { + first: TypeTagPattern | null; + second: TypeTagPattern | null; + third?: TypeTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagRange.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagRange.ts new file mode 100644 index 0000000000..9cfa7ac36a --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_application_claude_TypeTagRange = _test_llm_application({ + model: "claude", + name: "TypeTagRange", +})(typia.llm.application()); + +interface TypeTagRangeApplication { + insert(p: { first: TypeTagRange }): Promise; + reduce(p: { + first: TypeTagRange; + second: TypeTagRange | null; + }): Promise; + coalesce(p: { + first: TypeTagRange | null; + second: TypeTagRange | null; + third?: TypeTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagType.ts b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagType.ts new file mode 100644 index 0000000000..8f83a8fb9f --- /dev/null +++ b/test/src/features/llm.application/claude/test_llm_application_claude_TypeTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_application_claude_TypeTagType = _test_llm_application({ + model: "claude", + name: "TypeTagType", +})(typia.llm.application()); + +interface TypeTagTypeApplication { + insert(p: { first: TypeTagType }): Promise; + reduce(p: { + first: TypeTagType; + second: TypeTagType | null; + }): Promise; + coalesce(p: { + first: TypeTagType | null; + second: TypeTagType | null; + third?: TypeTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayAny.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayAny.ts new file mode 100644 index 0000000000..eeffc244db --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayAny.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_application_gemini_ArrayAny = _test_llm_application({ + model: "gemini", + name: "ArrayAny", +})(typia.llm.application()); + +interface ArrayAnyApplication { + insert(p: { first: ArrayAny }): Promise; + reduce(p: { first: ArrayAny; second: ArrayAny | null }): Promise; + coalesce(p: { + first: ArrayAny | null; + second: ArrayAny | null; + third?: ArrayAny | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayHierarchical.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayHierarchical.ts new file mode 100644 index 0000000000..42da917648 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayHierarchical.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_application_gemini_ArrayHierarchical = + _test_llm_application({ + model: "gemini", + name: "ArrayHierarchical", + })(typia.llm.application()); + +interface ArrayHierarchicalApplication { + insert(p: { first: ArrayHierarchical }): Promise; + reduce(p: { + first: ArrayHierarchical; + second: ArrayHierarchical | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchical | null; + second: ArrayHierarchical | null; + third?: ArrayHierarchical | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayHierarchicalPointer.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..1e0da12d78 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayHierarchicalPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_application_gemini_ArrayHierarchicalPointer = + _test_llm_application({ + model: "gemini", + name: "ArrayHierarchicalPointer", + })(typia.llm.application()); + +interface ArrayHierarchicalPointerApplication { + insert(p: { first: ArrayHierarchicalPointer }): Promise; + reduce(p: { + first: ArrayHierarchicalPointer; + second: ArrayHierarchicalPointer | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchicalPointer | null; + second: ArrayHierarchicalPointer | null; + third?: ArrayHierarchicalPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayMatrix.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayMatrix.ts new file mode 100644 index 0000000000..116804849c --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_application_gemini_ArrayMatrix = _test_llm_application({ + model: "gemini", + name: "ArrayMatrix", +})(typia.llm.application()); + +interface ArrayMatrixApplication { + insert(p: { first: ArrayMatrix }): Promise; + reduce(p: { + first: ArrayMatrix; + second: ArrayMatrix | null; + }): Promise; + coalesce(p: { + first: ArrayMatrix | null; + second: ArrayMatrix | null; + third?: ArrayMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayRecursive.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayRecursive.ts new file mode 100644 index 0000000000..170b166f1f --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArrayRecursive.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_application_gemini_ArrayRecursive = _test_llm_application( + { + model: "gemini", + name: "ArrayRecursive", + }, +)(typia.llm.application()); + +interface ArrayRecursiveApplication { + insert(p: { first: ArrayRecursive }): Promise; + reduce(p: { + first: ArrayRecursive; + second: ArrayRecursive | null; + }): Promise; + coalesce(p: { + first: ArrayRecursive | null; + second: ArrayRecursive | null; + third?: ArrayRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ArraySimple.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArraySimple.ts new file mode 100644 index 0000000000..4a677d0a6a --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ArraySimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_application_gemini_ArraySimple = _test_llm_application({ + model: "gemini", + name: "ArraySimple", +})(typia.llm.application()); + +interface ArraySimpleApplication { + insert(p: { first: ArraySimple }): Promise; + reduce(p: { + first: ArraySimple; + second: ArraySimple | null; + }): Promise; + coalesce(p: { + first: ArraySimple | null; + second: ArraySimple | null; + third?: ArraySimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassGetter.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassGetter.ts new file mode 100644 index 0000000000..361c016a09 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassGetter.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_application_gemini_ClassGetter = _test_llm_application({ + model: "gemini", + name: "ClassGetter", +})(typia.llm.application()); + +interface ClassGetterApplication { + insert(p: { first: ClassGetter }): Promise; + reduce(p: { + first: ClassGetter; + second: ClassGetter | null; + }): Promise; + coalesce(p: { + first: ClassGetter | null; + second: ClassGetter | null; + third?: ClassGetter | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassMethod.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassMethod.ts new file mode 100644 index 0000000000..a704697e0c --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassMethod.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_application_gemini_ClassMethod = _test_llm_application({ + model: "gemini", + name: "ClassMethod", +})(typia.llm.application()); + +interface ClassMethodApplication { + insert(p: { first: ClassMethod }): Promise; + reduce(p: { + first: ClassMethod; + second: ClassMethod | null; + }): Promise; + coalesce(p: { + first: ClassMethod | null; + second: ClassMethod | null; + third?: ClassMethod | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassPropertyAssignment.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..b3c6c326c3 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ClassPropertyAssignment.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_application_gemini_ClassPropertyAssignment = + _test_llm_application({ + model: "gemini", + name: "ClassPropertyAssignment", + })(typia.llm.application()); + +interface ClassPropertyAssignmentApplication { + insert(p: { first: ClassPropertyAssignment }): Promise; + reduce(p: { + first: ClassPropertyAssignment; + second: ClassPropertyAssignment | null; + }): Promise; + coalesce(p: { + first: ClassPropertyAssignment | null; + second: ClassPropertyAssignment | null; + third?: ClassPropertyAssignment | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagArray.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagArray.ts new file mode 100644 index 0000000000..e1a7094385 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_application_gemini_CommentTagArray = + _test_llm_application({ + model: "gemini", + name: "CommentTagArray", + })(typia.llm.application()); + +interface CommentTagArrayApplication { + insert(p: { first: CommentTagArray }): Promise; + reduce(p: { + first: CommentTagArray; + second: CommentTagArray | null; + }): Promise; + coalesce(p: { + first: CommentTagArray | null; + second: CommentTagArray | null; + third?: CommentTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagFormat.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagFormat.ts new file mode 100644 index 0000000000..1f3a47f3d3 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagFormat.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_application_gemini_CommentTagFormat = + _test_llm_application({ + model: "gemini", + name: "CommentTagFormat", + })(typia.llm.application()); + +interface CommentTagFormatApplication { + insert(p: { first: CommentTagFormat }): Promise; + reduce(p: { + first: CommentTagFormat; + second: CommentTagFormat | null; + }): Promise; + coalesce(p: { + first: CommentTagFormat | null; + second: CommentTagFormat | null; + third?: CommentTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagLength.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagLength.ts new file mode 100644 index 0000000000..e604bbdf9c --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagLength.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_application_gemini_CommentTagLength = + _test_llm_application({ + model: "gemini", + name: "CommentTagLength", + })(typia.llm.application()); + +interface CommentTagLengthApplication { + insert(p: { first: CommentTagLength }): Promise; + reduce(p: { + first: CommentTagLength; + second: CommentTagLength | null; + }): Promise; + coalesce(p: { + first: CommentTagLength | null; + second: CommentTagLength | null; + third?: CommentTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagPattern.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagPattern.ts new file mode 100644 index 0000000000..e24b000129 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagPattern.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_application_gemini_CommentTagPattern = + _test_llm_application({ + model: "gemini", + name: "CommentTagPattern", + })(typia.llm.application()); + +interface CommentTagPatternApplication { + insert(p: { first: CommentTagPattern }): Promise; + reduce(p: { + first: CommentTagPattern; + second: CommentTagPattern | null; + }): Promise; + coalesce(p: { + first: CommentTagPattern | null; + second: CommentTagPattern | null; + third?: CommentTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagRange.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagRange.ts new file mode 100644 index 0000000000..931dacdf69 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagRange.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_application_gemini_CommentTagRange = + _test_llm_application({ + model: "gemini", + name: "CommentTagRange", + })(typia.llm.application()); + +interface CommentTagRangeApplication { + insert(p: { first: CommentTagRange }): Promise; + reduce(p: { + first: CommentTagRange; + second: CommentTagRange | null; + }): Promise; + coalesce(p: { + first: CommentTagRange | null; + second: CommentTagRange | null; + third?: CommentTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagType.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagType.ts new file mode 100644 index 0000000000..d9701c0bfd --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_CommentTagType.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_application_gemini_CommentTagType = _test_llm_application( + { + model: "gemini", + name: "CommentTagType", + }, +)(typia.llm.application()); + +interface CommentTagTypeApplication { + insert(p: { first: CommentTagType }): Promise; + reduce(p: { + first: CommentTagType; + second: CommentTagType | null; + }): Promise; + coalesce(p: { + first: CommentTagType | null; + second: CommentTagType | null; + third?: CommentTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ConstantAtomicAbsorbed.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..5cfceeb154 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ConstantAtomicAbsorbed.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_application_gemini_ConstantAtomicAbsorbed = + _test_llm_application({ + model: "gemini", + name: "ConstantAtomicAbsorbed", + })(typia.llm.application()); + +interface ConstantAtomicAbsorbedApplication { + insert(p: { first: ConstantAtomicAbsorbed }): Promise; + reduce(p: { + first: ConstantAtomicAbsorbed; + second: ConstantAtomicAbsorbed | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicAbsorbed | null; + second: ConstantAtomicAbsorbed | null; + third?: ConstantAtomicAbsorbed | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicConstant.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicConstant.ts new file mode 100644 index 0000000000..7cd9ed9e42 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_application_gemini_DynamicConstant = + _test_llm_application({ + model: "gemini", + name: "DynamicConstant", + })(typia.llm.application()); + +interface DynamicConstantApplication { + insert(p: { first: DynamicConstant }): Promise; + reduce(p: { + first: DynamicConstant; + second: DynamicConstant | null; + }): Promise; + coalesce(p: { + first: DynamicConstant | null; + second: DynamicConstant | null; + third?: DynamicConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicEnumeration.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicEnumeration.ts new file mode 100644 index 0000000000..1a4dbc48d7 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_application_gemini_DynamicEnumeration = + _test_llm_application({ + model: "gemini", + name: "DynamicEnumeration", + })(typia.llm.application()); + +interface DynamicEnumerationApplication { + insert(p: { first: DynamicEnumeration }): Promise; + reduce(p: { + first: DynamicEnumeration; + second: DynamicEnumeration | null; + }): Promise; + coalesce(p: { + first: DynamicEnumeration | null; + second: DynamicEnumeration | null; + third?: DynamicEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicNever.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicNever.ts new file mode 100644 index 0000000000..9721c8a1eb --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicNever.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_application_gemini_DynamicNever = _test_llm_application({ + model: "gemini", + name: "DynamicNever", +})(typia.llm.application()); + +interface DynamicNeverApplication { + insert(p: { first: DynamicNever }): Promise; + reduce(p: { + first: DynamicNever; + second: DynamicNever | null; + }): Promise; + coalesce(p: { + first: DynamicNever | null; + second: DynamicNever | null; + third?: DynamicNever | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicUndefined.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicUndefined.ts new file mode 100644 index 0000000000..c8b5596055 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_DynamicUndefined.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_application_gemini_DynamicUndefined = + _test_llm_application({ + model: "gemini", + name: "DynamicUndefined", + })(typia.llm.application()); + +interface DynamicUndefinedApplication { + insert(p: { first: DynamicUndefined }): Promise; + reduce(p: { + first: DynamicUndefined; + second: DynamicUndefined | null; + }): Promise; + coalesce(p: { + first: DynamicUndefined | null; + second: DynamicUndefined | null; + third?: DynamicUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectDate.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectDate.ts new file mode 100644 index 0000000000..031736389f --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectDate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_application_gemini_ObjectDate = _test_llm_application({ + model: "gemini", + name: "ObjectDate", +})(typia.llm.application()); + +interface ObjectDateApplication { + insert(p: { first: ObjectDate }): Promise; + reduce(p: { + first: ObjectDate; + second: ObjectDate | null; + }): Promise; + coalesce(p: { + first: ObjectDate | null; + second: ObjectDate | null; + third?: ObjectDate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectDescription.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectDescription.ts new file mode 100644 index 0000000000..c60ada0045 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectDescription.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_application_gemini_ObjectDescription = + _test_llm_application({ + model: "gemini", + name: "ObjectDescription", + })(typia.llm.application()); + +interface ObjectDescriptionApplication { + insert(p: { first: ObjectDescription }): Promise; + reduce(p: { + first: ObjectDescription; + second: ObjectDescription | null; + }): Promise; + coalesce(p: { + first: ObjectDescription | null; + second: ObjectDescription | null; + third?: ObjectDescription | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectGenericAlias.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectGenericAlias.ts new file mode 100644 index 0000000000..15a5faa970 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectGenericAlias.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_application_gemini_ObjectGenericAlias = + _test_llm_application({ + model: "gemini", + name: "ObjectGenericAlias", + })(typia.llm.application()); + +interface ObjectGenericAliasApplication { + insert(p: { first: ObjectGenericAlias }): Promise; + reduce(p: { + first: ObjectGenericAlias; + second: ObjectGenericAlias | null; + }): Promise; + coalesce(p: { + first: ObjectGenericAlias | null; + second: ObjectGenericAlias | null; + third?: ObjectGenericAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectGenericArray.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectGenericArray.ts new file mode 100644 index 0000000000..6092c63b73 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectGenericArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_application_gemini_ObjectGenericArray = + _test_llm_application({ + model: "gemini", + name: "ObjectGenericArray", + })(typia.llm.application()); + +interface ObjectGenericArrayApplication { + insert(p: { first: ObjectGenericArray }): Promise; + reduce(p: { + first: ObjectGenericArray; + second: ObjectGenericArray | null; + }): Promise; + coalesce(p: { + first: ObjectGenericArray | null; + second: ObjectGenericArray | null; + third?: ObjectGenericArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectInternal.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectInternal.ts new file mode 100644 index 0000000000..389cadaa87 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectInternal.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_application_gemini_ObjectInternal = _test_llm_application( + { + model: "gemini", + name: "ObjectInternal", + }, +)(typia.llm.application()); + +interface ObjectInternalApplication { + insert(p: { first: ObjectInternal }): Promise; + reduce(p: { + first: ObjectInternal; + second: ObjectInternal | null; + }): Promise; + coalesce(p: { + first: ObjectInternal | null; + second: ObjectInternal | null; + third?: ObjectInternal | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectIntersection.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectIntersection.ts new file mode 100644 index 0000000000..5971c6eed9 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectIntersection.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_application_gemini_ObjectIntersection = + _test_llm_application({ + model: "gemini", + name: "ObjectIntersection", + })(typia.llm.application()); + +interface ObjectIntersectionApplication { + insert(p: { first: ObjectIntersection }): Promise; + reduce(p: { + first: ObjectIntersection; + second: ObjectIntersection | null; + }): Promise; + coalesce(p: { + first: ObjectIntersection | null; + second: ObjectIntersection | null; + third?: ObjectIntersection | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectJsonTag.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectJsonTag.ts new file mode 100644 index 0000000000..3f798f7167 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectJsonTag.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_application_gemini_ObjectJsonTag = _test_llm_application({ + model: "gemini", + name: "ObjectJsonTag", +})(typia.llm.application()); + +interface ObjectJsonTagApplication { + insert(p: { first: ObjectJsonTag }): Promise; + reduce(p: { + first: ObjectJsonTag; + second: ObjectJsonTag | null; + }): Promise; + coalesce(p: { + first: ObjectJsonTag | null; + second: ObjectJsonTag | null; + third?: ObjectJsonTag | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectLiteralProperty.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..60307ebd86 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectLiteralProperty.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_application_gemini_ObjectLiteralProperty = + _test_llm_application({ + model: "gemini", + name: "ObjectLiteralProperty", + })(typia.llm.application()); + +interface ObjectLiteralPropertyApplication { + insert(p: { first: ObjectLiteralProperty }): Promise; + reduce(p: { + first: ObjectLiteralProperty; + second: ObjectLiteralProperty | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralProperty | null; + second: ObjectLiteralProperty | null; + third?: ObjectLiteralProperty | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectLiteralType.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectLiteralType.ts new file mode 100644 index 0000000000..96cb4690c5 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectLiteralType.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_application_gemini_ObjectLiteralType = + _test_llm_application({ + model: "gemini", + name: "ObjectLiteralType", + })(typia.llm.application()); + +interface ObjectLiteralTypeApplication { + insert(p: { first: ObjectLiteralType }): Promise; + reduce(p: { + first: ObjectLiteralType; + second: ObjectLiteralType | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralType | null; + second: ObjectLiteralType | null; + third?: ObjectLiteralType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectOptional.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectOptional.ts new file mode 100644 index 0000000000..facc1e83ab --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectOptional.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_application_gemini_ObjectOptional = _test_llm_application( + { + model: "gemini", + name: "ObjectOptional", + }, +)(typia.llm.application()); + +interface ObjectOptionalApplication { + insert(p: { first: ObjectOptional }): Promise; + reduce(p: { + first: ObjectOptional; + second: ObjectOptional | null; + }): Promise; + coalesce(p: { + first: ObjectOptional | null; + second: ObjectOptional | null; + third?: ObjectOptional | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPartial.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPartial.ts new file mode 100644 index 0000000000..9089a9ad0a --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPartial.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_application_gemini_ObjectPartial = _test_llm_application({ + model: "gemini", + name: "ObjectPartial", +})(typia.llm.application()); + +interface ObjectPartialApplication { + insert(p: { first: ObjectPartial }): Promise; + reduce(p: { + first: ObjectPartial; + second: ObjectPartial | null; + }): Promise; + coalesce(p: { + first: ObjectPartial | null; + second: ObjectPartial | null; + third?: ObjectPartial | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPartialAndRequired.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..4e8b5b28ca --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPartialAndRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_application_gemini_ObjectPartialAndRequired = + _test_llm_application({ + model: "gemini", + name: "ObjectPartialAndRequired", + })(typia.llm.application()); + +interface ObjectPartialAndRequiredApplication { + insert(p: { first: ObjectPartialAndRequired }): Promise; + reduce(p: { + first: ObjectPartialAndRequired; + second: ObjectPartialAndRequired | null; + }): Promise; + coalesce(p: { + first: ObjectPartialAndRequired | null; + second: ObjectPartialAndRequired | null; + third?: ObjectPartialAndRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPrimitive.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPrimitive.ts new file mode 100644 index 0000000000..c5816a74ab --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectPrimitive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_application_gemini_ObjectPrimitive = + _test_llm_application({ + model: "gemini", + name: "ObjectPrimitive", + })(typia.llm.application()); + +interface ObjectPrimitiveApplication { + insert(p: { first: ObjectPrimitive }): Promise; + reduce(p: { + first: ObjectPrimitive; + second: ObjectPrimitive | null; + }): Promise; + coalesce(p: { + first: ObjectPrimitive | null; + second: ObjectPrimitive | null; + third?: ObjectPrimitive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectRecursive.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectRecursive.ts new file mode 100644 index 0000000000..b9a462a86c --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectRecursive.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_application_gemini_ObjectRecursive = + _test_llm_application({ + model: "gemini", + name: "ObjectRecursive", + })(typia.llm.application()); + +interface ObjectRecursiveApplication { + insert(p: { first: ObjectRecursive }): Promise; + reduce(p: { + first: ObjectRecursive; + second: ObjectRecursive | null; + }): Promise; + coalesce(p: { + first: ObjectRecursive | null; + second: ObjectRecursive | null; + third?: ObjectRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectRequired.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectRequired.ts new file mode 100644 index 0000000000..b30280b22b --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectRequired.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_application_gemini_ObjectRequired = _test_llm_application( + { + model: "gemini", + name: "ObjectRequired", + }, +)(typia.llm.application()); + +interface ObjectRequiredApplication { + insert(p: { first: ObjectRequired }): Promise; + reduce(p: { + first: ObjectRequired; + second: ObjectRequired | null; + }): Promise; + coalesce(p: { + first: ObjectRequired | null; + second: ObjectRequired | null; + third?: ObjectRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectSimple.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectSimple.ts new file mode 100644 index 0000000000..62dbdf418a --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ObjectSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_application_gemini_ObjectSimple = _test_llm_application({ + model: "gemini", + name: "ObjectSimple", +})(typia.llm.application()); + +interface ObjectSimpleApplication { + insert(p: { first: ObjectSimple }): Promise; + reduce(p: { + first: ObjectSimple; + second: ObjectSimple | null; + }): Promise; + coalesce(p: { + first: ObjectSimple | null; + second: ObjectSimple | null; + third?: ObjectSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TemplateAtomic.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TemplateAtomic.ts new file mode 100644 index 0000000000..1b4d744555 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TemplateAtomic.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_application_gemini_TemplateAtomic = _test_llm_application( + { + model: "gemini", + name: "TemplateAtomic", + }, +)(typia.llm.application()); + +interface TemplateAtomicApplication { + insert(p: { first: TemplateAtomic }): Promise; + reduce(p: { + first: TemplateAtomic; + second: TemplateAtomic | null; + }): Promise; + coalesce(p: { + first: TemplateAtomic | null; + second: TemplateAtomic | null; + third?: TemplateAtomic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TemplateConstant.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TemplateConstant.ts new file mode 100644 index 0000000000..7522fb3f33 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TemplateConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_application_gemini_TemplateConstant = + _test_llm_application({ + model: "gemini", + name: "TemplateConstant", + })(typia.llm.application()); + +interface TemplateConstantApplication { + insert(p: { first: TemplateConstant }): Promise; + reduce(p: { + first: TemplateConstant; + second: TemplateConstant | null; + }): Promise; + coalesce(p: { + first: TemplateConstant | null; + second: TemplateConstant | null; + third?: TemplateConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ToJsonDouble.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ToJsonDouble.ts new file mode 100644 index 0000000000..b18c391d3c --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ToJsonDouble.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_application_gemini_ToJsonDouble = _test_llm_application({ + model: "gemini", + name: "ToJsonDouble", +})(typia.llm.application()); + +interface ToJsonDoubleApplication { + insert(p: { first: ToJsonDouble }): Promise; + reduce(p: { + first: ToJsonDouble; + second: ToJsonDouble | null; + }): Promise; + coalesce(p: { + first: ToJsonDouble | null; + second: ToJsonDouble | null; + third?: ToJsonDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_ToJsonNull.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_ToJsonNull.ts new file mode 100644 index 0000000000..25a6ba90cb --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_ToJsonNull.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_application_gemini_ToJsonNull = _test_llm_application({ + model: "gemini", + name: "ToJsonNull", +})(typia.llm.application()); + +interface ToJsonNullApplication { + insert(p: { first: ToJsonNull }): Promise; + reduce(p: { + first: ToJsonNull; + second: ToJsonNull | null; + }): Promise; + coalesce(p: { + first: ToJsonNull | null; + second: ToJsonNull | null; + third?: ToJsonNull | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagArray.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagArray.ts new file mode 100644 index 0000000000..1bbd22d14c --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_application_gemini_TypeTagArray = _test_llm_application({ + model: "gemini", + name: "TypeTagArray", +})(typia.llm.application()); + +interface TypeTagArrayApplication { + insert(p: { first: TypeTagArray }): Promise; + reduce(p: { + first: TypeTagArray; + second: TypeTagArray | null; + }): Promise; + coalesce(p: { + first: TypeTagArray | null; + second: TypeTagArray | null; + third?: TypeTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagCustom.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagCustom.ts new file mode 100644 index 0000000000..88ec6d1afd --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagCustom.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_application_gemini_TypeTagCustom = _test_llm_application({ + model: "gemini", + name: "TypeTagCustom", +})(typia.llm.application()); + +interface TypeTagCustomApplication { + insert(p: { first: TypeTagCustom }): Promise; + reduce(p: { + first: TypeTagCustom; + second: TypeTagCustom | null; + }): Promise; + coalesce(p: { + first: TypeTagCustom | null; + second: TypeTagCustom | null; + third?: TypeTagCustom | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagFormat.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagFormat.ts new file mode 100644 index 0000000000..0624d24679 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_application_gemini_TypeTagFormat = _test_llm_application({ + model: "gemini", + name: "TypeTagFormat", +})(typia.llm.application()); + +interface TypeTagFormatApplication { + insert(p: { first: TypeTagFormat }): Promise; + reduce(p: { + first: TypeTagFormat; + second: TypeTagFormat | null; + }): Promise; + coalesce(p: { + first: TypeTagFormat | null; + second: TypeTagFormat | null; + third?: TypeTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagLength.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagLength.ts new file mode 100644 index 0000000000..07bc081f3e --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_application_gemini_TypeTagLength = _test_llm_application({ + model: "gemini", + name: "TypeTagLength", +})(typia.llm.application()); + +interface TypeTagLengthApplication { + insert(p: { first: TypeTagLength }): Promise; + reduce(p: { + first: TypeTagLength; + second: TypeTagLength | null; + }): Promise; + coalesce(p: { + first: TypeTagLength | null; + second: TypeTagLength | null; + third?: TypeTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagMatrix.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagMatrix.ts new file mode 100644 index 0000000000..27a173db05 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_application_gemini_TypeTagMatrix = _test_llm_application({ + model: "gemini", + name: "TypeTagMatrix", +})(typia.llm.application()); + +interface TypeTagMatrixApplication { + insert(p: { first: TypeTagMatrix }): Promise; + reduce(p: { + first: TypeTagMatrix; + second: TypeTagMatrix | null; + }): Promise; + coalesce(p: { + first: TypeTagMatrix | null; + second: TypeTagMatrix | null; + third?: TypeTagMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagPattern.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagPattern.ts new file mode 100644 index 0000000000..327cb2f2db --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagPattern.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_application_gemini_TypeTagPattern = _test_llm_application( + { + model: "gemini", + name: "TypeTagPattern", + }, +)(typia.llm.application()); + +interface TypeTagPatternApplication { + insert(p: { first: TypeTagPattern }): Promise; + reduce(p: { + first: TypeTagPattern; + second: TypeTagPattern | null; + }): Promise; + coalesce(p: { + first: TypeTagPattern | null; + second: TypeTagPattern | null; + third?: TypeTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagRange.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagRange.ts new file mode 100644 index 0000000000..fb3a2a5c11 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_application_gemini_TypeTagRange = _test_llm_application({ + model: "gemini", + name: "TypeTagRange", +})(typia.llm.application()); + +interface TypeTagRangeApplication { + insert(p: { first: TypeTagRange }): Promise; + reduce(p: { + first: TypeTagRange; + second: TypeTagRange | null; + }): Promise; + coalesce(p: { + first: TypeTagRange | null; + second: TypeTagRange | null; + third?: TypeTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagType.ts b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagType.ts new file mode 100644 index 0000000000..34223d4b44 --- /dev/null +++ b/test/src/features/llm.application/gemini/test_llm_application_gemini_TypeTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_application_gemini_TypeTagType = _test_llm_application({ + model: "gemini", + name: "TypeTagType", +})(typia.llm.application()); + +interface TypeTagTypeApplication { + insert(p: { first: TypeTagType }): Promise; + reduce(p: { + first: TypeTagType; + second: TypeTagType | null; + }): Promise; + coalesce(p: { + first: TypeTagType | null; + second: TypeTagType | null; + third?: TypeTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayAny.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayAny.ts new file mode 100644 index 0000000000..5448bbb9b9 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayAny.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_application_llama_ArrayAny = _test_llm_application({ + model: "llama", + name: "ArrayAny", +})(typia.llm.application()); + +interface ArrayAnyApplication { + insert(p: { first: ArrayAny }): Promise; + reduce(p: { first: ArrayAny; second: ArrayAny | null }): Promise; + coalesce(p: { + first: ArrayAny | null; + second: ArrayAny | null; + third?: ArrayAny | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayHierarchical.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayHierarchical.ts new file mode 100644 index 0000000000..884a639390 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayHierarchical.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_application_llama_ArrayHierarchical = + _test_llm_application({ + model: "llama", + name: "ArrayHierarchical", + })(typia.llm.application()); + +interface ArrayHierarchicalApplication { + insert(p: { first: ArrayHierarchical }): Promise; + reduce(p: { + first: ArrayHierarchical; + second: ArrayHierarchical | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchical | null; + second: ArrayHierarchical | null; + third?: ArrayHierarchical | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayHierarchicalPointer.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..d4e9465e59 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayHierarchicalPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_application_llama_ArrayHierarchicalPointer = + _test_llm_application({ + model: "llama", + name: "ArrayHierarchicalPointer", + })(typia.llm.application()); + +interface ArrayHierarchicalPointerApplication { + insert(p: { first: ArrayHierarchicalPointer }): Promise; + reduce(p: { + first: ArrayHierarchicalPointer; + second: ArrayHierarchicalPointer | null; + }): Promise; + coalesce(p: { + first: ArrayHierarchicalPointer | null; + second: ArrayHierarchicalPointer | null; + third?: ArrayHierarchicalPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayMatrix.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayMatrix.ts new file mode 100644 index 0000000000..d981ad8fa6 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_application_llama_ArrayMatrix = _test_llm_application({ + model: "llama", + name: "ArrayMatrix", +})(typia.llm.application()); + +interface ArrayMatrixApplication { + insert(p: { first: ArrayMatrix }): Promise; + reduce(p: { + first: ArrayMatrix; + second: ArrayMatrix | null; + }): Promise; + coalesce(p: { + first: ArrayMatrix | null; + second: ArrayMatrix | null; + third?: ArrayMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursive.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursive.ts new file mode 100644 index 0000000000..f48001457f --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursive.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_application_llama_ArrayRecursive = _test_llm_application({ + model: "llama", + name: "ArrayRecursive", +})(typia.llm.application()); + +interface ArrayRecursiveApplication { + insert(p: { first: ArrayRecursive }): Promise; + reduce(p: { + first: ArrayRecursive; + second: ArrayRecursive | null; + }): Promise; + coalesce(p: { + first: ArrayRecursive | null; + second: ArrayRecursive | null; + third?: ArrayRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..642fb7ffb7 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_application_llama_ArrayRecursiveUnionExplicit = + _test_llm_application({ + model: "llama", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionExplicitApplication { + insert(p: { first: ArrayRecursiveUnionExplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicit; + second: ArrayRecursiveUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicit | null; + second: ArrayRecursiveUnionExplicit | null; + third?: ArrayRecursiveUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..647007707e --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,28 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_application_llama_ArrayRecursiveUnionExplicitPointer = + _test_llm_application({ + model: "llama", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.application< + ArrayRecursiveUnionExplicitPointerApplication, + "llama" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerApplication { + insert(p: { first: ArrayRecursiveUnionExplicitPointer }): Promise; + reduce(p: { + first: ArrayRecursiveUnionExplicitPointer; + second: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionExplicitPointer | null; + second: ArrayRecursiveUnionExplicitPointer | null; + third?: ArrayRecursiveUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..a42603c2ee --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_application_llama_ArrayRecursiveUnionImplicit = + _test_llm_application({ + model: "llama", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.application()); + +interface ArrayRecursiveUnionImplicitApplication { + insert(p: { first: ArrayRecursiveUnionImplicit }): Promise; + reduce(p: { + first: ArrayRecursiveUnionImplicit; + second: ArrayRecursiveUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ArrayRecursiveUnionImplicit | null; + second: ArrayRecursiveUnionImplicit | null; + third?: ArrayRecursiveUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedNullable.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..9beae737d0 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedNullable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_application_llama_ArrayRepeatedNullable = + _test_llm_application({ + model: "llama", + name: "ArrayRepeatedNullable", + })(typia.llm.application()); + +interface ArrayRepeatedNullableApplication { + insert(p: { first: ArrayRepeatedNullable }): Promise; + reduce(p: { + first: ArrayRepeatedNullable; + second: ArrayRepeatedNullable | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedNullable | null; + second: ArrayRepeatedNullable | null; + third?: ArrayRepeatedNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedRequired.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..d8b0c4e2ca --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_application_llama_ArrayRepeatedRequired = + _test_llm_application({ + model: "llama", + name: "ArrayRepeatedRequired", + })(typia.llm.application()); + +interface ArrayRepeatedRequiredApplication { + insert(p: { first: ArrayRepeatedRequired }): Promise; + reduce(p: { + first: ArrayRepeatedRequired; + second: ArrayRepeatedRequired | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedRequired | null; + second: ArrayRepeatedRequired | null; + third?: ArrayRepeatedRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..9f709bbf8c --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayRepeatedUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_application_llama_ArrayRepeatedUnion = + _test_llm_application({ + model: "llama", + name: "ArrayRepeatedUnion", + })(typia.llm.application()); + +interface ArrayRepeatedUnionApplication { + insert(p: { first: ArrayRepeatedUnion }): Promise; + reduce(p: { + first: ArrayRepeatedUnion; + second: ArrayRepeatedUnion | null; + }): Promise; + coalesce(p: { + first: ArrayRepeatedUnion | null; + second: ArrayRepeatedUnion | null; + third?: ArrayRepeatedUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArraySimple.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArraySimple.ts new file mode 100644 index 0000000000..6b0a6d32aa --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArraySimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_application_llama_ArraySimple = _test_llm_application({ + model: "llama", + name: "ArraySimple", +})(typia.llm.application()); + +interface ArraySimpleApplication { + insert(p: { first: ArraySimple }): Promise; + reduce(p: { + first: ArraySimple; + second: ArraySimple | null; + }): Promise; + coalesce(p: { + first: ArraySimple | null; + second: ArraySimple | null; + third?: ArraySimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ArrayUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayUnion.ts new file mode 100644 index 0000000000..2b18168d0b --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ArrayUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_application_llama_ArrayUnion = _test_llm_application({ + model: "llama", + name: "ArrayUnion", +})(typia.llm.application()); + +interface ArrayUnionApplication { + insert(p: { first: ArrayUnion }): Promise; + reduce(p: { + first: ArrayUnion; + second: ArrayUnion | null; + }): Promise; + coalesce(p: { + first: ArrayUnion | null; + second: ArrayUnion | null; + third?: ArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_AtomicUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_AtomicUnion.ts new file mode 100644 index 0000000000..aa105ff2ae --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_AtomicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_application_llama_AtomicUnion = _test_llm_application({ + model: "llama", + name: "AtomicUnion", +})(typia.llm.application()); + +interface AtomicUnionApplication { + insert(p: { first: AtomicUnion }): Promise; + reduce(p: { + first: AtomicUnion; + second: AtomicUnion | null; + }): Promise; + coalesce(p: { + first: AtomicUnion | null; + second: AtomicUnion | null; + third?: AtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ClassGetter.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ClassGetter.ts new file mode 100644 index 0000000000..74272f3464 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ClassGetter.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_application_llama_ClassGetter = _test_llm_application({ + model: "llama", + name: "ClassGetter", +})(typia.llm.application()); + +interface ClassGetterApplication { + insert(p: { first: ClassGetter }): Promise; + reduce(p: { + first: ClassGetter; + second: ClassGetter | null; + }): Promise; + coalesce(p: { + first: ClassGetter | null; + second: ClassGetter | null; + third?: ClassGetter | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ClassMethod.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ClassMethod.ts new file mode 100644 index 0000000000..a2ebed74a3 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ClassMethod.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_application_llama_ClassMethod = _test_llm_application({ + model: "llama", + name: "ClassMethod", +})(typia.llm.application()); + +interface ClassMethodApplication { + insert(p: { first: ClassMethod }): Promise; + reduce(p: { + first: ClassMethod; + second: ClassMethod | null; + }): Promise; + coalesce(p: { + first: ClassMethod | null; + second: ClassMethod | null; + third?: ClassMethod | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ClassPropertyAssignment.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..724a4e3a7f --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ClassPropertyAssignment.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_application_llama_ClassPropertyAssignment = + _test_llm_application({ + model: "llama", + name: "ClassPropertyAssignment", + })(typia.llm.application()); + +interface ClassPropertyAssignmentApplication { + insert(p: { first: ClassPropertyAssignment }): Promise; + reduce(p: { + first: ClassPropertyAssignment; + second: ClassPropertyAssignment | null; + }): Promise; + coalesce(p: { + first: ClassPropertyAssignment | null; + second: ClassPropertyAssignment | null; + third?: ClassPropertyAssignment | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagArray.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagArray.ts new file mode 100644 index 0000000000..97a33395a8 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagArray.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_application_llama_CommentTagArray = _test_llm_application( + { + model: "llama", + name: "CommentTagArray", + }, +)(typia.llm.application()); + +interface CommentTagArrayApplication { + insert(p: { first: CommentTagArray }): Promise; + reduce(p: { + first: CommentTagArray; + second: CommentTagArray | null; + }): Promise; + coalesce(p: { + first: CommentTagArray | null; + second: CommentTagArray | null; + third?: CommentTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagArrayUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..0c5baa0b13 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_application_llama_CommentTagArrayUnion = + _test_llm_application({ + model: "llama", + name: "CommentTagArrayUnion", + })(typia.llm.application()); + +interface CommentTagArrayUnionApplication { + insert(p: { first: CommentTagArrayUnion }): Promise; + reduce(p: { + first: CommentTagArrayUnion; + second: CommentTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagArrayUnion | null; + second: CommentTagArrayUnion | null; + third?: CommentTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagAtomicUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..bc07f10431 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_application_llama_CommentTagAtomicUnion = + _test_llm_application({ + model: "llama", + name: "CommentTagAtomicUnion", + })(typia.llm.application()); + +interface CommentTagAtomicUnionApplication { + insert(p: { first: CommentTagAtomicUnion }): Promise; + reduce(p: { + first: CommentTagAtomicUnion; + second: CommentTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagAtomicUnion | null; + second: CommentTagAtomicUnion | null; + third?: CommentTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagDefault.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagDefault.ts new file mode 100644 index 0000000000..843f66d9bd --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagDefault.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_application_llama_CommentTagDefault = + _test_llm_application({ + model: "llama", + name: "CommentTagDefault", + })(typia.llm.application()); + +interface CommentTagDefaultApplication { + insert(p: { first: CommentTagDefault }): Promise; + reduce(p: { + first: CommentTagDefault; + second: CommentTagDefault | null; + }): Promise; + coalesce(p: { + first: CommentTagDefault | null; + second: CommentTagDefault | null; + third?: CommentTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagFormat.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagFormat.ts new file mode 100644 index 0000000000..d44960db29 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagFormat.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_application_llama_CommentTagFormat = + _test_llm_application({ + model: "llama", + name: "CommentTagFormat", + })(typia.llm.application()); + +interface CommentTagFormatApplication { + insert(p: { first: CommentTagFormat }): Promise; + reduce(p: { + first: CommentTagFormat; + second: CommentTagFormat | null; + }): Promise; + coalesce(p: { + first: CommentTagFormat | null; + second: CommentTagFormat | null; + third?: CommentTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagLength.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagLength.ts new file mode 100644 index 0000000000..5060af7f1d --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagLength.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_application_llama_CommentTagLength = + _test_llm_application({ + model: "llama", + name: "CommentTagLength", + })(typia.llm.application()); + +interface CommentTagLengthApplication { + insert(p: { first: CommentTagLength }): Promise; + reduce(p: { + first: CommentTagLength; + second: CommentTagLength | null; + }): Promise; + coalesce(p: { + first: CommentTagLength | null; + second: CommentTagLength | null; + third?: CommentTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagObjectUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..9278dc73c3 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_application_llama_CommentTagObjectUnion = + _test_llm_application({ + model: "llama", + name: "CommentTagObjectUnion", + })(typia.llm.application()); + +interface CommentTagObjectUnionApplication { + insert(p: { first: CommentTagObjectUnion }): Promise; + reduce(p: { + first: CommentTagObjectUnion; + second: CommentTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: CommentTagObjectUnion | null; + second: CommentTagObjectUnion | null; + third?: CommentTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagPattern.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagPattern.ts new file mode 100644 index 0000000000..feb5ebf60e --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagPattern.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_application_llama_CommentTagPattern = + _test_llm_application({ + model: "llama", + name: "CommentTagPattern", + })(typia.llm.application()); + +interface CommentTagPatternApplication { + insert(p: { first: CommentTagPattern }): Promise; + reduce(p: { + first: CommentTagPattern; + second: CommentTagPattern | null; + }): Promise; + coalesce(p: { + first: CommentTagPattern | null; + second: CommentTagPattern | null; + third?: CommentTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagRange.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagRange.ts new file mode 100644 index 0000000000..8ad94d70b5 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagRange.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_application_llama_CommentTagRange = _test_llm_application( + { + model: "llama", + name: "CommentTagRange", + }, +)(typia.llm.application()); + +interface CommentTagRangeApplication { + insert(p: { first: CommentTagRange }): Promise; + reduce(p: { + first: CommentTagRange; + second: CommentTagRange | null; + }): Promise; + coalesce(p: { + first: CommentTagRange | null; + second: CommentTagRange | null; + third?: CommentTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagType.ts b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagType.ts new file mode 100644 index 0000000000..9320d6d201 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_CommentTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_application_llama_CommentTagType = _test_llm_application({ + model: "llama", + name: "CommentTagType", +})(typia.llm.application()); + +interface CommentTagTypeApplication { + insert(p: { first: CommentTagType }): Promise; + reduce(p: { + first: CommentTagType; + second: CommentTagType | null; + }): Promise; + coalesce(p: { + first: CommentTagType | null; + second: CommentTagType | null; + third?: CommentTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicAbsorbed.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..5656d4ad4e --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicAbsorbed.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_application_llama_ConstantAtomicAbsorbed = + _test_llm_application({ + model: "llama", + name: "ConstantAtomicAbsorbed", + })(typia.llm.application()); + +interface ConstantAtomicAbsorbedApplication { + insert(p: { first: ConstantAtomicAbsorbed }): Promise; + reduce(p: { + first: ConstantAtomicAbsorbed; + second: ConstantAtomicAbsorbed | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicAbsorbed | null; + second: ConstantAtomicAbsorbed | null; + third?: ConstantAtomicAbsorbed | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicTagged.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..cd27b683de --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicTagged.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_application_llama_ConstantAtomicTagged = + _test_llm_application({ + model: "llama", + name: "ConstantAtomicTagged", + })(typia.llm.application()); + +interface ConstantAtomicTaggedApplication { + insert(p: { first: ConstantAtomicTagged }): Promise; + reduce(p: { + first: ConstantAtomicTagged; + second: ConstantAtomicTagged | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicTagged | null; + second: ConstantAtomicTagged | null; + third?: ConstantAtomicTagged | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..c98d9e84ad --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_application_llama_ConstantAtomicUnion = + _test_llm_application({ + model: "llama", + name: "ConstantAtomicUnion", + })(typia.llm.application()); + +interface ConstantAtomicUnionApplication { + insert(p: { first: ConstantAtomicUnion }): Promise; + reduce(p: { + first: ConstantAtomicUnion; + second: ConstantAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ConstantAtomicUnion | null; + second: ConstantAtomicUnion | null; + third?: ConstantAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ConstantConstEnumeration.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..f836d9b9e2 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantConstEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_application_llama_ConstantConstEnumeration = + _test_llm_application({ + model: "llama", + name: "ConstantConstEnumeration", + })(typia.llm.application()); + +interface ConstantConstEnumerationApplication { + insert(p: { first: ConstantConstEnumeration }): Promise; + reduce(p: { + first: ConstantConstEnumeration; + second: ConstantConstEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantConstEnumeration | null; + second: ConstantConstEnumeration | null; + third?: ConstantConstEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ConstantEnumeration.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantEnumeration.ts new file mode 100644 index 0000000000..0a463065ed --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ConstantEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_application_llama_ConstantEnumeration = + _test_llm_application({ + model: "llama", + name: "ConstantEnumeration", + })(typia.llm.application()); + +interface ConstantEnumerationApplication { + insert(p: { first: ConstantEnumeration }): Promise; + reduce(p: { + first: ConstantEnumeration; + second: ConstantEnumeration | null; + }): Promise; + coalesce(p: { + first: ConstantEnumeration | null; + second: ConstantEnumeration | null; + third?: ConstantEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicArray.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicArray.ts new file mode 100644 index 0000000000..4128847c7a --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_application_llama_DynamicArray = _test_llm_application({ + model: "llama", + name: "DynamicArray", +})(typia.llm.application()); + +interface DynamicArrayApplication { + insert(p: { first: DynamicArray }): Promise; + reduce(p: { + first: DynamicArray; + second: DynamicArray | null; + }): Promise; + coalesce(p: { + first: DynamicArray | null; + second: DynamicArray | null; + third?: DynamicArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicComposite.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicComposite.ts new file mode 100644 index 0000000000..cad1d7c92e --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_application_llama_DynamicComposite = + _test_llm_application({ + model: "llama", + name: "DynamicComposite", + })(typia.llm.application()); + +interface DynamicCompositeApplication { + insert(p: { first: DynamicComposite }): Promise; + reduce(p: { + first: DynamicComposite; + second: DynamicComposite | null; + }): Promise; + coalesce(p: { + first: DynamicComposite | null; + second: DynamicComposite | null; + third?: DynamicComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicConstant.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicConstant.ts new file mode 100644 index 0000000000..6e69c03829 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicConstant.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_application_llama_DynamicConstant = _test_llm_application( + { + model: "llama", + name: "DynamicConstant", + }, +)(typia.llm.application()); + +interface DynamicConstantApplication { + insert(p: { first: DynamicConstant }): Promise; + reduce(p: { + first: DynamicConstant; + second: DynamicConstant | null; + }): Promise; + coalesce(p: { + first: DynamicConstant | null; + second: DynamicConstant | null; + third?: DynamicConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicEnumeration.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicEnumeration.ts new file mode 100644 index 0000000000..bbd314f38a --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicEnumeration.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_application_llama_DynamicEnumeration = + _test_llm_application({ + model: "llama", + name: "DynamicEnumeration", + })(typia.llm.application()); + +interface DynamicEnumerationApplication { + insert(p: { first: DynamicEnumeration }): Promise; + reduce(p: { + first: DynamicEnumeration; + second: DynamicEnumeration | null; + }): Promise; + coalesce(p: { + first: DynamicEnumeration | null; + second: DynamicEnumeration | null; + third?: DynamicEnumeration | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicNever.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicNever.ts new file mode 100644 index 0000000000..ea7d6e3a26 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicNever.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_application_llama_DynamicNever = _test_llm_application({ + model: "llama", + name: "DynamicNever", +})(typia.llm.application()); + +interface DynamicNeverApplication { + insert(p: { first: DynamicNever }): Promise; + reduce(p: { + first: DynamicNever; + second: DynamicNever | null; + }): Promise; + coalesce(p: { + first: DynamicNever | null; + second: DynamicNever | null; + third?: DynamicNever | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicSimple.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicSimple.ts new file mode 100644 index 0000000000..b35a742119 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_application_llama_DynamicSimple = _test_llm_application({ + model: "llama", + name: "DynamicSimple", +})(typia.llm.application()); + +interface DynamicSimpleApplication { + insert(p: { first: DynamicSimple }): Promise; + reduce(p: { + first: DynamicSimple; + second: DynamicSimple | null; + }): Promise; + coalesce(p: { + first: DynamicSimple | null; + second: DynamicSimple | null; + third?: DynamicSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicTemplate.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicTemplate.ts new file mode 100644 index 0000000000..14487e8a98 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicTemplate.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_application_llama_DynamicTemplate = _test_llm_application( + { + model: "llama", + name: "DynamicTemplate", + }, +)(typia.llm.application()); + +interface DynamicTemplateApplication { + insert(p: { first: DynamicTemplate }): Promise; + reduce(p: { + first: DynamicTemplate; + second: DynamicTemplate | null; + }): Promise; + coalesce(p: { + first: DynamicTemplate | null; + second: DynamicTemplate | null; + third?: DynamicTemplate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicTree.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicTree.ts new file mode 100644 index 0000000000..2d8349333d --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicTree.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_application_llama_DynamicTree = _test_llm_application({ + model: "llama", + name: "DynamicTree", +})(typia.llm.application()); + +interface DynamicTreeApplication { + insert(p: { first: DynamicTree }): Promise; + reduce(p: { + first: DynamicTree; + second: DynamicTree | null; + }): Promise; + coalesce(p: { + first: DynamicTree | null; + second: DynamicTree | null; + third?: DynamicTree | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicUndefined.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicUndefined.ts new file mode 100644 index 0000000000..2bcd7520bd --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicUndefined.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_application_llama_DynamicUndefined = + _test_llm_application({ + model: "llama", + name: "DynamicUndefined", + })(typia.llm.application()); + +interface DynamicUndefinedApplication { + insert(p: { first: DynamicUndefined }): Promise; + reduce(p: { + first: DynamicUndefined; + second: DynamicUndefined | null; + }): Promise; + coalesce(p: { + first: DynamicUndefined | null; + second: DynamicUndefined | null; + third?: DynamicUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_DynamicUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicUnion.ts new file mode 100644 index 0000000000..5eed2d09d3 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_DynamicUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_application_llama_DynamicUnion = _test_llm_application({ + model: "llama", + name: "DynamicUnion", +})(typia.llm.application()); + +interface DynamicUnionApplication { + insert(p: { first: DynamicUnion }): Promise; + reduce(p: { + first: DynamicUnion; + second: DynamicUnion | null; + }): Promise; + coalesce(p: { + first: DynamicUnion | null; + second: DynamicUnion | null; + third?: DynamicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectAlias.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectAlias.ts new file mode 100644 index 0000000000..ce1d6513b0 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectAlias.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_application_llama_ObjectAlias = _test_llm_application({ + model: "llama", + name: "ObjectAlias", +})(typia.llm.application()); + +interface ObjectAliasApplication { + insert(p: { first: ObjectAlias }): Promise; + reduce(p: { + first: ObjectAlias; + second: ObjectAlias | null; + }): Promise; + coalesce(p: { + first: ObjectAlias | null; + second: ObjectAlias | null; + third?: ObjectAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDate.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDate.ts new file mode 100644 index 0000000000..5b6340766b --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDate.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_application_llama_ObjectDate = _test_llm_application({ + model: "llama", + name: "ObjectDate", +})(typia.llm.application()); + +interface ObjectDateApplication { + insert(p: { first: ObjectDate }): Promise; + reduce(p: { + first: ObjectDate; + second: ObjectDate | null; + }): Promise; + coalesce(p: { + first: ObjectDate | null; + second: ObjectDate | null; + third?: ObjectDate | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDescription.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDescription.ts new file mode 100644 index 0000000000..9c1b94d796 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDescription.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_application_llama_ObjectDescription = + _test_llm_application({ + model: "llama", + name: "ObjectDescription", + })(typia.llm.application()); + +interface ObjectDescriptionApplication { + insert(p: { first: ObjectDescription }): Promise; + reduce(p: { + first: ObjectDescription; + second: ObjectDescription | null; + }): Promise; + coalesce(p: { + first: ObjectDescription | null; + second: ObjectDescription | null; + third?: ObjectDescription | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDynamic.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDynamic.ts new file mode 100644 index 0000000000..f2c44afd54 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectDynamic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_application_llama_ObjectDynamic = _test_llm_application({ + model: "llama", + name: "ObjectDynamic", +})(typia.llm.application()); + +interface ObjectDynamicApplication { + insert(p: { first: ObjectDynamic }): Promise; + reduce(p: { + first: ObjectDynamic; + second: ObjectDynamic | null; + }): Promise; + coalesce(p: { + first: ObjectDynamic | null; + second: ObjectDynamic | null; + third?: ObjectDynamic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericAlias.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericAlias.ts new file mode 100644 index 0000000000..4b23aac0cd --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericAlias.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_application_llama_ObjectGenericAlias = + _test_llm_application({ + model: "llama", + name: "ObjectGenericAlias", + })(typia.llm.application()); + +interface ObjectGenericAliasApplication { + insert(p: { first: ObjectGenericAlias }): Promise; + reduce(p: { + first: ObjectGenericAlias; + second: ObjectGenericAlias | null; + }): Promise; + coalesce(p: { + first: ObjectGenericAlias | null; + second: ObjectGenericAlias | null; + third?: ObjectGenericAlias | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericArray.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericArray.ts new file mode 100644 index 0000000000..5f8fd31459 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericArray.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_application_llama_ObjectGenericArray = + _test_llm_application({ + model: "llama", + name: "ObjectGenericArray", + })(typia.llm.application()); + +interface ObjectGenericArrayApplication { + insert(p: { first: ObjectGenericArray }): Promise; + reduce(p: { + first: ObjectGenericArray; + second: ObjectGenericArray | null; + }): Promise; + coalesce(p: { + first: ObjectGenericArray | null; + second: ObjectGenericArray | null; + third?: ObjectGenericArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericUnion.ts new file mode 100644 index 0000000000..0835349be9 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectGenericUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_application_llama_ObjectGenericUnion = + _test_llm_application({ + model: "llama", + name: "ObjectGenericUnion", + })(typia.llm.application()); + +interface ObjectGenericUnionApplication { + insert(p: { first: ObjectGenericUnion }): Promise; + reduce(p: { + first: ObjectGenericUnion; + second: ObjectGenericUnion | null; + }): Promise; + coalesce(p: { + first: ObjectGenericUnion | null; + second: ObjectGenericUnion | null; + third?: ObjectGenericUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectInternal.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectInternal.ts new file mode 100644 index 0000000000..8edef6ca04 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectInternal.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_application_llama_ObjectInternal = _test_llm_application({ + model: "llama", + name: "ObjectInternal", +})(typia.llm.application()); + +interface ObjectInternalApplication { + insert(p: { first: ObjectInternal }): Promise; + reduce(p: { + first: ObjectInternal; + second: ObjectInternal | null; + }): Promise; + coalesce(p: { + first: ObjectInternal | null; + second: ObjectInternal | null; + third?: ObjectInternal | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectIntersection.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectIntersection.ts new file mode 100644 index 0000000000..c3856f2ee4 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectIntersection.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_application_llama_ObjectIntersection = + _test_llm_application({ + model: "llama", + name: "ObjectIntersection", + })(typia.llm.application()); + +interface ObjectIntersectionApplication { + insert(p: { first: ObjectIntersection }): Promise; + reduce(p: { + first: ObjectIntersection; + second: ObjectIntersection | null; + }): Promise; + coalesce(p: { + first: ObjectIntersection | null; + second: ObjectIntersection | null; + third?: ObjectIntersection | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectJsonTag.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectJsonTag.ts new file mode 100644 index 0000000000..4f6d517957 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectJsonTag.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_application_llama_ObjectJsonTag = _test_llm_application({ + model: "llama", + name: "ObjectJsonTag", +})(typia.llm.application()); + +interface ObjectJsonTagApplication { + insert(p: { first: ObjectJsonTag }): Promise; + reduce(p: { + first: ObjectJsonTag; + second: ObjectJsonTag | null; + }): Promise; + coalesce(p: { + first: ObjectJsonTag | null; + second: ObjectJsonTag | null; + third?: ObjectJsonTag | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectLiteralProperty.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..1b6bacf74d --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectLiteralProperty.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_application_llama_ObjectLiteralProperty = + _test_llm_application({ + model: "llama", + name: "ObjectLiteralProperty", + })(typia.llm.application()); + +interface ObjectLiteralPropertyApplication { + insert(p: { first: ObjectLiteralProperty }): Promise; + reduce(p: { + first: ObjectLiteralProperty; + second: ObjectLiteralProperty | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralProperty | null; + second: ObjectLiteralProperty | null; + third?: ObjectLiteralProperty | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectLiteralType.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectLiteralType.ts new file mode 100644 index 0000000000..c433515390 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectLiteralType.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_application_llama_ObjectLiteralType = + _test_llm_application({ + model: "llama", + name: "ObjectLiteralType", + })(typia.llm.application()); + +interface ObjectLiteralTypeApplication { + insert(p: { first: ObjectLiteralType }): Promise; + reduce(p: { + first: ObjectLiteralType; + second: ObjectLiteralType | null; + }): Promise; + coalesce(p: { + first: ObjectLiteralType | null; + second: ObjectLiteralType | null; + third?: ObjectLiteralType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectNullable.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectNullable.ts new file mode 100644 index 0000000000..4ed7e1342f --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectNullable.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_application_llama_ObjectNullable = _test_llm_application({ + model: "llama", + name: "ObjectNullable", +})(typia.llm.application()); + +interface ObjectNullableApplication { + insert(p: { first: ObjectNullable }): Promise; + reduce(p: { + first: ObjectNullable; + second: ObjectNullable | null; + }): Promise; + coalesce(p: { + first: ObjectNullable | null; + second: ObjectNullable | null; + third?: ObjectNullable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectOptional.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectOptional.ts new file mode 100644 index 0000000000..b5097c9a8a --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectOptional.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_application_llama_ObjectOptional = _test_llm_application({ + model: "llama", + name: "ObjectOptional", +})(typia.llm.application()); + +interface ObjectOptionalApplication { + insert(p: { first: ObjectOptional }): Promise; + reduce(p: { + first: ObjectOptional; + second: ObjectOptional | null; + }): Promise; + coalesce(p: { + first: ObjectOptional | null; + second: ObjectOptional | null; + third?: ObjectOptional | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPartial.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPartial.ts new file mode 100644 index 0000000000..54157ae609 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPartial.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_application_llama_ObjectPartial = _test_llm_application({ + model: "llama", + name: "ObjectPartial", +})(typia.llm.application()); + +interface ObjectPartialApplication { + insert(p: { first: ObjectPartial }): Promise; + reduce(p: { + first: ObjectPartial; + second: ObjectPartial | null; + }): Promise; + coalesce(p: { + first: ObjectPartial | null; + second: ObjectPartial | null; + third?: ObjectPartial | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPartialAndRequired.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..a9e70c7759 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPartialAndRequired.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_application_llama_ObjectPartialAndRequired = + _test_llm_application({ + model: "llama", + name: "ObjectPartialAndRequired", + })(typia.llm.application()); + +interface ObjectPartialAndRequiredApplication { + insert(p: { first: ObjectPartialAndRequired }): Promise; + reduce(p: { + first: ObjectPartialAndRequired; + second: ObjectPartialAndRequired | null; + }): Promise; + coalesce(p: { + first: ObjectPartialAndRequired | null; + second: ObjectPartialAndRequired | null; + third?: ObjectPartialAndRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPrimitive.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPrimitive.ts new file mode 100644 index 0000000000..928e51b5cf --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectPrimitive.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_application_llama_ObjectPrimitive = _test_llm_application( + { + model: "llama", + name: "ObjectPrimitive", + }, +)(typia.llm.application()); + +interface ObjectPrimitiveApplication { + insert(p: { first: ObjectPrimitive }): Promise; + reduce(p: { + first: ObjectPrimitive; + second: ObjectPrimitive | null; + }): Promise; + coalesce(p: { + first: ObjectPrimitive | null; + second: ObjectPrimitive | null; + third?: ObjectPrimitive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectRecursive.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectRecursive.ts new file mode 100644 index 0000000000..dde938333e --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectRecursive.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_application_llama_ObjectRecursive = _test_llm_application( + { + model: "llama", + name: "ObjectRecursive", + }, +)(typia.llm.application()); + +interface ObjectRecursiveApplication { + insert(p: { first: ObjectRecursive }): Promise; + reduce(p: { + first: ObjectRecursive; + second: ObjectRecursive | null; + }): Promise; + coalesce(p: { + first: ObjectRecursive | null; + second: ObjectRecursive | null; + third?: ObjectRecursive | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectRequired.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectRequired.ts new file mode 100644 index 0000000000..2329618f53 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectRequired.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_application_llama_ObjectRequired = _test_llm_application({ + model: "llama", + name: "ObjectRequired", +})(typia.llm.application()); + +interface ObjectRequiredApplication { + insert(p: { first: ObjectRequired }): Promise; + reduce(p: { + first: ObjectRequired; + second: ObjectRequired | null; + }): Promise; + coalesce(p: { + first: ObjectRequired | null; + second: ObjectRequired | null; + third?: ObjectRequired | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectSimple.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectSimple.ts new file mode 100644 index 0000000000..3b243614e0 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectSimple.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_application_llama_ObjectSimple = _test_llm_application({ + model: "llama", + name: "ObjectSimple", +})(typia.llm.application()); + +interface ObjectSimpleApplication { + insert(p: { first: ObjectSimple }): Promise; + reduce(p: { + first: ObjectSimple; + second: ObjectSimple | null; + }): Promise; + coalesce(p: { + first: ObjectSimple | null; + second: ObjectSimple | null; + third?: ObjectSimple | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUndefined.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUndefined.ts new file mode 100644 index 0000000000..2d7c85747a --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUndefined.ts @@ -0,0 +1,24 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_application_llama_ObjectUndefined = _test_llm_application( + { + model: "llama", + name: "ObjectUndefined", + }, +)(typia.llm.application()); + +interface ObjectUndefinedApplication { + insert(p: { first: ObjectUndefined }): Promise; + reduce(p: { + first: ObjectUndefined; + second: ObjectUndefined | null; + }): Promise; + coalesce(p: { + first: ObjectUndefined | null; + second: ObjectUndefined | null; + third?: ObjectUndefined | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionComposite.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionComposite.ts new file mode 100644 index 0000000000..59e11f5557 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionComposite.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_application_llama_ObjectUnionComposite = + _test_llm_application({ + model: "llama", + name: "ObjectUnionComposite", + })(typia.llm.application()); + +interface ObjectUnionCompositeApplication { + insert(p: { first: ObjectUnionComposite }): Promise; + reduce(p: { + first: ObjectUnionComposite; + second: ObjectUnionComposite | null; + }): Promise; + coalesce(p: { + first: ObjectUnionComposite | null; + second: ObjectUnionComposite | null; + third?: ObjectUnionComposite | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionCompositePointer.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..bb915935f7 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionCompositePointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_application_llama_ObjectUnionCompositePointer = + _test_llm_application({ + model: "llama", + name: "ObjectUnionCompositePointer", + })(typia.llm.application()); + +interface ObjectUnionCompositePointerApplication { + insert(p: { first: ObjectUnionCompositePointer }): Promise; + reduce(p: { + first: ObjectUnionCompositePointer; + second: ObjectUnionCompositePointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionCompositePointer | null; + second: ObjectUnionCompositePointer | null; + third?: ObjectUnionCompositePointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionDouble.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionDouble.ts new file mode 100644 index 0000000000..8ae0eac654 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionDouble.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_application_llama_ObjectUnionDouble = + _test_llm_application({ + model: "llama", + name: "ObjectUnionDouble", + })(typia.llm.application()); + +interface ObjectUnionDoubleApplication { + insert(p: { first: ObjectUnionDouble }): Promise; + reduce(p: { + first: ObjectUnionDouble; + second: ObjectUnionDouble | null; + }): Promise; + coalesce(p: { + first: ObjectUnionDouble | null; + second: ObjectUnionDouble | null; + third?: ObjectUnionDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionExplicit.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..9d897a0ace --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionExplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_application_llama_ObjectUnionExplicit = + _test_llm_application({ + model: "llama", + name: "ObjectUnionExplicit", + })(typia.llm.application()); + +interface ObjectUnionExplicitApplication { + insert(p: { first: ObjectUnionExplicit }): Promise; + reduce(p: { + first: ObjectUnionExplicit; + second: ObjectUnionExplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicit | null; + second: ObjectUnionExplicit | null; + third?: ObjectUnionExplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionExplicitPointer.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..cde96f6bc0 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_application_llama_ObjectUnionExplicitPointer = + _test_llm_application({ + model: "llama", + name: "ObjectUnionExplicitPointer", + })(typia.llm.application()); + +interface ObjectUnionExplicitPointerApplication { + insert(p: { first: ObjectUnionExplicitPointer }): Promise; + reduce(p: { + first: ObjectUnionExplicitPointer; + second: ObjectUnionExplicitPointer | null; + }): Promise; + coalesce(p: { + first: ObjectUnionExplicitPointer | null; + second: ObjectUnionExplicitPointer | null; + third?: ObjectUnionExplicitPointer | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionImplicit.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..5371e2b2a8 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionImplicit.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_application_llama_ObjectUnionImplicit = + _test_llm_application({ + model: "llama", + name: "ObjectUnionImplicit", + })(typia.llm.application()); + +interface ObjectUnionImplicitApplication { + insert(p: { first: ObjectUnionImplicit }): Promise; + reduce(p: { + first: ObjectUnionImplicit; + second: ObjectUnionImplicit | null; + }): Promise; + coalesce(p: { + first: ObjectUnionImplicit | null; + second: ObjectUnionImplicit | null; + third?: ObjectUnionImplicit | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionNonPredictable.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..dd4c3f7093 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ObjectUnionNonPredictable.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_application_llama_ObjectUnionNonPredictable = + _test_llm_application({ + model: "llama", + name: "ObjectUnionNonPredictable", + })(typia.llm.application()); + +interface ObjectUnionNonPredictableApplication { + insert(p: { first: ObjectUnionNonPredictable }): Promise; + reduce(p: { + first: ObjectUnionNonPredictable; + second: ObjectUnionNonPredictable | null; + }): Promise; + coalesce(p: { + first: ObjectUnionNonPredictable | null; + second: ObjectUnionNonPredictable | null; + third?: ObjectUnionNonPredictable | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TemplateAtomic.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TemplateAtomic.ts new file mode 100644 index 0000000000..b8fefc1f52 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TemplateAtomic.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_application_llama_TemplateAtomic = _test_llm_application({ + model: "llama", + name: "TemplateAtomic", +})(typia.llm.application()); + +interface TemplateAtomicApplication { + insert(p: { first: TemplateAtomic }): Promise; + reduce(p: { + first: TemplateAtomic; + second: TemplateAtomic | null; + }): Promise; + coalesce(p: { + first: TemplateAtomic | null; + second: TemplateAtomic | null; + third?: TemplateAtomic | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TemplateConstant.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TemplateConstant.ts new file mode 100644 index 0000000000..65047a3244 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TemplateConstant.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_application_llama_TemplateConstant = + _test_llm_application({ + model: "llama", + name: "TemplateConstant", + })(typia.llm.application()); + +interface TemplateConstantApplication { + insert(p: { first: TemplateConstant }): Promise; + reduce(p: { + first: TemplateConstant; + second: TemplateConstant | null; + }): Promise; + coalesce(p: { + first: TemplateConstant | null; + second: TemplateConstant | null; + third?: TemplateConstant | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TemplateUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TemplateUnion.ts new file mode 100644 index 0000000000..f0e835a319 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TemplateUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_application_llama_TemplateUnion = _test_llm_application({ + model: "llama", + name: "TemplateUnion", +})(typia.llm.application()); + +interface TemplateUnionApplication { + insert(p: { first: TemplateUnion }): Promise; + reduce(p: { + first: TemplateUnion; + second: TemplateUnion | null; + }): Promise; + coalesce(p: { + first: TemplateUnion | null; + second: TemplateUnion | null; + third?: TemplateUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonAtomicUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..252e117cf3 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_application_llama_ToJsonAtomicUnion = + _test_llm_application({ + model: "llama", + name: "ToJsonAtomicUnion", + })(typia.llm.application()); + +interface ToJsonAtomicUnionApplication { + insert(p: { first: ToJsonAtomicUnion }): Promise; + reduce(p: { + first: ToJsonAtomicUnion; + second: ToJsonAtomicUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonAtomicUnion | null; + second: ToJsonAtomicUnion | null; + third?: ToJsonAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonDouble.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonDouble.ts new file mode 100644 index 0000000000..7f86c5a340 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonDouble.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_application_llama_ToJsonDouble = _test_llm_application({ + model: "llama", + name: "ToJsonDouble", +})(typia.llm.application()); + +interface ToJsonDoubleApplication { + insert(p: { first: ToJsonDouble }): Promise; + reduce(p: { + first: ToJsonDouble; + second: ToJsonDouble | null; + }): Promise; + coalesce(p: { + first: ToJsonDouble | null; + second: ToJsonDouble | null; + third?: ToJsonDouble | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonNull.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonNull.ts new file mode 100644 index 0000000000..515d1aeb1f --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonNull.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_application_llama_ToJsonNull = _test_llm_application({ + model: "llama", + name: "ToJsonNull", +})(typia.llm.application()); + +interface ToJsonNullApplication { + insert(p: { first: ToJsonNull }): Promise; + reduce(p: { + first: ToJsonNull; + second: ToJsonNull | null; + }): Promise; + coalesce(p: { + first: ToJsonNull | null; + second: ToJsonNull | null; + third?: ToJsonNull | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonUnion.ts new file mode 100644 index 0000000000..ed80b2b383 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_ToJsonUnion.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_application_llama_ToJsonUnion = _test_llm_application({ + model: "llama", + name: "ToJsonUnion", +})(typia.llm.application()); + +interface ToJsonUnionApplication { + insert(p: { first: ToJsonUnion }): Promise; + reduce(p: { + first: ToJsonUnion; + second: ToJsonUnion | null; + }): Promise; + coalesce(p: { + first: ToJsonUnion | null; + second: ToJsonUnion | null; + third?: ToJsonUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagArray.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagArray.ts new file mode 100644 index 0000000000..6b3638b3ee --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagArray.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_application_llama_TypeTagArray = _test_llm_application({ + model: "llama", + name: "TypeTagArray", +})(typia.llm.application()); + +interface TypeTagArrayApplication { + insert(p: { first: TypeTagArray }): Promise; + reduce(p: { + first: TypeTagArray; + second: TypeTagArray | null; + }): Promise; + coalesce(p: { + first: TypeTagArray | null; + second: TypeTagArray | null; + third?: TypeTagArray | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagArrayUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..e81844c99c --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagArrayUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_application_llama_TypeTagArrayUnion = + _test_llm_application({ + model: "llama", + name: "TypeTagArrayUnion", + })(typia.llm.application()); + +interface TypeTagArrayUnionApplication { + insert(p: { first: TypeTagArrayUnion }): Promise; + reduce(p: { + first: TypeTagArrayUnion; + second: TypeTagArrayUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagArrayUnion | null; + second: TypeTagArrayUnion | null; + third?: TypeTagArrayUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagAtomicUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..bbc5f46482 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagAtomicUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_application_llama_TypeTagAtomicUnion = + _test_llm_application({ + model: "llama", + name: "TypeTagAtomicUnion", + })(typia.llm.application()); + +interface TypeTagAtomicUnionApplication { + insert(p: { first: TypeTagAtomicUnion }): Promise; + reduce(p: { + first: TypeTagAtomicUnion; + second: TypeTagAtomicUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagAtomicUnion | null; + second: TypeTagAtomicUnion | null; + third?: TypeTagAtomicUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagCustom.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagCustom.ts new file mode 100644 index 0000000000..06393ab523 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagCustom.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_application_llama_TypeTagCustom = _test_llm_application({ + model: "llama", + name: "TypeTagCustom", +})(typia.llm.application()); + +interface TypeTagCustomApplication { + insert(p: { first: TypeTagCustom }): Promise; + reduce(p: { + first: TypeTagCustom; + second: TypeTagCustom | null; + }): Promise; + coalesce(p: { + first: TypeTagCustom | null; + second: TypeTagCustom | null; + third?: TypeTagCustom | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagDefault.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagDefault.ts new file mode 100644 index 0000000000..f5dd9db2ca --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagDefault.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_application_llama_TypeTagDefault = _test_llm_application({ + model: "llama", + name: "TypeTagDefault", +})(typia.llm.application()); + +interface TypeTagDefaultApplication { + insert(p: { first: TypeTagDefault }): Promise; + reduce(p: { + first: TypeTagDefault; + second: TypeTagDefault | null; + }): Promise; + coalesce(p: { + first: TypeTagDefault | null; + second: TypeTagDefault | null; + third?: TypeTagDefault | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagFormat.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagFormat.ts new file mode 100644 index 0000000000..24b3e728a4 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagFormat.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_application_llama_TypeTagFormat = _test_llm_application({ + model: "llama", + name: "TypeTagFormat", +})(typia.llm.application()); + +interface TypeTagFormatApplication { + insert(p: { first: TypeTagFormat }): Promise; + reduce(p: { + first: TypeTagFormat; + second: TypeTagFormat | null; + }): Promise; + coalesce(p: { + first: TypeTagFormat | null; + second: TypeTagFormat | null; + third?: TypeTagFormat | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagLength.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagLength.ts new file mode 100644 index 0000000000..32ee53a5e2 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagLength.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_application_llama_TypeTagLength = _test_llm_application({ + model: "llama", + name: "TypeTagLength", +})(typia.llm.application()); + +interface TypeTagLengthApplication { + insert(p: { first: TypeTagLength }): Promise; + reduce(p: { + first: TypeTagLength; + second: TypeTagLength | null; + }): Promise; + coalesce(p: { + first: TypeTagLength | null; + second: TypeTagLength | null; + third?: TypeTagLength | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagMatrix.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagMatrix.ts new file mode 100644 index 0000000000..72606f56ce --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagMatrix.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_application_llama_TypeTagMatrix = _test_llm_application({ + model: "llama", + name: "TypeTagMatrix", +})(typia.llm.application()); + +interface TypeTagMatrixApplication { + insert(p: { first: TypeTagMatrix }): Promise; + reduce(p: { + first: TypeTagMatrix; + second: TypeTagMatrix | null; + }): Promise; + coalesce(p: { + first: TypeTagMatrix | null; + second: TypeTagMatrix | null; + third?: TypeTagMatrix | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagObjectUnion.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..c268ce1edb --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagObjectUnion.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_application_llama_TypeTagObjectUnion = + _test_llm_application({ + model: "llama", + name: "TypeTagObjectUnion", + })(typia.llm.application()); + +interface TypeTagObjectUnionApplication { + insert(p: { first: TypeTagObjectUnion }): Promise; + reduce(p: { + first: TypeTagObjectUnion; + second: TypeTagObjectUnion | null; + }): Promise; + coalesce(p: { + first: TypeTagObjectUnion | null; + second: TypeTagObjectUnion | null; + third?: TypeTagObjectUnion | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagPattern.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagPattern.ts new file mode 100644 index 0000000000..b76eb44b1a --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagPattern.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_application_llama_TypeTagPattern = _test_llm_application({ + model: "llama", + name: "TypeTagPattern", +})(typia.llm.application()); + +interface TypeTagPatternApplication { + insert(p: { first: TypeTagPattern }): Promise; + reduce(p: { + first: TypeTagPattern; + second: TypeTagPattern | null; + }): Promise; + coalesce(p: { + first: TypeTagPattern | null; + second: TypeTagPattern | null; + third?: TypeTagPattern | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagRange.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagRange.ts new file mode 100644 index 0000000000..5ef08baa0c --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagRange.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_application_llama_TypeTagRange = _test_llm_application({ + model: "llama", + name: "TypeTagRange", +})(typia.llm.application()); + +interface TypeTagRangeApplication { + insert(p: { first: TypeTagRange }): Promise; + reduce(p: { + first: TypeTagRange; + second: TypeTagRange | null; + }): Promise; + coalesce(p: { + first: TypeTagRange | null; + second: TypeTagRange | null; + third?: TypeTagRange | null; + }): Promise; +} diff --git a/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagType.ts b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagType.ts new file mode 100644 index 0000000000..408a76f5f3 --- /dev/null +++ b/test/src/features/llm.application/llama/test_llm_application_llama_TypeTagType.ts @@ -0,0 +1,22 @@ +import typia from "typia"; + +import { _test_llm_application } from "../../../internal/_test_llm_application"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_application_llama_TypeTagType = _test_llm_application({ + model: "llama", + name: "TypeTagType", +})(typia.llm.application()); + +interface TypeTagTypeApplication { + insert(p: { first: TypeTagType }): Promise; + reduce(p: { + first: TypeTagType; + second: TypeTagType | null; + }): Promise; + coalesce(p: { + first: TypeTagType | null; + second: TypeTagType | null; + third?: TypeTagType | null; + }): Promise; +} diff --git a/test/src/features/llm.application/test_llm_application.ts b/test/src/features/llm.application/test_llm_application.ts deleted file mode 100644 index f41757edfa..0000000000 --- a/test/src/features/llm.application/test_llm_application.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { ILlmApplication } from "@samchon/openapi"; -import typia from "typia"; - -import { TestValidator } from "../../helpers/TestValidator"; - -export const test_llm_application = (): void => { - const app: ILlmApplication = typia.llm.application(); - TestValidator.equals("application")(app)({ - functions: [ - { - name: "getId", - parameters: [], - output: { - type: "string", - }, - description: "Get ID.", - deprecated: true, - }, - { - name: "getValue", - parameters: [ - { - type: "number", - description: "The value x", - }, - { - type: "number", - title: "The value y", - description: "The value y.\n\nThe value to be added.", - }, - ], - output: { - type: "number", - title: "Sum of them", - description: "Sum of them.\n\n`this.value + x + y`", - }, - description: - "Get value.\n\nGet value with plus operation of member value, x and y.", - tags: ["mathmatics", "arithmetic"], - }, - { - name: "getPerformance", - parameters: [], - output: { - type: "object", - properties: { - level: { - type: "number", - title: "Level value", - description: "Level value.", - }, - }, - nullable: false, - required: ["level"], - additionalProperties: false, - description: "The performance interface.", - }, - description: "Get performance.", - tags: ["monitor"], - }, - { - name: "synchronize", - parameters: [ - { - type: "boolean", - title: "Flag for synchronization", - description: "Flag for synchronization.", - }, - ], - output: { - type: "boolean", - }, - description: "Synchornize with server.", - }, - ], - options: { - separate: null, - recursive: 3, - }, - }); -}; - -class SomeClass { - id: string = "id"; - value: number = 0; - - /** - * Get ID. - * - * @deprecated - */ - getId = (): string => { - return this.id; - }; - - /** - * Get value. - * - * Get value with plus operation of member value, x and y. - * - * @param x The value x - * @param y The value y. - * - * The value to be added. - * @returns Sum of them. - * - * `this.value + x + y` - * @tag mathmatics - * @tag arithmetic - */ - getValue(x: number, y: number): number { - return this.value + x + y; - } - - /** - * Get performance. - * - * @tag monitor tool - */ - async getPerformance(): Promise { - return { level: 3 }; - } - - /** - * Synchornize with server. - */ - async synchronize( - /** - * Flag for synchronization. - */ - flag: boolean, - ): Promise { - return flag && true; - } -} - -/** - * The performance interface. - */ -interface IPerformance { - /** - * Level value. - */ - level: number; -} diff --git a/test/src/features/llm.application/test_llm_application_separate.ts b/test/src/features/llm.application/test_llm_application_separate.ts deleted file mode 100644 index 04bd303b18..0000000000 --- a/test/src/features/llm.application/test_llm_application_separate.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { ILlmApplication, LlmTypeChecker } from "@samchon/openapi"; -import { ILlmFunction } from "@samchon/openapi/lib/structures/ILlmFunction"; -import typia, { tags } from "typia"; - -import { TestValidator } from "../../helpers/TestValidator"; - -export const test_llm_application_separate = (): void => { - const app: ILlmApplication = typia.llm.application({ - separate: (schema) => - LlmTypeChecker.isString(schema) && schema.contentMediaType !== undefined, - }); - const func: ILlmFunction = app.functions[0]!; - TestValidator.equals("separated.human")(func.separated?.human)([ - { - index: 0, - schema: { - type: "object", - properties: { - file: { - type: "string", - format: "uri", - contentMediaType: "*/*", - }, - }, - additionalProperties: false, - nullable: false, - required: ["file"], - }, - }, - ]); - TestValidator.equals("separated.llm")(func.separated?.llm)([ - { - index: 0, - schema: { - type: "object", - properties: { - title: { - type: "string", - }, - body: { - type: "string", - }, - }, - additionalProperties: false, - nullable: false, - required: ["title", "body"], - }, - }, - ]); -}; - -interface IBbsArticle extends IBbsArticle.ICreate { - id: string & tags.Format<"uuid">; - created_at: string & tags.Format<"date-time">; -} -namespace IBbsArticle { - export interface ICreate { - title: string; - body: string; - file: string & tags.Format<"uri"> & tags.ContentMediaType<"*/*">; - } -} - -interface BbsArticleApplication { - create(input: IBbsArticle.ICreate): Promise; -} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayAny.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayAny.ts new file mode 100644 index 0000000000..50618128aa --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayAny.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_parameters_3_0_ArrayAny = _test_llm_parameters({ + model: "3.0", + name: "ArrayAny", +})(typia.llm.parameters()); + +interface ArrayAnyParameters { + regular: ArrayAny; + nullable: ArrayAny | null; + optional: ArrayAny | undefined; + faint: ArrayAny | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayHierarchical.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayHierarchical.ts new file mode 100644 index 0000000000..b5f167212a --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayHierarchical.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_parameters_3_0_ArrayHierarchical = _test_llm_parameters({ + model: "3.0", + name: "ArrayHierarchical", +})(typia.llm.parameters()); + +interface ArrayHierarchicalParameters { + regular: ArrayHierarchical; + nullable: ArrayHierarchical | null; + optional: ArrayHierarchical | undefined; + faint: ArrayHierarchical | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayHierarchicalPointer.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..6aa41d095c --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayHierarchicalPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_parameters_3_0_ArrayHierarchicalPointer = + _test_llm_parameters({ + model: "3.0", + name: "ArrayHierarchicalPointer", + })(typia.llm.parameters()); + +interface ArrayHierarchicalPointerParameters { + regular: ArrayHierarchicalPointer; + nullable: ArrayHierarchicalPointer | null; + optional: ArrayHierarchicalPointer | undefined; + faint: ArrayHierarchicalPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayMatrix.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayMatrix.ts new file mode 100644 index 0000000000..ea55d5d971 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_parameters_3_0_ArrayMatrix = _test_llm_parameters({ + model: "3.0", + name: "ArrayMatrix", +})(typia.llm.parameters()); + +interface ArrayMatrixParameters { + regular: ArrayMatrix; + nullable: ArrayMatrix | null; + optional: ArrayMatrix | undefined; + faint: ArrayMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursive.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursive.ts new file mode 100644 index 0000000000..fc8b1898c5 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_parameters_3_0_ArrayRecursive = _test_llm_parameters({ + model: "3.0", + name: "ArrayRecursive", +})(typia.llm.parameters()); + +interface ArrayRecursiveParameters { + regular: ArrayRecursive; + nullable: ArrayRecursive | null; + optional: ArrayRecursive | undefined; + faint: ArrayRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..e46d228063 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_parameters_3_0_ArrayRecursiveUnionExplicit = + _test_llm_parameters({ + model: "3.0", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionExplicitParameters { + regular: ArrayRecursiveUnionExplicit; + nullable: ArrayRecursiveUnionExplicit | null; + optional: ArrayRecursiveUnionExplicit | undefined; + faint: ArrayRecursiveUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..5a8c83583c --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,20 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_parameters_3_0_ArrayRecursiveUnionExplicitPointer = + _test_llm_parameters({ + model: "3.0", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.parameters(), + ); + +interface ArrayRecursiveUnionExplicitPointerParameters { + regular: ArrayRecursiveUnionExplicitPointer; + nullable: ArrayRecursiveUnionExplicitPointer | null; + optional: ArrayRecursiveUnionExplicitPointer | undefined; + faint: ArrayRecursiveUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..7df4085c91 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_parameters_3_0_ArrayRecursiveUnionImplicit = + _test_llm_parameters({ + model: "3.0", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionImplicitParameters { + regular: ArrayRecursiveUnionImplicit; + nullable: ArrayRecursiveUnionImplicit | null; + optional: ArrayRecursiveUnionImplicit | undefined; + faint: ArrayRecursiveUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedNullable.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..f0c761d36e --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedNullable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_parameters_3_0_ArrayRepeatedNullable = + _test_llm_parameters({ + model: "3.0", + name: "ArrayRepeatedNullable", + })(typia.llm.parameters()); + +interface ArrayRepeatedNullableParameters { + regular: ArrayRepeatedNullable; + nullable: ArrayRepeatedNullable | null; + optional: ArrayRepeatedNullable | undefined; + faint: ArrayRepeatedNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedRequired.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..0d3068e951 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_parameters_3_0_ArrayRepeatedRequired = + _test_llm_parameters({ + model: "3.0", + name: "ArrayRepeatedRequired", + })(typia.llm.parameters()); + +interface ArrayRepeatedRequiredParameters { + regular: ArrayRepeatedRequired; + nullable: ArrayRepeatedRequired | null; + optional: ArrayRepeatedRequired | undefined; + faint: ArrayRepeatedRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..f61aea077a --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayRepeatedUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_parameters_3_0_ArrayRepeatedUnion = _test_llm_parameters({ + model: "3.0", + name: "ArrayRepeatedUnion", +})(typia.llm.parameters()); + +interface ArrayRepeatedUnionParameters { + regular: ArrayRepeatedUnion; + nullable: ArrayRepeatedUnion | null; + optional: ArrayRepeatedUnion | undefined; + faint: ArrayRepeatedUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArraySimple.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArraySimple.ts new file mode 100644 index 0000000000..6e89f74f68 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArraySimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_parameters_3_0_ArraySimple = _test_llm_parameters({ + model: "3.0", + name: "ArraySimple", +})(typia.llm.parameters()); + +interface ArraySimpleParameters { + regular: ArraySimple; + nullable: ArraySimple | null; + optional: ArraySimple | undefined; + faint: ArraySimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayUnion.ts new file mode 100644 index 0000000000..2fa9aa5bd5 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_parameters_3_0_ArrayUnion = _test_llm_parameters({ + model: "3.0", + name: "ArrayUnion", +})(typia.llm.parameters()); + +interface ArrayUnionParameters { + regular: ArrayUnion; + nullable: ArrayUnion | null; + optional: ArrayUnion | undefined; + faint: ArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_AtomicUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_AtomicUnion.ts new file mode 100644 index 0000000000..b991575c02 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_AtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_parameters_3_0_AtomicUnion = _test_llm_parameters({ + model: "3.0", + name: "AtomicUnion", +})(typia.llm.parameters()); + +interface AtomicUnionParameters { + regular: AtomicUnion; + nullable: AtomicUnion | null; + optional: AtomicUnion | undefined; + faint: AtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassGetter.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassGetter.ts new file mode 100644 index 0000000000..0b4e77c75d --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassGetter.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_parameters_3_0_ClassGetter = _test_llm_parameters({ + model: "3.0", + name: "ClassGetter", +})(typia.llm.parameters()); + +interface ClassGetterParameters { + regular: ClassGetter; + nullable: ClassGetter | null; + optional: ClassGetter | undefined; + faint: ClassGetter | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassMethod.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassMethod.ts new file mode 100644 index 0000000000..b375dbdb39 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassMethod.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_parameters_3_0_ClassMethod = _test_llm_parameters({ + model: "3.0", + name: "ClassMethod", +})(typia.llm.parameters()); + +interface ClassMethodParameters { + regular: ClassMethod; + nullable: ClassMethod | null; + optional: ClassMethod | undefined; + faint: ClassMethod | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassPropertyAssignment.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..25a2ac1a88 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ClassPropertyAssignment.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_parameters_3_0_ClassPropertyAssignment = + _test_llm_parameters({ + model: "3.0", + name: "ClassPropertyAssignment", + })(typia.llm.parameters()); + +interface ClassPropertyAssignmentParameters { + regular: ClassPropertyAssignment; + nullable: ClassPropertyAssignment | null; + optional: ClassPropertyAssignment | undefined; + faint: ClassPropertyAssignment | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagArray.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagArray.ts new file mode 100644 index 0000000000..c7098cd4e9 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_parameters_3_0_CommentTagArray = _test_llm_parameters({ + model: "3.0", + name: "CommentTagArray", +})(typia.llm.parameters()); + +interface CommentTagArrayParameters { + regular: CommentTagArray; + nullable: CommentTagArray | null; + optional: CommentTagArray | undefined; + faint: CommentTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagArrayUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..56cb451685 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_parameters_3_0_CommentTagArrayUnion = + _test_llm_parameters({ + model: "3.0", + name: "CommentTagArrayUnion", + })(typia.llm.parameters()); + +interface CommentTagArrayUnionParameters { + regular: CommentTagArrayUnion; + nullable: CommentTagArrayUnion | null; + optional: CommentTagArrayUnion | undefined; + faint: CommentTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagAtomicUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..00674398d3 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_parameters_3_0_CommentTagAtomicUnion = + _test_llm_parameters({ + model: "3.0", + name: "CommentTagAtomicUnion", + })(typia.llm.parameters()); + +interface CommentTagAtomicUnionParameters { + regular: CommentTagAtomicUnion; + nullable: CommentTagAtomicUnion | null; + optional: CommentTagAtomicUnion | undefined; + faint: CommentTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagDefault.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagDefault.ts new file mode 100644 index 0000000000..77faae789f --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_parameters_3_0_CommentTagDefault = _test_llm_parameters({ + model: "3.0", + name: "CommentTagDefault", +})(typia.llm.parameters()); + +interface CommentTagDefaultParameters { + regular: CommentTagDefault; + nullable: CommentTagDefault | null; + optional: CommentTagDefault | undefined; + faint: CommentTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagFormat.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagFormat.ts new file mode 100644 index 0000000000..3862f912e4 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_parameters_3_0_CommentTagFormat = _test_llm_parameters({ + model: "3.0", + name: "CommentTagFormat", +})(typia.llm.parameters()); + +interface CommentTagFormatParameters { + regular: CommentTagFormat; + nullable: CommentTagFormat | null; + optional: CommentTagFormat | undefined; + faint: CommentTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagLength.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagLength.ts new file mode 100644 index 0000000000..68992f5ae6 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_parameters_3_0_CommentTagLength = _test_llm_parameters({ + model: "3.0", + name: "CommentTagLength", +})(typia.llm.parameters()); + +interface CommentTagLengthParameters { + regular: CommentTagLength; + nullable: CommentTagLength | null; + optional: CommentTagLength | undefined; + faint: CommentTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagObjectUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..72d972e95c --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_parameters_3_0_CommentTagObjectUnion = + _test_llm_parameters({ + model: "3.0", + name: "CommentTagObjectUnion", + })(typia.llm.parameters()); + +interface CommentTagObjectUnionParameters { + regular: CommentTagObjectUnion; + nullable: CommentTagObjectUnion | null; + optional: CommentTagObjectUnion | undefined; + faint: CommentTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagPattern.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagPattern.ts new file mode 100644 index 0000000000..04202fad59 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_parameters_3_0_CommentTagPattern = _test_llm_parameters({ + model: "3.0", + name: "CommentTagPattern", +})(typia.llm.parameters()); + +interface CommentTagPatternParameters { + regular: CommentTagPattern; + nullable: CommentTagPattern | null; + optional: CommentTagPattern | undefined; + faint: CommentTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagRange.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagRange.ts new file mode 100644 index 0000000000..08f52f7faa --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_parameters_3_0_CommentTagRange = _test_llm_parameters({ + model: "3.0", + name: "CommentTagRange", +})(typia.llm.parameters()); + +interface CommentTagRangeParameters { + regular: CommentTagRange; + nullable: CommentTagRange | null; + optional: CommentTagRange | undefined; + faint: CommentTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagType.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagType.ts new file mode 100644 index 0000000000..3a957eaa11 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_CommentTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_parameters_3_0_CommentTagType = _test_llm_parameters({ + model: "3.0", + name: "CommentTagType", +})(typia.llm.parameters()); + +interface CommentTagTypeParameters { + regular: CommentTagType; + nullable: CommentTagType | null; + optional: CommentTagType | undefined; + faint: CommentTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicAbsorbed.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..451360bd4b --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicAbsorbed.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_parameters_3_0_ConstantAtomicAbsorbed = + _test_llm_parameters({ + model: "3.0", + name: "ConstantAtomicAbsorbed", + })(typia.llm.parameters()); + +interface ConstantAtomicAbsorbedParameters { + regular: ConstantAtomicAbsorbed; + nullable: ConstantAtomicAbsorbed | null; + optional: ConstantAtomicAbsorbed | undefined; + faint: ConstantAtomicAbsorbed | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicTagged.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..0f18f3d2f6 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicTagged.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_parameters_3_0_ConstantAtomicTagged = + _test_llm_parameters({ + model: "3.0", + name: "ConstantAtomicTagged", + })(typia.llm.parameters()); + +interface ConstantAtomicTaggedParameters { + regular: ConstantAtomicTagged; + nullable: ConstantAtomicTagged | null; + optional: ConstantAtomicTagged | undefined; + faint: ConstantAtomicTagged | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..bcf4453d22 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantAtomicUnion.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_parameters_3_0_ConstantAtomicUnion = _test_llm_parameters( + { + model: "3.0", + name: "ConstantAtomicUnion", + }, +)(typia.llm.parameters()); + +interface ConstantAtomicUnionParameters { + regular: ConstantAtomicUnion; + nullable: ConstantAtomicUnion | null; + optional: ConstantAtomicUnion | undefined; + faint: ConstantAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantConstEnumeration.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..2317b55457 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantConstEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_parameters_3_0_ConstantConstEnumeration = + _test_llm_parameters({ + model: "3.0", + name: "ConstantConstEnumeration", + })(typia.llm.parameters()); + +interface ConstantConstEnumerationParameters { + regular: ConstantConstEnumeration; + nullable: ConstantConstEnumeration | null; + optional: ConstantConstEnumeration | undefined; + faint: ConstantConstEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantEnumeration.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantEnumeration.ts new file mode 100644 index 0000000000..0925d40ccc --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ConstantEnumeration.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_parameters_3_0_ConstantEnumeration = _test_llm_parameters( + { + model: "3.0", + name: "ConstantEnumeration", + }, +)(typia.llm.parameters()); + +interface ConstantEnumerationParameters { + regular: ConstantEnumeration; + nullable: ConstantEnumeration | null; + optional: ConstantEnumeration | undefined; + faint: ConstantEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicArray.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicArray.ts new file mode 100644 index 0000000000..ea0c797361 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_parameters_3_0_DynamicArray = _test_llm_parameters({ + model: "3.0", + name: "DynamicArray", +})(typia.llm.parameters()); + +interface DynamicArrayParameters { + regular: DynamicArray; + nullable: DynamicArray | null; + optional: DynamicArray | undefined; + faint: DynamicArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicComposite.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicComposite.ts new file mode 100644 index 0000000000..7f0e72ce7e --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicComposite.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_parameters_3_0_DynamicComposite = _test_llm_parameters({ + model: "3.0", + name: "DynamicComposite", +})(typia.llm.parameters()); + +interface DynamicCompositeParameters { + regular: DynamicComposite; + nullable: DynamicComposite | null; + optional: DynamicComposite | undefined; + faint: DynamicComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicConstant.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicConstant.ts new file mode 100644 index 0000000000..8926952c46 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_parameters_3_0_DynamicConstant = _test_llm_parameters({ + model: "3.0", + name: "DynamicConstant", +})(typia.llm.parameters()); + +interface DynamicConstantParameters { + regular: DynamicConstant; + nullable: DynamicConstant | null; + optional: DynamicConstant | undefined; + faint: DynamicConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicEnumeration.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicEnumeration.ts new file mode 100644 index 0000000000..650ba75eeb --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicEnumeration.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_parameters_3_0_DynamicEnumeration = _test_llm_parameters({ + model: "3.0", + name: "DynamicEnumeration", +})(typia.llm.parameters()); + +interface DynamicEnumerationParameters { + regular: DynamicEnumeration; + nullable: DynamicEnumeration | null; + optional: DynamicEnumeration | undefined; + faint: DynamicEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicNever.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicNever.ts new file mode 100644 index 0000000000..4bc7637c38 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicNever.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_parameters_3_0_DynamicNever = _test_llm_parameters({ + model: "3.0", + name: "DynamicNever", +})(typia.llm.parameters()); + +interface DynamicNeverParameters { + regular: DynamicNever; + nullable: DynamicNever | null; + optional: DynamicNever | undefined; + faint: DynamicNever | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicSimple.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicSimple.ts new file mode 100644 index 0000000000..4ce037b14a --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_parameters_3_0_DynamicSimple = _test_llm_parameters({ + model: "3.0", + name: "DynamicSimple", +})(typia.llm.parameters()); + +interface DynamicSimpleParameters { + regular: DynamicSimple; + nullable: DynamicSimple | null; + optional: DynamicSimple | undefined; + faint: DynamicSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicTemplate.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicTemplate.ts new file mode 100644 index 0000000000..506b5bcd8b --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicTemplate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_parameters_3_0_DynamicTemplate = _test_llm_parameters({ + model: "3.0", + name: "DynamicTemplate", +})(typia.llm.parameters()); + +interface DynamicTemplateParameters { + regular: DynamicTemplate; + nullable: DynamicTemplate | null; + optional: DynamicTemplate | undefined; + faint: DynamicTemplate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicTree.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicTree.ts new file mode 100644 index 0000000000..b059389a8d --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicTree.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_parameters_3_0_DynamicTree = _test_llm_parameters({ + model: "3.0", + name: "DynamicTree", +})(typia.llm.parameters()); + +interface DynamicTreeParameters { + regular: DynamicTree; + nullable: DynamicTree | null; + optional: DynamicTree | undefined; + faint: DynamicTree | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicUndefined.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicUndefined.ts new file mode 100644 index 0000000000..4fd84d4347 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_parameters_3_0_DynamicUndefined = _test_llm_parameters({ + model: "3.0", + name: "DynamicUndefined", +})(typia.llm.parameters()); + +interface DynamicUndefinedParameters { + regular: DynamicUndefined; + nullable: DynamicUndefined | null; + optional: DynamicUndefined | undefined; + faint: DynamicUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicUnion.ts new file mode 100644 index 0000000000..0d4c479972 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_DynamicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_parameters_3_0_DynamicUnion = _test_llm_parameters({ + model: "3.0", + name: "DynamicUnion", +})(typia.llm.parameters()); + +interface DynamicUnionParameters { + regular: DynamicUnion; + nullable: DynamicUnion | null; + optional: DynamicUnion | undefined; + faint: DynamicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectAlias.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectAlias.ts new file mode 100644 index 0000000000..7606bb390f --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_parameters_3_0_ObjectAlias = _test_llm_parameters({ + model: "3.0", + name: "ObjectAlias", +})(typia.llm.parameters()); + +interface ObjectAliasParameters { + regular: ObjectAlias; + nullable: ObjectAlias | null; + optional: ObjectAlias | undefined; + faint: ObjectAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDate.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDate.ts new file mode 100644 index 0000000000..d804386c63 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_parameters_3_0_ObjectDate = _test_llm_parameters({ + model: "3.0", + name: "ObjectDate", +})(typia.llm.parameters()); + +interface ObjectDateParameters { + regular: ObjectDate; + nullable: ObjectDate | null; + optional: ObjectDate | undefined; + faint: ObjectDate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDescription.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDescription.ts new file mode 100644 index 0000000000..b2058f7c95 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDescription.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_parameters_3_0_ObjectDescription = _test_llm_parameters({ + model: "3.0", + name: "ObjectDescription", +})(typia.llm.parameters()); + +interface ObjectDescriptionParameters { + regular: ObjectDescription; + nullable: ObjectDescription | null; + optional: ObjectDescription | undefined; + faint: ObjectDescription | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDynamic.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDynamic.ts new file mode 100644 index 0000000000..23e99509d2 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectDynamic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_parameters_3_0_ObjectDynamic = _test_llm_parameters({ + model: "3.0", + name: "ObjectDynamic", +})(typia.llm.parameters()); + +interface ObjectDynamicParameters { + regular: ObjectDynamic; + nullable: ObjectDynamic | null; + optional: ObjectDynamic | undefined; + faint: ObjectDynamic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericAlias.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericAlias.ts new file mode 100644 index 0000000000..27c89b2439 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_parameters_3_0_ObjectGenericAlias = _test_llm_parameters({ + model: "3.0", + name: "ObjectGenericAlias", +})(typia.llm.parameters()); + +interface ObjectGenericAliasParameters { + regular: ObjectGenericAlias; + nullable: ObjectGenericAlias | null; + optional: ObjectGenericAlias | undefined; + faint: ObjectGenericAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericArray.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericArray.ts new file mode 100644 index 0000000000..b0aa9e01da --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_parameters_3_0_ObjectGenericArray = _test_llm_parameters({ + model: "3.0", + name: "ObjectGenericArray", +})(typia.llm.parameters()); + +interface ObjectGenericArrayParameters { + regular: ObjectGenericArray; + nullable: ObjectGenericArray | null; + optional: ObjectGenericArray | undefined; + faint: ObjectGenericArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericUnion.ts new file mode 100644 index 0000000000..9d97abd1a3 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectGenericUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_parameters_3_0_ObjectGenericUnion = _test_llm_parameters({ + model: "3.0", + name: "ObjectGenericUnion", +})(typia.llm.parameters()); + +interface ObjectGenericUnionParameters { + regular: ObjectGenericUnion; + nullable: ObjectGenericUnion | null; + optional: ObjectGenericUnion | undefined; + faint: ObjectGenericUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectInternal.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectInternal.ts new file mode 100644 index 0000000000..9a00cc9086 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectInternal.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_parameters_3_0_ObjectInternal = _test_llm_parameters({ + model: "3.0", + name: "ObjectInternal", +})(typia.llm.parameters()); + +interface ObjectInternalParameters { + regular: ObjectInternal; + nullable: ObjectInternal | null; + optional: ObjectInternal | undefined; + faint: ObjectInternal | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectIntersection.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectIntersection.ts new file mode 100644 index 0000000000..cc75434461 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectIntersection.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_parameters_3_0_ObjectIntersection = _test_llm_parameters({ + model: "3.0", + name: "ObjectIntersection", +})(typia.llm.parameters()); + +interface ObjectIntersectionParameters { + regular: ObjectIntersection; + nullable: ObjectIntersection | null; + optional: ObjectIntersection | undefined; + faint: ObjectIntersection | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectJsonTag.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectJsonTag.ts new file mode 100644 index 0000000000..59fb3c469e --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectJsonTag.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_parameters_3_0_ObjectJsonTag = _test_llm_parameters({ + model: "3.0", + name: "ObjectJsonTag", +})(typia.llm.parameters()); + +interface ObjectJsonTagParameters { + regular: ObjectJsonTag; + nullable: ObjectJsonTag | null; + optional: ObjectJsonTag | undefined; + faint: ObjectJsonTag | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectLiteralProperty.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..ffb6b69911 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectLiteralProperty.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_parameters_3_0_ObjectLiteralProperty = + _test_llm_parameters({ + model: "3.0", + name: "ObjectLiteralProperty", + })(typia.llm.parameters()); + +interface ObjectLiteralPropertyParameters { + regular: ObjectLiteralProperty; + nullable: ObjectLiteralProperty | null; + optional: ObjectLiteralProperty | undefined; + faint: ObjectLiteralProperty | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectLiteralType.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectLiteralType.ts new file mode 100644 index 0000000000..ff319e4dc1 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectLiteralType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_parameters_3_0_ObjectLiteralType = _test_llm_parameters({ + model: "3.0", + name: "ObjectLiteralType", +})(typia.llm.parameters()); + +interface ObjectLiteralTypeParameters { + regular: ObjectLiteralType; + nullable: ObjectLiteralType | null; + optional: ObjectLiteralType | undefined; + faint: ObjectLiteralType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectNullable.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectNullable.ts new file mode 100644 index 0000000000..29ee5b53ca --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectNullable.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_parameters_3_0_ObjectNullable = _test_llm_parameters({ + model: "3.0", + name: "ObjectNullable", +})(typia.llm.parameters()); + +interface ObjectNullableParameters { + regular: ObjectNullable; + nullable: ObjectNullable | null; + optional: ObjectNullable | undefined; + faint: ObjectNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectOptional.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectOptional.ts new file mode 100644 index 0000000000..b3af588639 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectOptional.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_parameters_3_0_ObjectOptional = _test_llm_parameters({ + model: "3.0", + name: "ObjectOptional", +})(typia.llm.parameters()); + +interface ObjectOptionalParameters { + regular: ObjectOptional; + nullable: ObjectOptional | null; + optional: ObjectOptional | undefined; + faint: ObjectOptional | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPartial.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPartial.ts new file mode 100644 index 0000000000..4986d25d6a --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPartial.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_parameters_3_0_ObjectPartial = _test_llm_parameters({ + model: "3.0", + name: "ObjectPartial", +})(typia.llm.parameters()); + +interface ObjectPartialParameters { + regular: ObjectPartial; + nullable: ObjectPartial | null; + optional: ObjectPartial | undefined; + faint: ObjectPartial | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPartialAndRequired.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..f503261d2e --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPartialAndRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_parameters_3_0_ObjectPartialAndRequired = + _test_llm_parameters({ + model: "3.0", + name: "ObjectPartialAndRequired", + })(typia.llm.parameters()); + +interface ObjectPartialAndRequiredParameters { + regular: ObjectPartialAndRequired; + nullable: ObjectPartialAndRequired | null; + optional: ObjectPartialAndRequired | undefined; + faint: ObjectPartialAndRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPrimitive.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPrimitive.ts new file mode 100644 index 0000000000..b0f212dde7 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectPrimitive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_parameters_3_0_ObjectPrimitive = _test_llm_parameters({ + model: "3.0", + name: "ObjectPrimitive", +})(typia.llm.parameters()); + +interface ObjectPrimitiveParameters { + regular: ObjectPrimitive; + nullable: ObjectPrimitive | null; + optional: ObjectPrimitive | undefined; + faint: ObjectPrimitive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectRecursive.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectRecursive.ts new file mode 100644 index 0000000000..646f4f1a9f --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_parameters_3_0_ObjectRecursive = _test_llm_parameters({ + model: "3.0", + name: "ObjectRecursive", +})(typia.llm.parameters()); + +interface ObjectRecursiveParameters { + regular: ObjectRecursive; + nullable: ObjectRecursive | null; + optional: ObjectRecursive | undefined; + faint: ObjectRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectRequired.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectRequired.ts new file mode 100644 index 0000000000..473deb4b01 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectRequired.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_parameters_3_0_ObjectRequired = _test_llm_parameters({ + model: "3.0", + name: "ObjectRequired", +})(typia.llm.parameters()); + +interface ObjectRequiredParameters { + regular: ObjectRequired; + nullable: ObjectRequired | null; + optional: ObjectRequired | undefined; + faint: ObjectRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectSimple.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectSimple.ts new file mode 100644 index 0000000000..0915f9fae0 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_parameters_3_0_ObjectSimple = _test_llm_parameters({ + model: "3.0", + name: "ObjectSimple", +})(typia.llm.parameters()); + +interface ObjectSimpleParameters { + regular: ObjectSimple; + nullable: ObjectSimple | null; + optional: ObjectSimple | undefined; + faint: ObjectSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUndefined.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUndefined.ts new file mode 100644 index 0000000000..cc343e13e6 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_parameters_3_0_ObjectUndefined = _test_llm_parameters({ + model: "3.0", + name: "ObjectUndefined", +})(typia.llm.parameters()); + +interface ObjectUndefinedParameters { + regular: ObjectUndefined; + nullable: ObjectUndefined | null; + optional: ObjectUndefined | undefined; + faint: ObjectUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionComposite.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionComposite.ts new file mode 100644 index 0000000000..b0ea466008 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionComposite.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_parameters_3_0_ObjectUnionComposite = + _test_llm_parameters({ + model: "3.0", + name: "ObjectUnionComposite", + })(typia.llm.parameters()); + +interface ObjectUnionCompositeParameters { + regular: ObjectUnionComposite; + nullable: ObjectUnionComposite | null; + optional: ObjectUnionComposite | undefined; + faint: ObjectUnionComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionCompositePointer.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..1ad8a7edd9 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionCompositePointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_parameters_3_0_ObjectUnionCompositePointer = + _test_llm_parameters({ + model: "3.0", + name: "ObjectUnionCompositePointer", + })(typia.llm.parameters()); + +interface ObjectUnionCompositePointerParameters { + regular: ObjectUnionCompositePointer; + nullable: ObjectUnionCompositePointer | null; + optional: ObjectUnionCompositePointer | undefined; + faint: ObjectUnionCompositePointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionDouble.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionDouble.ts new file mode 100644 index 0000000000..5b4c682b9f --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_parameters_3_0_ObjectUnionDouble = _test_llm_parameters({ + model: "3.0", + name: "ObjectUnionDouble", +})(typia.llm.parameters()); + +interface ObjectUnionDoubleParameters { + regular: ObjectUnionDouble; + nullable: ObjectUnionDouble | null; + optional: ObjectUnionDouble | undefined; + faint: ObjectUnionDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionExplicit.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..3365f1a7e4 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionExplicit.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_parameters_3_0_ObjectUnionExplicit = _test_llm_parameters( + { + model: "3.0", + name: "ObjectUnionExplicit", + }, +)(typia.llm.parameters()); + +interface ObjectUnionExplicitParameters { + regular: ObjectUnionExplicit; + nullable: ObjectUnionExplicit | null; + optional: ObjectUnionExplicit | undefined; + faint: ObjectUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionExplicitPointer.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..05e27b85b0 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionExplicitPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_parameters_3_0_ObjectUnionExplicitPointer = + _test_llm_parameters({ + model: "3.0", + name: "ObjectUnionExplicitPointer", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitPointerParameters { + regular: ObjectUnionExplicitPointer; + nullable: ObjectUnionExplicitPointer | null; + optional: ObjectUnionExplicitPointer | undefined; + faint: ObjectUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionImplicit.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..955c7bb4f0 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionImplicit.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_parameters_3_0_ObjectUnionImplicit = _test_llm_parameters( + { + model: "3.0", + name: "ObjectUnionImplicit", + }, +)(typia.llm.parameters()); + +interface ObjectUnionImplicitParameters { + regular: ObjectUnionImplicit; + nullable: ObjectUnionImplicit | null; + optional: ObjectUnionImplicit | undefined; + faint: ObjectUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionNonPredictable.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..a7ed3f5e86 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ObjectUnionNonPredictable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_parameters_3_0_ObjectUnionNonPredictable = + _test_llm_parameters({ + model: "3.0", + name: "ObjectUnionNonPredictable", + })(typia.llm.parameters()); + +interface ObjectUnionNonPredictableParameters { + regular: ObjectUnionNonPredictable; + nullable: ObjectUnionNonPredictable | null; + optional: ObjectUnionNonPredictable | undefined; + faint: ObjectUnionNonPredictable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateAtomic.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateAtomic.ts new file mode 100644 index 0000000000..da743da96d --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateAtomic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_parameters_3_0_TemplateAtomic = _test_llm_parameters({ + model: "3.0", + name: "TemplateAtomic", +})(typia.llm.parameters()); + +interface TemplateAtomicParameters { + regular: TemplateAtomic; + nullable: TemplateAtomic | null; + optional: TemplateAtomic | undefined; + faint: TemplateAtomic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateConstant.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateConstant.ts new file mode 100644 index 0000000000..b2bf2e5fff --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_parameters_3_0_TemplateConstant = _test_llm_parameters({ + model: "3.0", + name: "TemplateConstant", +})(typia.llm.parameters()); + +interface TemplateConstantParameters { + regular: TemplateConstant; + nullable: TemplateConstant | null; + optional: TemplateConstant | undefined; + faint: TemplateConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateUnion.ts new file mode 100644 index 0000000000..8b168f1320 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TemplateUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_parameters_3_0_TemplateUnion = _test_llm_parameters({ + model: "3.0", + name: "TemplateUnion", +})(typia.llm.parameters()); + +interface TemplateUnionParameters { + regular: TemplateUnion; + nullable: TemplateUnion | null; + optional: TemplateUnion | undefined; + faint: TemplateUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonAtomicUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..3213d668d2 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonAtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_parameters_3_0_ToJsonAtomicUnion = _test_llm_parameters({ + model: "3.0", + name: "ToJsonAtomicUnion", +})(typia.llm.parameters()); + +interface ToJsonAtomicUnionParameters { + regular: ToJsonAtomicUnion; + nullable: ToJsonAtomicUnion | null; + optional: ToJsonAtomicUnion | undefined; + faint: ToJsonAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonDouble.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonDouble.ts new file mode 100644 index 0000000000..701a0196d8 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_parameters_3_0_ToJsonDouble = _test_llm_parameters({ + model: "3.0", + name: "ToJsonDouble", +})(typia.llm.parameters()); + +interface ToJsonDoubleParameters { + regular: ToJsonDouble; + nullable: ToJsonDouble | null; + optional: ToJsonDouble | undefined; + faint: ToJsonDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonNull.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonNull.ts new file mode 100644 index 0000000000..3299a212bf --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonNull.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_parameters_3_0_ToJsonNull = _test_llm_parameters({ + model: "3.0", + name: "ToJsonNull", +})(typia.llm.parameters()); + +interface ToJsonNullParameters { + regular: ToJsonNull; + nullable: ToJsonNull | null; + optional: ToJsonNull | undefined; + faint: ToJsonNull | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonUnion.ts new file mode 100644 index 0000000000..8a5974964d --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_ToJsonUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_parameters_3_0_ToJsonUnion = _test_llm_parameters({ + model: "3.0", + name: "ToJsonUnion", +})(typia.llm.parameters()); + +interface ToJsonUnionParameters { + regular: ToJsonUnion; + nullable: ToJsonUnion | null; + optional: ToJsonUnion | undefined; + faint: ToJsonUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagArray.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagArray.ts new file mode 100644 index 0000000000..def5607cdc --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_parameters_3_0_TypeTagArray = _test_llm_parameters({ + model: "3.0", + name: "TypeTagArray", +})(typia.llm.parameters()); + +interface TypeTagArrayParameters { + regular: TypeTagArray; + nullable: TypeTagArray | null; + optional: TypeTagArray | undefined; + faint: TypeTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagArrayUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..00a5f416a9 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_parameters_3_0_TypeTagArrayUnion = _test_llm_parameters({ + model: "3.0", + name: "TypeTagArrayUnion", +})(typia.llm.parameters()); + +interface TypeTagArrayUnionParameters { + regular: TypeTagArrayUnion; + nullable: TypeTagArrayUnion | null; + optional: TypeTagArrayUnion | undefined; + faint: TypeTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagAtomicUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..621e6f82e6 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagAtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_parameters_3_0_TypeTagAtomicUnion = _test_llm_parameters({ + model: "3.0", + name: "TypeTagAtomicUnion", +})(typia.llm.parameters()); + +interface TypeTagAtomicUnionParameters { + regular: TypeTagAtomicUnion; + nullable: TypeTagAtomicUnion | null; + optional: TypeTagAtomicUnion | undefined; + faint: TypeTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagCustom.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagCustom.ts new file mode 100644 index 0000000000..4533d54e6d --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagCustom.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_parameters_3_0_TypeTagCustom = _test_llm_parameters({ + model: "3.0", + name: "TypeTagCustom", +})(typia.llm.parameters()); + +interface TypeTagCustomParameters { + regular: TypeTagCustom; + nullable: TypeTagCustom | null; + optional: TypeTagCustom | undefined; + faint: TypeTagCustom | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagDefault.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagDefault.ts new file mode 100644 index 0000000000..642db87ad4 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_parameters_3_0_TypeTagDefault = _test_llm_parameters({ + model: "3.0", + name: "TypeTagDefault", +})(typia.llm.parameters()); + +interface TypeTagDefaultParameters { + regular: TypeTagDefault; + nullable: TypeTagDefault | null; + optional: TypeTagDefault | undefined; + faint: TypeTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagFormat.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagFormat.ts new file mode 100644 index 0000000000..df80a8772e --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_parameters_3_0_TypeTagFormat = _test_llm_parameters({ + model: "3.0", + name: "TypeTagFormat", +})(typia.llm.parameters()); + +interface TypeTagFormatParameters { + regular: TypeTagFormat; + nullable: TypeTagFormat | null; + optional: TypeTagFormat | undefined; + faint: TypeTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagLength.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagLength.ts new file mode 100644 index 0000000000..442a3c52c2 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_parameters_3_0_TypeTagLength = _test_llm_parameters({ + model: "3.0", + name: "TypeTagLength", +})(typia.llm.parameters()); + +interface TypeTagLengthParameters { + regular: TypeTagLength; + nullable: TypeTagLength | null; + optional: TypeTagLength | undefined; + faint: TypeTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagMatrix.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagMatrix.ts new file mode 100644 index 0000000000..62a06f8e34 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_parameters_3_0_TypeTagMatrix = _test_llm_parameters({ + model: "3.0", + name: "TypeTagMatrix", +})(typia.llm.parameters()); + +interface TypeTagMatrixParameters { + regular: TypeTagMatrix; + nullable: TypeTagMatrix | null; + optional: TypeTagMatrix | undefined; + faint: TypeTagMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagObjectUnion.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..7c3e034443 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagObjectUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_parameters_3_0_TypeTagObjectUnion = _test_llm_parameters({ + model: "3.0", + name: "TypeTagObjectUnion", +})(typia.llm.parameters()); + +interface TypeTagObjectUnionParameters { + regular: TypeTagObjectUnion; + nullable: TypeTagObjectUnion | null; + optional: TypeTagObjectUnion | undefined; + faint: TypeTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagPattern.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagPattern.ts new file mode 100644 index 0000000000..8c1439788d --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_parameters_3_0_TypeTagPattern = _test_llm_parameters({ + model: "3.0", + name: "TypeTagPattern", +})(typia.llm.parameters()); + +interface TypeTagPatternParameters { + regular: TypeTagPattern; + nullable: TypeTagPattern | null; + optional: TypeTagPattern | undefined; + faint: TypeTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagRange.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagRange.ts new file mode 100644 index 0000000000..b0888f5cc3 --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_parameters_3_0_TypeTagRange = _test_llm_parameters({ + model: "3.0", + name: "TypeTagRange", +})(typia.llm.parameters()); + +interface TypeTagRangeParameters { + regular: TypeTagRange; + nullable: TypeTagRange | null; + optional: TypeTagRange | undefined; + faint: TypeTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagType.ts b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagType.ts new file mode 100644 index 0000000000..50c340dc4e --- /dev/null +++ b/test/src/features/llm.parameters/3.0/test_llm_parameters_3_0_TypeTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_parameters_3_0_TypeTagType = _test_llm_parameters({ + model: "3.0", + name: "TypeTagType", +})(typia.llm.parameters()); + +interface TypeTagTypeParameters { + regular: TypeTagType; + nullable: TypeTagType | null; + optional: TypeTagType | undefined; + faint: TypeTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayAny.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayAny.ts new file mode 100644 index 0000000000..477dc8b66d --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayAny.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_parameters_3_1_ArrayAny = _test_llm_parameters({ + model: "3.1", + name: "ArrayAny", +})(typia.llm.parameters()); + +interface ArrayAnyParameters { + regular: ArrayAny; + nullable: ArrayAny | null; + optional: ArrayAny | undefined; + faint: ArrayAny | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayHierarchical.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayHierarchical.ts new file mode 100644 index 0000000000..9fc6910cab --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayHierarchical.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_parameters_3_1_ArrayHierarchical = _test_llm_parameters({ + model: "3.1", + name: "ArrayHierarchical", +})(typia.llm.parameters()); + +interface ArrayHierarchicalParameters { + regular: ArrayHierarchical; + nullable: ArrayHierarchical | null; + optional: ArrayHierarchical | undefined; + faint: ArrayHierarchical | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayHierarchicalPointer.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..31f07d9e8e --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayHierarchicalPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_parameters_3_1_ArrayHierarchicalPointer = + _test_llm_parameters({ + model: "3.1", + name: "ArrayHierarchicalPointer", + })(typia.llm.parameters()); + +interface ArrayHierarchicalPointerParameters { + regular: ArrayHierarchicalPointer; + nullable: ArrayHierarchicalPointer | null; + optional: ArrayHierarchicalPointer | undefined; + faint: ArrayHierarchicalPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayMatrix.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayMatrix.ts new file mode 100644 index 0000000000..a3b402bfd3 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_parameters_3_1_ArrayMatrix = _test_llm_parameters({ + model: "3.1", + name: "ArrayMatrix", +})(typia.llm.parameters()); + +interface ArrayMatrixParameters { + regular: ArrayMatrix; + nullable: ArrayMatrix | null; + optional: ArrayMatrix | undefined; + faint: ArrayMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursive.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursive.ts new file mode 100644 index 0000000000..854c1fac06 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_parameters_3_1_ArrayRecursive = _test_llm_parameters({ + model: "3.1", + name: "ArrayRecursive", +})(typia.llm.parameters()); + +interface ArrayRecursiveParameters { + regular: ArrayRecursive; + nullable: ArrayRecursive | null; + optional: ArrayRecursive | undefined; + faint: ArrayRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..eb59f22efe --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_parameters_3_1_ArrayRecursiveUnionExplicit = + _test_llm_parameters({ + model: "3.1", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionExplicitParameters { + regular: ArrayRecursiveUnionExplicit; + nullable: ArrayRecursiveUnionExplicit | null; + optional: ArrayRecursiveUnionExplicit | undefined; + faint: ArrayRecursiveUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..8303240366 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,20 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_parameters_3_1_ArrayRecursiveUnionExplicitPointer = + _test_llm_parameters({ + model: "3.1", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.parameters(), + ); + +interface ArrayRecursiveUnionExplicitPointerParameters { + regular: ArrayRecursiveUnionExplicitPointer; + nullable: ArrayRecursiveUnionExplicitPointer | null; + optional: ArrayRecursiveUnionExplicitPointer | undefined; + faint: ArrayRecursiveUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..fbdb5d21cd --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_parameters_3_1_ArrayRecursiveUnionImplicit = + _test_llm_parameters({ + model: "3.1", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionImplicitParameters { + regular: ArrayRecursiveUnionImplicit; + nullable: ArrayRecursiveUnionImplicit | null; + optional: ArrayRecursiveUnionImplicit | undefined; + faint: ArrayRecursiveUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedNullable.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..f3e8cfe0ef --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedNullable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_parameters_3_1_ArrayRepeatedNullable = + _test_llm_parameters({ + model: "3.1", + name: "ArrayRepeatedNullable", + })(typia.llm.parameters()); + +interface ArrayRepeatedNullableParameters { + regular: ArrayRepeatedNullable; + nullable: ArrayRepeatedNullable | null; + optional: ArrayRepeatedNullable | undefined; + faint: ArrayRepeatedNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedRequired.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..e28311adbf --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_parameters_3_1_ArrayRepeatedRequired = + _test_llm_parameters({ + model: "3.1", + name: "ArrayRepeatedRequired", + })(typia.llm.parameters()); + +interface ArrayRepeatedRequiredParameters { + regular: ArrayRepeatedRequired; + nullable: ArrayRepeatedRequired | null; + optional: ArrayRepeatedRequired | undefined; + faint: ArrayRepeatedRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..d890cd0599 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayRepeatedUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_parameters_3_1_ArrayRepeatedUnion = _test_llm_parameters({ + model: "3.1", + name: "ArrayRepeatedUnion", +})(typia.llm.parameters()); + +interface ArrayRepeatedUnionParameters { + regular: ArrayRepeatedUnion; + nullable: ArrayRepeatedUnion | null; + optional: ArrayRepeatedUnion | undefined; + faint: ArrayRepeatedUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArraySimple.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArraySimple.ts new file mode 100644 index 0000000000..11ecbead39 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArraySimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_parameters_3_1_ArraySimple = _test_llm_parameters({ + model: "3.1", + name: "ArraySimple", +})(typia.llm.parameters()); + +interface ArraySimpleParameters { + regular: ArraySimple; + nullable: ArraySimple | null; + optional: ArraySimple | undefined; + faint: ArraySimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayUnion.ts new file mode 100644 index 0000000000..1b779b323f --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_parameters_3_1_ArrayUnion = _test_llm_parameters({ + model: "3.1", + name: "ArrayUnion", +})(typia.llm.parameters()); + +interface ArrayUnionParameters { + regular: ArrayUnion; + nullable: ArrayUnion | null; + optional: ArrayUnion | undefined; + faint: ArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_AtomicUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_AtomicUnion.ts new file mode 100644 index 0000000000..507c44b90e --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_AtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_parameters_3_1_AtomicUnion = _test_llm_parameters({ + model: "3.1", + name: "AtomicUnion", +})(typia.llm.parameters()); + +interface AtomicUnionParameters { + regular: AtomicUnion; + nullable: AtomicUnion | null; + optional: AtomicUnion | undefined; + faint: AtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassGetter.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassGetter.ts new file mode 100644 index 0000000000..e332715728 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassGetter.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_parameters_3_1_ClassGetter = _test_llm_parameters({ + model: "3.1", + name: "ClassGetter", +})(typia.llm.parameters()); + +interface ClassGetterParameters { + regular: ClassGetter; + nullable: ClassGetter | null; + optional: ClassGetter | undefined; + faint: ClassGetter | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassMethod.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassMethod.ts new file mode 100644 index 0000000000..b04f2192b9 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassMethod.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_parameters_3_1_ClassMethod = _test_llm_parameters({ + model: "3.1", + name: "ClassMethod", +})(typia.llm.parameters()); + +interface ClassMethodParameters { + regular: ClassMethod; + nullable: ClassMethod | null; + optional: ClassMethod | undefined; + faint: ClassMethod | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassPropertyAssignment.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..4f2d9e6541 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ClassPropertyAssignment.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_parameters_3_1_ClassPropertyAssignment = + _test_llm_parameters({ + model: "3.1", + name: "ClassPropertyAssignment", + })(typia.llm.parameters()); + +interface ClassPropertyAssignmentParameters { + regular: ClassPropertyAssignment; + nullable: ClassPropertyAssignment | null; + optional: ClassPropertyAssignment | undefined; + faint: ClassPropertyAssignment | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagArray.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagArray.ts new file mode 100644 index 0000000000..984ca7a490 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_parameters_3_1_CommentTagArray = _test_llm_parameters({ + model: "3.1", + name: "CommentTagArray", +})(typia.llm.parameters()); + +interface CommentTagArrayParameters { + regular: CommentTagArray; + nullable: CommentTagArray | null; + optional: CommentTagArray | undefined; + faint: CommentTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagArrayUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..0a871919b2 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_parameters_3_1_CommentTagArrayUnion = + _test_llm_parameters({ + model: "3.1", + name: "CommentTagArrayUnion", + })(typia.llm.parameters()); + +interface CommentTagArrayUnionParameters { + regular: CommentTagArrayUnion; + nullable: CommentTagArrayUnion | null; + optional: CommentTagArrayUnion | undefined; + faint: CommentTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagAtomicUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..c20ee3dfee --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_parameters_3_1_CommentTagAtomicUnion = + _test_llm_parameters({ + model: "3.1", + name: "CommentTagAtomicUnion", + })(typia.llm.parameters()); + +interface CommentTagAtomicUnionParameters { + regular: CommentTagAtomicUnion; + nullable: CommentTagAtomicUnion | null; + optional: CommentTagAtomicUnion | undefined; + faint: CommentTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagDefault.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagDefault.ts new file mode 100644 index 0000000000..aa2288476f --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_parameters_3_1_CommentTagDefault = _test_llm_parameters({ + model: "3.1", + name: "CommentTagDefault", +})(typia.llm.parameters()); + +interface CommentTagDefaultParameters { + regular: CommentTagDefault; + nullable: CommentTagDefault | null; + optional: CommentTagDefault | undefined; + faint: CommentTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagFormat.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagFormat.ts new file mode 100644 index 0000000000..f43681c4cf --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_parameters_3_1_CommentTagFormat = _test_llm_parameters({ + model: "3.1", + name: "CommentTagFormat", +})(typia.llm.parameters()); + +interface CommentTagFormatParameters { + regular: CommentTagFormat; + nullable: CommentTagFormat | null; + optional: CommentTagFormat | undefined; + faint: CommentTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagLength.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagLength.ts new file mode 100644 index 0000000000..a8dccc8a57 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_parameters_3_1_CommentTagLength = _test_llm_parameters({ + model: "3.1", + name: "CommentTagLength", +})(typia.llm.parameters()); + +interface CommentTagLengthParameters { + regular: CommentTagLength; + nullable: CommentTagLength | null; + optional: CommentTagLength | undefined; + faint: CommentTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagObjectUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..d6ed0e77e1 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_parameters_3_1_CommentTagObjectUnion = + _test_llm_parameters({ + model: "3.1", + name: "CommentTagObjectUnion", + })(typia.llm.parameters()); + +interface CommentTagObjectUnionParameters { + regular: CommentTagObjectUnion; + nullable: CommentTagObjectUnion | null; + optional: CommentTagObjectUnion | undefined; + faint: CommentTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagPattern.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagPattern.ts new file mode 100644 index 0000000000..a0f145d51b --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_parameters_3_1_CommentTagPattern = _test_llm_parameters({ + model: "3.1", + name: "CommentTagPattern", +})(typia.llm.parameters()); + +interface CommentTagPatternParameters { + regular: CommentTagPattern; + nullable: CommentTagPattern | null; + optional: CommentTagPattern | undefined; + faint: CommentTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagRange.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagRange.ts new file mode 100644 index 0000000000..02ceabc203 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_parameters_3_1_CommentTagRange = _test_llm_parameters({ + model: "3.1", + name: "CommentTagRange", +})(typia.llm.parameters()); + +interface CommentTagRangeParameters { + regular: CommentTagRange; + nullable: CommentTagRange | null; + optional: CommentTagRange | undefined; + faint: CommentTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagType.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagType.ts new file mode 100644 index 0000000000..18ecf363b1 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_CommentTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_parameters_3_1_CommentTagType = _test_llm_parameters({ + model: "3.1", + name: "CommentTagType", +})(typia.llm.parameters()); + +interface CommentTagTypeParameters { + regular: CommentTagType; + nullable: CommentTagType | null; + optional: CommentTagType | undefined; + faint: CommentTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicAbsorbed.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..8b89a1a60d --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicAbsorbed.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_parameters_3_1_ConstantAtomicAbsorbed = + _test_llm_parameters({ + model: "3.1", + name: "ConstantAtomicAbsorbed", + })(typia.llm.parameters()); + +interface ConstantAtomicAbsorbedParameters { + regular: ConstantAtomicAbsorbed; + nullable: ConstantAtomicAbsorbed | null; + optional: ConstantAtomicAbsorbed | undefined; + faint: ConstantAtomicAbsorbed | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicTagged.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..79f9834349 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicTagged.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_parameters_3_1_ConstantAtomicTagged = + _test_llm_parameters({ + model: "3.1", + name: "ConstantAtomicTagged", + })(typia.llm.parameters()); + +interface ConstantAtomicTaggedParameters { + regular: ConstantAtomicTagged; + nullable: ConstantAtomicTagged | null; + optional: ConstantAtomicTagged | undefined; + faint: ConstantAtomicTagged | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..9accf3b86a --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantAtomicUnion.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_parameters_3_1_ConstantAtomicUnion = _test_llm_parameters( + { + model: "3.1", + name: "ConstantAtomicUnion", + }, +)(typia.llm.parameters()); + +interface ConstantAtomicUnionParameters { + regular: ConstantAtomicUnion; + nullable: ConstantAtomicUnion | null; + optional: ConstantAtomicUnion | undefined; + faint: ConstantAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantConstEnumeration.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..25ec5e7d42 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantConstEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_parameters_3_1_ConstantConstEnumeration = + _test_llm_parameters({ + model: "3.1", + name: "ConstantConstEnumeration", + })(typia.llm.parameters()); + +interface ConstantConstEnumerationParameters { + regular: ConstantConstEnumeration; + nullable: ConstantConstEnumeration | null; + optional: ConstantConstEnumeration | undefined; + faint: ConstantConstEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantEnumeration.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantEnumeration.ts new file mode 100644 index 0000000000..d028e7211b --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ConstantEnumeration.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_parameters_3_1_ConstantEnumeration = _test_llm_parameters( + { + model: "3.1", + name: "ConstantEnumeration", + }, +)(typia.llm.parameters()); + +interface ConstantEnumerationParameters { + regular: ConstantEnumeration; + nullable: ConstantEnumeration | null; + optional: ConstantEnumeration | undefined; + faint: ConstantEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicArray.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicArray.ts new file mode 100644 index 0000000000..eae397e91f --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_parameters_3_1_DynamicArray = _test_llm_parameters({ + model: "3.1", + name: "DynamicArray", +})(typia.llm.parameters()); + +interface DynamicArrayParameters { + regular: DynamicArray; + nullable: DynamicArray | null; + optional: DynamicArray | undefined; + faint: DynamicArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicComposite.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicComposite.ts new file mode 100644 index 0000000000..539c6d4d40 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicComposite.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_parameters_3_1_DynamicComposite = _test_llm_parameters({ + model: "3.1", + name: "DynamicComposite", +})(typia.llm.parameters()); + +interface DynamicCompositeParameters { + regular: DynamicComposite; + nullable: DynamicComposite | null; + optional: DynamicComposite | undefined; + faint: DynamicComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicConstant.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicConstant.ts new file mode 100644 index 0000000000..5282f1c5c5 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_parameters_3_1_DynamicConstant = _test_llm_parameters({ + model: "3.1", + name: "DynamicConstant", +})(typia.llm.parameters()); + +interface DynamicConstantParameters { + regular: DynamicConstant; + nullable: DynamicConstant | null; + optional: DynamicConstant | undefined; + faint: DynamicConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicEnumeration.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicEnumeration.ts new file mode 100644 index 0000000000..8739f02bb3 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicEnumeration.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_parameters_3_1_DynamicEnumeration = _test_llm_parameters({ + model: "3.1", + name: "DynamicEnumeration", +})(typia.llm.parameters()); + +interface DynamicEnumerationParameters { + regular: DynamicEnumeration; + nullable: DynamicEnumeration | null; + optional: DynamicEnumeration | undefined; + faint: DynamicEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicNever.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicNever.ts new file mode 100644 index 0000000000..404fc116bd --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicNever.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_parameters_3_1_DynamicNever = _test_llm_parameters({ + model: "3.1", + name: "DynamicNever", +})(typia.llm.parameters()); + +interface DynamicNeverParameters { + regular: DynamicNever; + nullable: DynamicNever | null; + optional: DynamicNever | undefined; + faint: DynamicNever | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicSimple.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicSimple.ts new file mode 100644 index 0000000000..2706d2a9f2 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_parameters_3_1_DynamicSimple = _test_llm_parameters({ + model: "3.1", + name: "DynamicSimple", +})(typia.llm.parameters()); + +interface DynamicSimpleParameters { + regular: DynamicSimple; + nullable: DynamicSimple | null; + optional: DynamicSimple | undefined; + faint: DynamicSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicTemplate.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicTemplate.ts new file mode 100644 index 0000000000..d2005c3445 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicTemplate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_parameters_3_1_DynamicTemplate = _test_llm_parameters({ + model: "3.1", + name: "DynamicTemplate", +})(typia.llm.parameters()); + +interface DynamicTemplateParameters { + regular: DynamicTemplate; + nullable: DynamicTemplate | null; + optional: DynamicTemplate | undefined; + faint: DynamicTemplate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicTree.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicTree.ts new file mode 100644 index 0000000000..03e7fa8ca4 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicTree.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_parameters_3_1_DynamicTree = _test_llm_parameters({ + model: "3.1", + name: "DynamicTree", +})(typia.llm.parameters()); + +interface DynamicTreeParameters { + regular: DynamicTree; + nullable: DynamicTree | null; + optional: DynamicTree | undefined; + faint: DynamicTree | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicUndefined.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicUndefined.ts new file mode 100644 index 0000000000..b47027ebb6 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_parameters_3_1_DynamicUndefined = _test_llm_parameters({ + model: "3.1", + name: "DynamicUndefined", +})(typia.llm.parameters()); + +interface DynamicUndefinedParameters { + regular: DynamicUndefined; + nullable: DynamicUndefined | null; + optional: DynamicUndefined | undefined; + faint: DynamicUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicUnion.ts new file mode 100644 index 0000000000..3f0404db44 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_DynamicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_parameters_3_1_DynamicUnion = _test_llm_parameters({ + model: "3.1", + name: "DynamicUnion", +})(typia.llm.parameters()); + +interface DynamicUnionParameters { + regular: DynamicUnion; + nullable: DynamicUnion | null; + optional: DynamicUnion | undefined; + faint: DynamicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectAlias.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectAlias.ts new file mode 100644 index 0000000000..1356cf1a95 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_parameters_3_1_ObjectAlias = _test_llm_parameters({ + model: "3.1", + name: "ObjectAlias", +})(typia.llm.parameters()); + +interface ObjectAliasParameters { + regular: ObjectAlias; + nullable: ObjectAlias | null; + optional: ObjectAlias | undefined; + faint: ObjectAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDate.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDate.ts new file mode 100644 index 0000000000..f6fe973faf --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_parameters_3_1_ObjectDate = _test_llm_parameters({ + model: "3.1", + name: "ObjectDate", +})(typia.llm.parameters()); + +interface ObjectDateParameters { + regular: ObjectDate; + nullable: ObjectDate | null; + optional: ObjectDate | undefined; + faint: ObjectDate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDescription.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDescription.ts new file mode 100644 index 0000000000..407b67b913 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDescription.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_parameters_3_1_ObjectDescription = _test_llm_parameters({ + model: "3.1", + name: "ObjectDescription", +})(typia.llm.parameters()); + +interface ObjectDescriptionParameters { + regular: ObjectDescription; + nullable: ObjectDescription | null; + optional: ObjectDescription | undefined; + faint: ObjectDescription | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDynamic.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDynamic.ts new file mode 100644 index 0000000000..4c7cc99c1e --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectDynamic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_parameters_3_1_ObjectDynamic = _test_llm_parameters({ + model: "3.1", + name: "ObjectDynamic", +})(typia.llm.parameters()); + +interface ObjectDynamicParameters { + regular: ObjectDynamic; + nullable: ObjectDynamic | null; + optional: ObjectDynamic | undefined; + faint: ObjectDynamic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericAlias.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericAlias.ts new file mode 100644 index 0000000000..77d8afc622 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_parameters_3_1_ObjectGenericAlias = _test_llm_parameters({ + model: "3.1", + name: "ObjectGenericAlias", +})(typia.llm.parameters()); + +interface ObjectGenericAliasParameters { + regular: ObjectGenericAlias; + nullable: ObjectGenericAlias | null; + optional: ObjectGenericAlias | undefined; + faint: ObjectGenericAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericArray.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericArray.ts new file mode 100644 index 0000000000..ad002094be --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_parameters_3_1_ObjectGenericArray = _test_llm_parameters({ + model: "3.1", + name: "ObjectGenericArray", +})(typia.llm.parameters()); + +interface ObjectGenericArrayParameters { + regular: ObjectGenericArray; + nullable: ObjectGenericArray | null; + optional: ObjectGenericArray | undefined; + faint: ObjectGenericArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericUnion.ts new file mode 100644 index 0000000000..d1a0cf9711 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectGenericUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_parameters_3_1_ObjectGenericUnion = _test_llm_parameters({ + model: "3.1", + name: "ObjectGenericUnion", +})(typia.llm.parameters()); + +interface ObjectGenericUnionParameters { + regular: ObjectGenericUnion; + nullable: ObjectGenericUnion | null; + optional: ObjectGenericUnion | undefined; + faint: ObjectGenericUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectInternal.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectInternal.ts new file mode 100644 index 0000000000..1c1a991c24 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectInternal.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_parameters_3_1_ObjectInternal = _test_llm_parameters({ + model: "3.1", + name: "ObjectInternal", +})(typia.llm.parameters()); + +interface ObjectInternalParameters { + regular: ObjectInternal; + nullable: ObjectInternal | null; + optional: ObjectInternal | undefined; + faint: ObjectInternal | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectIntersection.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectIntersection.ts new file mode 100644 index 0000000000..b3f2af250a --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectIntersection.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_parameters_3_1_ObjectIntersection = _test_llm_parameters({ + model: "3.1", + name: "ObjectIntersection", +})(typia.llm.parameters()); + +interface ObjectIntersectionParameters { + regular: ObjectIntersection; + nullable: ObjectIntersection | null; + optional: ObjectIntersection | undefined; + faint: ObjectIntersection | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectJsonTag.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectJsonTag.ts new file mode 100644 index 0000000000..9f816a0aa4 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectJsonTag.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_parameters_3_1_ObjectJsonTag = _test_llm_parameters({ + model: "3.1", + name: "ObjectJsonTag", +})(typia.llm.parameters()); + +interface ObjectJsonTagParameters { + regular: ObjectJsonTag; + nullable: ObjectJsonTag | null; + optional: ObjectJsonTag | undefined; + faint: ObjectJsonTag | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectLiteralProperty.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..cd64d82d1f --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectLiteralProperty.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_parameters_3_1_ObjectLiteralProperty = + _test_llm_parameters({ + model: "3.1", + name: "ObjectLiteralProperty", + })(typia.llm.parameters()); + +interface ObjectLiteralPropertyParameters { + regular: ObjectLiteralProperty; + nullable: ObjectLiteralProperty | null; + optional: ObjectLiteralProperty | undefined; + faint: ObjectLiteralProperty | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectLiteralType.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectLiteralType.ts new file mode 100644 index 0000000000..1256582c52 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectLiteralType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_parameters_3_1_ObjectLiteralType = _test_llm_parameters({ + model: "3.1", + name: "ObjectLiteralType", +})(typia.llm.parameters()); + +interface ObjectLiteralTypeParameters { + regular: ObjectLiteralType; + nullable: ObjectLiteralType | null; + optional: ObjectLiteralType | undefined; + faint: ObjectLiteralType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectNullable.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectNullable.ts new file mode 100644 index 0000000000..b2258e5308 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectNullable.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_parameters_3_1_ObjectNullable = _test_llm_parameters({ + model: "3.1", + name: "ObjectNullable", +})(typia.llm.parameters()); + +interface ObjectNullableParameters { + regular: ObjectNullable; + nullable: ObjectNullable | null; + optional: ObjectNullable | undefined; + faint: ObjectNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectOptional.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectOptional.ts new file mode 100644 index 0000000000..e7c4826006 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectOptional.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_parameters_3_1_ObjectOptional = _test_llm_parameters({ + model: "3.1", + name: "ObjectOptional", +})(typia.llm.parameters()); + +interface ObjectOptionalParameters { + regular: ObjectOptional; + nullable: ObjectOptional | null; + optional: ObjectOptional | undefined; + faint: ObjectOptional | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPartial.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPartial.ts new file mode 100644 index 0000000000..419719f552 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPartial.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_parameters_3_1_ObjectPartial = _test_llm_parameters({ + model: "3.1", + name: "ObjectPartial", +})(typia.llm.parameters()); + +interface ObjectPartialParameters { + regular: ObjectPartial; + nullable: ObjectPartial | null; + optional: ObjectPartial | undefined; + faint: ObjectPartial | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPartialAndRequired.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..b03d830642 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPartialAndRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_parameters_3_1_ObjectPartialAndRequired = + _test_llm_parameters({ + model: "3.1", + name: "ObjectPartialAndRequired", + })(typia.llm.parameters()); + +interface ObjectPartialAndRequiredParameters { + regular: ObjectPartialAndRequired; + nullable: ObjectPartialAndRequired | null; + optional: ObjectPartialAndRequired | undefined; + faint: ObjectPartialAndRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPrimitive.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPrimitive.ts new file mode 100644 index 0000000000..7d55c54b68 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectPrimitive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_parameters_3_1_ObjectPrimitive = _test_llm_parameters({ + model: "3.1", + name: "ObjectPrimitive", +})(typia.llm.parameters()); + +interface ObjectPrimitiveParameters { + regular: ObjectPrimitive; + nullable: ObjectPrimitive | null; + optional: ObjectPrimitive | undefined; + faint: ObjectPrimitive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectRecursive.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectRecursive.ts new file mode 100644 index 0000000000..c266801fd9 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_parameters_3_1_ObjectRecursive = _test_llm_parameters({ + model: "3.1", + name: "ObjectRecursive", +})(typia.llm.parameters()); + +interface ObjectRecursiveParameters { + regular: ObjectRecursive; + nullable: ObjectRecursive | null; + optional: ObjectRecursive | undefined; + faint: ObjectRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectRequired.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectRequired.ts new file mode 100644 index 0000000000..bb01832565 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectRequired.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_parameters_3_1_ObjectRequired = _test_llm_parameters({ + model: "3.1", + name: "ObjectRequired", +})(typia.llm.parameters()); + +interface ObjectRequiredParameters { + regular: ObjectRequired; + nullable: ObjectRequired | null; + optional: ObjectRequired | undefined; + faint: ObjectRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectSimple.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectSimple.ts new file mode 100644 index 0000000000..b2b54035c5 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_parameters_3_1_ObjectSimple = _test_llm_parameters({ + model: "3.1", + name: "ObjectSimple", +})(typia.llm.parameters()); + +interface ObjectSimpleParameters { + regular: ObjectSimple; + nullable: ObjectSimple | null; + optional: ObjectSimple | undefined; + faint: ObjectSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUndefined.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUndefined.ts new file mode 100644 index 0000000000..59d04bcb90 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_parameters_3_1_ObjectUndefined = _test_llm_parameters({ + model: "3.1", + name: "ObjectUndefined", +})(typia.llm.parameters()); + +interface ObjectUndefinedParameters { + regular: ObjectUndefined; + nullable: ObjectUndefined | null; + optional: ObjectUndefined | undefined; + faint: ObjectUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionComposite.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionComposite.ts new file mode 100644 index 0000000000..2cebebd9e1 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionComposite.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_parameters_3_1_ObjectUnionComposite = + _test_llm_parameters({ + model: "3.1", + name: "ObjectUnionComposite", + })(typia.llm.parameters()); + +interface ObjectUnionCompositeParameters { + regular: ObjectUnionComposite; + nullable: ObjectUnionComposite | null; + optional: ObjectUnionComposite | undefined; + faint: ObjectUnionComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionCompositePointer.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..d528a83792 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionCompositePointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_parameters_3_1_ObjectUnionCompositePointer = + _test_llm_parameters({ + model: "3.1", + name: "ObjectUnionCompositePointer", + })(typia.llm.parameters()); + +interface ObjectUnionCompositePointerParameters { + regular: ObjectUnionCompositePointer; + nullable: ObjectUnionCompositePointer | null; + optional: ObjectUnionCompositePointer | undefined; + faint: ObjectUnionCompositePointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionDouble.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionDouble.ts new file mode 100644 index 0000000000..ef0b8c44e0 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_parameters_3_1_ObjectUnionDouble = _test_llm_parameters({ + model: "3.1", + name: "ObjectUnionDouble", +})(typia.llm.parameters()); + +interface ObjectUnionDoubleParameters { + regular: ObjectUnionDouble; + nullable: ObjectUnionDouble | null; + optional: ObjectUnionDouble | undefined; + faint: ObjectUnionDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionExplicit.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..993bfb8188 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionExplicit.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_parameters_3_1_ObjectUnionExplicit = _test_llm_parameters( + { + model: "3.1", + name: "ObjectUnionExplicit", + }, +)(typia.llm.parameters()); + +interface ObjectUnionExplicitParameters { + regular: ObjectUnionExplicit; + nullable: ObjectUnionExplicit | null; + optional: ObjectUnionExplicit | undefined; + faint: ObjectUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionExplicitPointer.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..1f07e6fcc6 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionExplicitPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_parameters_3_1_ObjectUnionExplicitPointer = + _test_llm_parameters({ + model: "3.1", + name: "ObjectUnionExplicitPointer", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitPointerParameters { + regular: ObjectUnionExplicitPointer; + nullable: ObjectUnionExplicitPointer | null; + optional: ObjectUnionExplicitPointer | undefined; + faint: ObjectUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionImplicit.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..a38f4fd670 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionImplicit.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_parameters_3_1_ObjectUnionImplicit = _test_llm_parameters( + { + model: "3.1", + name: "ObjectUnionImplicit", + }, +)(typia.llm.parameters()); + +interface ObjectUnionImplicitParameters { + regular: ObjectUnionImplicit; + nullable: ObjectUnionImplicit | null; + optional: ObjectUnionImplicit | undefined; + faint: ObjectUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionNonPredictable.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..8426705e1e --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ObjectUnionNonPredictable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_parameters_3_1_ObjectUnionNonPredictable = + _test_llm_parameters({ + model: "3.1", + name: "ObjectUnionNonPredictable", + })(typia.llm.parameters()); + +interface ObjectUnionNonPredictableParameters { + regular: ObjectUnionNonPredictable; + nullable: ObjectUnionNonPredictable | null; + optional: ObjectUnionNonPredictable | undefined; + faint: ObjectUnionNonPredictable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateAtomic.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateAtomic.ts new file mode 100644 index 0000000000..77207ae0e8 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateAtomic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_parameters_3_1_TemplateAtomic = _test_llm_parameters({ + model: "3.1", + name: "TemplateAtomic", +})(typia.llm.parameters()); + +interface TemplateAtomicParameters { + regular: TemplateAtomic; + nullable: TemplateAtomic | null; + optional: TemplateAtomic | undefined; + faint: TemplateAtomic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateConstant.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateConstant.ts new file mode 100644 index 0000000000..8543a8dc06 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_parameters_3_1_TemplateConstant = _test_llm_parameters({ + model: "3.1", + name: "TemplateConstant", +})(typia.llm.parameters()); + +interface TemplateConstantParameters { + regular: TemplateConstant; + nullable: TemplateConstant | null; + optional: TemplateConstant | undefined; + faint: TemplateConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateUnion.ts new file mode 100644 index 0000000000..5bab9e7e6f --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TemplateUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_parameters_3_1_TemplateUnion = _test_llm_parameters({ + model: "3.1", + name: "TemplateUnion", +})(typia.llm.parameters()); + +interface TemplateUnionParameters { + regular: TemplateUnion; + nullable: TemplateUnion | null; + optional: TemplateUnion | undefined; + faint: TemplateUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonAtomicUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..3de1a1f955 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonAtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_parameters_3_1_ToJsonAtomicUnion = _test_llm_parameters({ + model: "3.1", + name: "ToJsonAtomicUnion", +})(typia.llm.parameters()); + +interface ToJsonAtomicUnionParameters { + regular: ToJsonAtomicUnion; + nullable: ToJsonAtomicUnion | null; + optional: ToJsonAtomicUnion | undefined; + faint: ToJsonAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonDouble.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonDouble.ts new file mode 100644 index 0000000000..867d2d63f8 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_parameters_3_1_ToJsonDouble = _test_llm_parameters({ + model: "3.1", + name: "ToJsonDouble", +})(typia.llm.parameters()); + +interface ToJsonDoubleParameters { + regular: ToJsonDouble; + nullable: ToJsonDouble | null; + optional: ToJsonDouble | undefined; + faint: ToJsonDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonNull.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonNull.ts new file mode 100644 index 0000000000..fc4c044bb1 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonNull.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_parameters_3_1_ToJsonNull = _test_llm_parameters({ + model: "3.1", + name: "ToJsonNull", +})(typia.llm.parameters()); + +interface ToJsonNullParameters { + regular: ToJsonNull; + nullable: ToJsonNull | null; + optional: ToJsonNull | undefined; + faint: ToJsonNull | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonUnion.ts new file mode 100644 index 0000000000..fd7528286e --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_ToJsonUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_parameters_3_1_ToJsonUnion = _test_llm_parameters({ + model: "3.1", + name: "ToJsonUnion", +})(typia.llm.parameters()); + +interface ToJsonUnionParameters { + regular: ToJsonUnion; + nullable: ToJsonUnion | null; + optional: ToJsonUnion | undefined; + faint: ToJsonUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagArray.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagArray.ts new file mode 100644 index 0000000000..7282a07f05 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_parameters_3_1_TypeTagArray = _test_llm_parameters({ + model: "3.1", + name: "TypeTagArray", +})(typia.llm.parameters()); + +interface TypeTagArrayParameters { + regular: TypeTagArray; + nullable: TypeTagArray | null; + optional: TypeTagArray | undefined; + faint: TypeTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagArrayUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..3d45cf8c7b --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_parameters_3_1_TypeTagArrayUnion = _test_llm_parameters({ + model: "3.1", + name: "TypeTagArrayUnion", +})(typia.llm.parameters()); + +interface TypeTagArrayUnionParameters { + regular: TypeTagArrayUnion; + nullable: TypeTagArrayUnion | null; + optional: TypeTagArrayUnion | undefined; + faint: TypeTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagAtomicUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..ec8dac7aed --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagAtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_parameters_3_1_TypeTagAtomicUnion = _test_llm_parameters({ + model: "3.1", + name: "TypeTagAtomicUnion", +})(typia.llm.parameters()); + +interface TypeTagAtomicUnionParameters { + regular: TypeTagAtomicUnion; + nullable: TypeTagAtomicUnion | null; + optional: TypeTagAtomicUnion | undefined; + faint: TypeTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagCustom.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagCustom.ts new file mode 100644 index 0000000000..a42627091b --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagCustom.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_parameters_3_1_TypeTagCustom = _test_llm_parameters({ + model: "3.1", + name: "TypeTagCustom", +})(typia.llm.parameters()); + +interface TypeTagCustomParameters { + regular: TypeTagCustom; + nullable: TypeTagCustom | null; + optional: TypeTagCustom | undefined; + faint: TypeTagCustom | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagDefault.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagDefault.ts new file mode 100644 index 0000000000..65ad0d2a9e --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_parameters_3_1_TypeTagDefault = _test_llm_parameters({ + model: "3.1", + name: "TypeTagDefault", +})(typia.llm.parameters()); + +interface TypeTagDefaultParameters { + regular: TypeTagDefault; + nullable: TypeTagDefault | null; + optional: TypeTagDefault | undefined; + faint: TypeTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagFormat.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagFormat.ts new file mode 100644 index 0000000000..4201f362dd --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_parameters_3_1_TypeTagFormat = _test_llm_parameters({ + model: "3.1", + name: "TypeTagFormat", +})(typia.llm.parameters()); + +interface TypeTagFormatParameters { + regular: TypeTagFormat; + nullable: TypeTagFormat | null; + optional: TypeTagFormat | undefined; + faint: TypeTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagLength.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagLength.ts new file mode 100644 index 0000000000..002671c941 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_parameters_3_1_TypeTagLength = _test_llm_parameters({ + model: "3.1", + name: "TypeTagLength", +})(typia.llm.parameters()); + +interface TypeTagLengthParameters { + regular: TypeTagLength; + nullable: TypeTagLength | null; + optional: TypeTagLength | undefined; + faint: TypeTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagMatrix.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagMatrix.ts new file mode 100644 index 0000000000..64b5dfcac1 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_parameters_3_1_TypeTagMatrix = _test_llm_parameters({ + model: "3.1", + name: "TypeTagMatrix", +})(typia.llm.parameters()); + +interface TypeTagMatrixParameters { + regular: TypeTagMatrix; + nullable: TypeTagMatrix | null; + optional: TypeTagMatrix | undefined; + faint: TypeTagMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagObjectUnion.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..5eba8e2098 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagObjectUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_parameters_3_1_TypeTagObjectUnion = _test_llm_parameters({ + model: "3.1", + name: "TypeTagObjectUnion", +})(typia.llm.parameters()); + +interface TypeTagObjectUnionParameters { + regular: TypeTagObjectUnion; + nullable: TypeTagObjectUnion | null; + optional: TypeTagObjectUnion | undefined; + faint: TypeTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagPattern.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagPattern.ts new file mode 100644 index 0000000000..2a30592826 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_parameters_3_1_TypeTagPattern = _test_llm_parameters({ + model: "3.1", + name: "TypeTagPattern", +})(typia.llm.parameters()); + +interface TypeTagPatternParameters { + regular: TypeTagPattern; + nullable: TypeTagPattern | null; + optional: TypeTagPattern | undefined; + faint: TypeTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagRange.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagRange.ts new file mode 100644 index 0000000000..bbc20e4d03 --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_parameters_3_1_TypeTagRange = _test_llm_parameters({ + model: "3.1", + name: "TypeTagRange", +})(typia.llm.parameters()); + +interface TypeTagRangeParameters { + regular: TypeTagRange; + nullable: TypeTagRange | null; + optional: TypeTagRange | undefined; + faint: TypeTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagType.ts b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagType.ts new file mode 100644 index 0000000000..ba6d88474c --- /dev/null +++ b/test/src/features/llm.parameters/3.1/test_llm_parameters_3_1_TypeTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_parameters_3_1_TypeTagType = _test_llm_parameters({ + model: "3.1", + name: "TypeTagType", +})(typia.llm.parameters()); + +interface TypeTagTypeParameters { + regular: TypeTagType; + nullable: TypeTagType | null; + optional: TypeTagType | undefined; + faint: TypeTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayAny.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayAny.ts new file mode 100644 index 0000000000..9699f55790 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayAny.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_parameters_chatgpt_ArrayAny = _test_llm_parameters({ + model: "chatgpt", + name: "ArrayAny", +})(typia.llm.parameters()); + +interface ArrayAnyParameters { + regular: ArrayAny; + nullable: ArrayAny | null; + optional: ArrayAny | undefined; + faint: ArrayAny | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayHierarchical.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayHierarchical.ts new file mode 100644 index 0000000000..2370617fcf --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayHierarchical.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_parameters_chatgpt_ArrayHierarchical = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayHierarchical", + })(typia.llm.parameters()); + +interface ArrayHierarchicalParameters { + regular: ArrayHierarchical; + nullable: ArrayHierarchical | null; + optional: ArrayHierarchical | undefined; + faint: ArrayHierarchical | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayHierarchicalPointer.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..e2048c9810 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayHierarchicalPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_parameters_chatgpt_ArrayHierarchicalPointer = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayHierarchicalPointer", + })(typia.llm.parameters()); + +interface ArrayHierarchicalPointerParameters { + regular: ArrayHierarchicalPointer; + nullable: ArrayHierarchicalPointer | null; + optional: ArrayHierarchicalPointer | undefined; + faint: ArrayHierarchicalPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayMatrix.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayMatrix.ts new file mode 100644 index 0000000000..facc25e245 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_parameters_chatgpt_ArrayMatrix = _test_llm_parameters({ + model: "chatgpt", + name: "ArrayMatrix", +})(typia.llm.parameters()); + +interface ArrayMatrixParameters { + regular: ArrayMatrix; + nullable: ArrayMatrix | null; + optional: ArrayMatrix | undefined; + faint: ArrayMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursive.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursive.ts new file mode 100644 index 0000000000..401758686d --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_parameters_chatgpt_ArrayRecursive = _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRecursive", +})(typia.llm.parameters()); + +interface ArrayRecursiveParameters { + regular: ArrayRecursive; + nullable: ArrayRecursive | null; + optional: ArrayRecursive | undefined; + faint: ArrayRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..bdec1a8b48 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicit = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionExplicitParameters { + regular: ArrayRecursiveUnionExplicit; + nullable: ArrayRecursiveUnionExplicit | null; + optional: ArrayRecursiveUnionExplicit | undefined; + faint: ArrayRecursiveUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..8c3b20ca4a --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_parameters_chatgpt_ArrayRecursiveUnionExplicitPointer = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.parameters< + ArrayRecursiveUnionExplicitPointerParameters, + "chatgpt" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerParameters { + regular: ArrayRecursiveUnionExplicitPointer; + nullable: ArrayRecursiveUnionExplicitPointer | null; + optional: ArrayRecursiveUnionExplicitPointer | undefined; + faint: ArrayRecursiveUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..cf269b7d8b --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_parameters_chatgpt_ArrayRecursiveUnionImplicit = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionImplicitParameters { + regular: ArrayRecursiveUnionImplicit; + nullable: ArrayRecursiveUnionImplicit | null; + optional: ArrayRecursiveUnionImplicit | undefined; + faint: ArrayRecursiveUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedNullable.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..a23f72dc4f --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedNullable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_parameters_chatgpt_ArrayRepeatedNullable = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRepeatedNullable", + })(typia.llm.parameters()); + +interface ArrayRepeatedNullableParameters { + regular: ArrayRepeatedNullable; + nullable: ArrayRepeatedNullable | null; + optional: ArrayRepeatedNullable | undefined; + faint: ArrayRepeatedNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedRequired.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..654d08a05c --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_parameters_chatgpt_ArrayRepeatedRequired = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRepeatedRequired", + })(typia.llm.parameters()); + +interface ArrayRepeatedRequiredParameters { + regular: ArrayRepeatedRequired; + nullable: ArrayRepeatedRequired | null; + optional: ArrayRepeatedRequired | undefined; + faint: ArrayRepeatedRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..c3a894d234 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayRepeatedUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_parameters_chatgpt_ArrayRepeatedUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "ArrayRepeatedUnion", + })(typia.llm.parameters()); + +interface ArrayRepeatedUnionParameters { + regular: ArrayRepeatedUnion; + nullable: ArrayRepeatedUnion | null; + optional: ArrayRepeatedUnion | undefined; + faint: ArrayRepeatedUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArraySimple.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArraySimple.ts new file mode 100644 index 0000000000..1fca91ec3f --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArraySimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_parameters_chatgpt_ArraySimple = _test_llm_parameters({ + model: "chatgpt", + name: "ArraySimple", +})(typia.llm.parameters()); + +interface ArraySimpleParameters { + regular: ArraySimple; + nullable: ArraySimple | null; + optional: ArraySimple | undefined; + faint: ArraySimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayUnion.ts new file mode 100644 index 0000000000..9cd8a3abb7 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_parameters_chatgpt_ArrayUnion = _test_llm_parameters({ + model: "chatgpt", + name: "ArrayUnion", +})(typia.llm.parameters()); + +interface ArrayUnionParameters { + regular: ArrayUnion; + nullable: ArrayUnion | null; + optional: ArrayUnion | undefined; + faint: ArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_AtomicUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_AtomicUnion.ts new file mode 100644 index 0000000000..a6cc5c6ffd --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_AtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_parameters_chatgpt_AtomicUnion = _test_llm_parameters({ + model: "chatgpt", + name: "AtomicUnion", +})(typia.llm.parameters()); + +interface AtomicUnionParameters { + regular: AtomicUnion; + nullable: AtomicUnion | null; + optional: AtomicUnion | undefined; + faint: AtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassGetter.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassGetter.ts new file mode 100644 index 0000000000..17bbee78e6 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassGetter.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_parameters_chatgpt_ClassGetter = _test_llm_parameters({ + model: "chatgpt", + name: "ClassGetter", +})(typia.llm.parameters()); + +interface ClassGetterParameters { + regular: ClassGetter; + nullable: ClassGetter | null; + optional: ClassGetter | undefined; + faint: ClassGetter | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassMethod.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassMethod.ts new file mode 100644 index 0000000000..02ae1da181 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassMethod.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_parameters_chatgpt_ClassMethod = _test_llm_parameters({ + model: "chatgpt", + name: "ClassMethod", +})(typia.llm.parameters()); + +interface ClassMethodParameters { + regular: ClassMethod; + nullable: ClassMethod | null; + optional: ClassMethod | undefined; + faint: ClassMethod | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassPropertyAssignment.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..9fe14a6899 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ClassPropertyAssignment.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_parameters_chatgpt_ClassPropertyAssignment = + _test_llm_parameters({ + model: "chatgpt", + name: "ClassPropertyAssignment", + })(typia.llm.parameters()); + +interface ClassPropertyAssignmentParameters { + regular: ClassPropertyAssignment; + nullable: ClassPropertyAssignment | null; + optional: ClassPropertyAssignment | undefined; + faint: ClassPropertyAssignment | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagArray.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagArray.ts new file mode 100644 index 0000000000..1f221e7a36 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagArray.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_parameters_chatgpt_CommentTagArray = _test_llm_parameters( + { + model: "chatgpt", + name: "CommentTagArray", + }, +)(typia.llm.parameters()); + +interface CommentTagArrayParameters { + regular: CommentTagArray; + nullable: CommentTagArray | null; + optional: CommentTagArray | undefined; + faint: CommentTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagArrayUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..9e4e2e50e1 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_parameters_chatgpt_CommentTagArrayUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagArrayUnion", + })(typia.llm.parameters()); + +interface CommentTagArrayUnionParameters { + regular: CommentTagArrayUnion; + nullable: CommentTagArrayUnion | null; + optional: CommentTagArrayUnion | undefined; + faint: CommentTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagAtomicUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..b0bfa46ccb --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_parameters_chatgpt_CommentTagAtomicUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagAtomicUnion", + })(typia.llm.parameters()); + +interface CommentTagAtomicUnionParameters { + regular: CommentTagAtomicUnion; + nullable: CommentTagAtomicUnion | null; + optional: CommentTagAtomicUnion | undefined; + faint: CommentTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagDefault.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagDefault.ts new file mode 100644 index 0000000000..50651f9997 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagDefault.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_parameters_chatgpt_CommentTagDefault = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagDefault", + })(typia.llm.parameters()); + +interface CommentTagDefaultParameters { + regular: CommentTagDefault; + nullable: CommentTagDefault | null; + optional: CommentTagDefault | undefined; + faint: CommentTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagFormat.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagFormat.ts new file mode 100644 index 0000000000..252c84d90b --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagFormat.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_parameters_chatgpt_CommentTagFormat = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagFormat", + })(typia.llm.parameters()); + +interface CommentTagFormatParameters { + regular: CommentTagFormat; + nullable: CommentTagFormat | null; + optional: CommentTagFormat | undefined; + faint: CommentTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagLength.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagLength.ts new file mode 100644 index 0000000000..8e483dc9e0 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagLength.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_parameters_chatgpt_CommentTagLength = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagLength", + })(typia.llm.parameters()); + +interface CommentTagLengthParameters { + regular: CommentTagLength; + nullable: CommentTagLength | null; + optional: CommentTagLength | undefined; + faint: CommentTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagObjectUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..1840d39738 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_parameters_chatgpt_CommentTagObjectUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagObjectUnion", + })(typia.llm.parameters()); + +interface CommentTagObjectUnionParameters { + regular: CommentTagObjectUnion; + nullable: CommentTagObjectUnion | null; + optional: CommentTagObjectUnion | undefined; + faint: CommentTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagPattern.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagPattern.ts new file mode 100644 index 0000000000..7e4fae6676 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagPattern.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_parameters_chatgpt_CommentTagPattern = + _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagPattern", + })(typia.llm.parameters()); + +interface CommentTagPatternParameters { + regular: CommentTagPattern; + nullable: CommentTagPattern | null; + optional: CommentTagPattern | undefined; + faint: CommentTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagRange.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagRange.ts new file mode 100644 index 0000000000..b7f1b9b897 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagRange.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_parameters_chatgpt_CommentTagRange = _test_llm_parameters( + { + model: "chatgpt", + name: "CommentTagRange", + }, +)(typia.llm.parameters()); + +interface CommentTagRangeParameters { + regular: CommentTagRange; + nullable: CommentTagRange | null; + optional: CommentTagRange | undefined; + faint: CommentTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagType.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagType.ts new file mode 100644 index 0000000000..0d3625913a --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_CommentTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_parameters_chatgpt_CommentTagType = _test_llm_parameters({ + model: "chatgpt", + name: "CommentTagType", +})(typia.llm.parameters()); + +interface CommentTagTypeParameters { + regular: CommentTagType; + nullable: CommentTagType | null; + optional: CommentTagType | undefined; + faint: CommentTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicAbsorbed.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..87aadbc47d --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicAbsorbed.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_parameters_chatgpt_ConstantAtomicAbsorbed = + _test_llm_parameters({ + model: "chatgpt", + name: "ConstantAtomicAbsorbed", + })(typia.llm.parameters()); + +interface ConstantAtomicAbsorbedParameters { + regular: ConstantAtomicAbsorbed; + nullable: ConstantAtomicAbsorbed | null; + optional: ConstantAtomicAbsorbed | undefined; + faint: ConstantAtomicAbsorbed | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicTagged.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..a6a5c693e7 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicTagged.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_parameters_chatgpt_ConstantAtomicTagged = + _test_llm_parameters({ + model: "chatgpt", + name: "ConstantAtomicTagged", + })(typia.llm.parameters()); + +interface ConstantAtomicTaggedParameters { + regular: ConstantAtomicTagged; + nullable: ConstantAtomicTagged | null; + optional: ConstantAtomicTagged | undefined; + faint: ConstantAtomicTagged | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..613d389625 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_parameters_chatgpt_ConstantAtomicUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "ConstantAtomicUnion", + })(typia.llm.parameters()); + +interface ConstantAtomicUnionParameters { + regular: ConstantAtomicUnion; + nullable: ConstantAtomicUnion | null; + optional: ConstantAtomicUnion | undefined; + faint: ConstantAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantConstEnumeration.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..e4753b59c0 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantConstEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_parameters_chatgpt_ConstantConstEnumeration = + _test_llm_parameters({ + model: "chatgpt", + name: "ConstantConstEnumeration", + })(typia.llm.parameters()); + +interface ConstantConstEnumerationParameters { + regular: ConstantConstEnumeration; + nullable: ConstantConstEnumeration | null; + optional: ConstantConstEnumeration | undefined; + faint: ConstantConstEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantEnumeration.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantEnumeration.ts new file mode 100644 index 0000000000..7e3b87cd41 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ConstantEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_parameters_chatgpt_ConstantEnumeration = + _test_llm_parameters({ + model: "chatgpt", + name: "ConstantEnumeration", + })(typia.llm.parameters()); + +interface ConstantEnumerationParameters { + regular: ConstantEnumeration; + nullable: ConstantEnumeration | null; + optional: ConstantEnumeration | undefined; + faint: ConstantEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicConstant.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicConstant.ts new file mode 100644 index 0000000000..4a6af5cad2 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicConstant.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_parameters_chatgpt_DynamicConstant = _test_llm_parameters( + { + model: "chatgpt", + name: "DynamicConstant", + }, +)(typia.llm.parameters()); + +interface DynamicConstantParameters { + regular: DynamicConstant; + nullable: DynamicConstant | null; + optional: DynamicConstant | undefined; + faint: DynamicConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicEnumeration.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicEnumeration.ts new file mode 100644 index 0000000000..eecc8e1e17 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_parameters_chatgpt_DynamicEnumeration = + _test_llm_parameters({ + model: "chatgpt", + name: "DynamicEnumeration", + })(typia.llm.parameters()); + +interface DynamicEnumerationParameters { + regular: DynamicEnumeration; + nullable: DynamicEnumeration | null; + optional: DynamicEnumeration | undefined; + faint: DynamicEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicNever.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicNever.ts new file mode 100644 index 0000000000..0e70cdf5c6 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicNever.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_parameters_chatgpt_DynamicNever = _test_llm_parameters({ + model: "chatgpt", + name: "DynamicNever", +})(typia.llm.parameters()); + +interface DynamicNeverParameters { + regular: DynamicNever; + nullable: DynamicNever | null; + optional: DynamicNever | undefined; + faint: DynamicNever | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicUndefined.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicUndefined.ts new file mode 100644 index 0000000000..8ee1e27456 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_DynamicUndefined.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_parameters_chatgpt_DynamicUndefined = + _test_llm_parameters({ + model: "chatgpt", + name: "DynamicUndefined", + })(typia.llm.parameters()); + +interface DynamicUndefinedParameters { + regular: DynamicUndefined; + nullable: DynamicUndefined | null; + optional: DynamicUndefined | undefined; + faint: DynamicUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectAlias.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectAlias.ts new file mode 100644 index 0000000000..65def82b8a --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_parameters_chatgpt_ObjectAlias = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectAlias", +})(typia.llm.parameters()); + +interface ObjectAliasParameters { + regular: ObjectAlias; + nullable: ObjectAlias | null; + optional: ObjectAlias | undefined; + faint: ObjectAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectDate.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectDate.ts new file mode 100644 index 0000000000..ad02f76ad1 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectDate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_parameters_chatgpt_ObjectDate = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectDate", +})(typia.llm.parameters()); + +interface ObjectDateParameters { + regular: ObjectDate; + nullable: ObjectDate | null; + optional: ObjectDate | undefined; + faint: ObjectDate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectDescription.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectDescription.ts new file mode 100644 index 0000000000..ce39385d91 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectDescription.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_parameters_chatgpt_ObjectDescription = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectDescription", + })(typia.llm.parameters()); + +interface ObjectDescriptionParameters { + regular: ObjectDescription; + nullable: ObjectDescription | null; + optional: ObjectDescription | undefined; + faint: ObjectDescription | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericAlias.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericAlias.ts new file mode 100644 index 0000000000..ab49eb5c1e --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericAlias.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_parameters_chatgpt_ObjectGenericAlias = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectGenericAlias", + })(typia.llm.parameters()); + +interface ObjectGenericAliasParameters { + regular: ObjectGenericAlias; + nullable: ObjectGenericAlias | null; + optional: ObjectGenericAlias | undefined; + faint: ObjectGenericAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericArray.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericArray.ts new file mode 100644 index 0000000000..0b3b95e065 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericArray.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_parameters_chatgpt_ObjectGenericArray = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectGenericArray", + })(typia.llm.parameters()); + +interface ObjectGenericArrayParameters { + regular: ObjectGenericArray; + nullable: ObjectGenericArray | null; + optional: ObjectGenericArray | undefined; + faint: ObjectGenericArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericUnion.ts new file mode 100644 index 0000000000..e9a9722808 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectGenericUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_parameters_chatgpt_ObjectGenericUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectGenericUnion", + })(typia.llm.parameters()); + +interface ObjectGenericUnionParameters { + regular: ObjectGenericUnion; + nullable: ObjectGenericUnion | null; + optional: ObjectGenericUnion | undefined; + faint: ObjectGenericUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectInternal.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectInternal.ts new file mode 100644 index 0000000000..304cc81022 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectInternal.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_parameters_chatgpt_ObjectInternal = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectInternal", +})(typia.llm.parameters()); + +interface ObjectInternalParameters { + regular: ObjectInternal; + nullable: ObjectInternal | null; + optional: ObjectInternal | undefined; + faint: ObjectInternal | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectIntersection.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectIntersection.ts new file mode 100644 index 0000000000..330ae07e78 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectIntersection.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_parameters_chatgpt_ObjectIntersection = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectIntersection", + })(typia.llm.parameters()); + +interface ObjectIntersectionParameters { + regular: ObjectIntersection; + nullable: ObjectIntersection | null; + optional: ObjectIntersection | undefined; + faint: ObjectIntersection | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectJsonTag.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectJsonTag.ts new file mode 100644 index 0000000000..d40a1bd86e --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectJsonTag.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_parameters_chatgpt_ObjectJsonTag = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectJsonTag", +})(typia.llm.parameters()); + +interface ObjectJsonTagParameters { + regular: ObjectJsonTag; + nullable: ObjectJsonTag | null; + optional: ObjectJsonTag | undefined; + faint: ObjectJsonTag | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectLiteralProperty.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..7988830313 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectLiteralProperty.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_parameters_chatgpt_ObjectLiteralProperty = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectLiteralProperty", + })(typia.llm.parameters()); + +interface ObjectLiteralPropertyParameters { + regular: ObjectLiteralProperty; + nullable: ObjectLiteralProperty | null; + optional: ObjectLiteralProperty | undefined; + faint: ObjectLiteralProperty | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectLiteralType.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectLiteralType.ts new file mode 100644 index 0000000000..f40f8ab09e --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectLiteralType.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_parameters_chatgpt_ObjectLiteralType = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectLiteralType", + })(typia.llm.parameters()); + +interface ObjectLiteralTypeParameters { + regular: ObjectLiteralType; + nullable: ObjectLiteralType | null; + optional: ObjectLiteralType | undefined; + faint: ObjectLiteralType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectNullable.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectNullable.ts new file mode 100644 index 0000000000..c78be2007a --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectNullable.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_parameters_chatgpt_ObjectNullable = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectNullable", +})(typia.llm.parameters()); + +interface ObjectNullableParameters { + regular: ObjectNullable; + nullable: ObjectNullable | null; + optional: ObjectNullable | undefined; + faint: ObjectNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectOptional.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectOptional.ts new file mode 100644 index 0000000000..68f72a279f --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectOptional.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_parameters_chatgpt_ObjectOptional = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectOptional", +})(typia.llm.parameters()); + +interface ObjectOptionalParameters { + regular: ObjectOptional; + nullable: ObjectOptional | null; + optional: ObjectOptional | undefined; + faint: ObjectOptional | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPartial.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPartial.ts new file mode 100644 index 0000000000..5b3af59606 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPartial.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_parameters_chatgpt_ObjectPartial = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectPartial", +})(typia.llm.parameters()); + +interface ObjectPartialParameters { + regular: ObjectPartial; + nullable: ObjectPartial | null; + optional: ObjectPartial | undefined; + faint: ObjectPartial | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPartialAndRequired.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..ee60cb0991 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPartialAndRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_parameters_chatgpt_ObjectPartialAndRequired = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectPartialAndRequired", + })(typia.llm.parameters()); + +interface ObjectPartialAndRequiredParameters { + regular: ObjectPartialAndRequired; + nullable: ObjectPartialAndRequired | null; + optional: ObjectPartialAndRequired | undefined; + faint: ObjectPartialAndRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPrimitive.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPrimitive.ts new file mode 100644 index 0000000000..3df6bdb077 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectPrimitive.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_parameters_chatgpt_ObjectPrimitive = _test_llm_parameters( + { + model: "chatgpt", + name: "ObjectPrimitive", + }, +)(typia.llm.parameters()); + +interface ObjectPrimitiveParameters { + regular: ObjectPrimitive; + nullable: ObjectPrimitive | null; + optional: ObjectPrimitive | undefined; + faint: ObjectPrimitive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectRecursive.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectRecursive.ts new file mode 100644 index 0000000000..4fe8c13fe6 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectRecursive.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_parameters_chatgpt_ObjectRecursive = _test_llm_parameters( + { + model: "chatgpt", + name: "ObjectRecursive", + }, +)(typia.llm.parameters()); + +interface ObjectRecursiveParameters { + regular: ObjectRecursive; + nullable: ObjectRecursive | null; + optional: ObjectRecursive | undefined; + faint: ObjectRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectRequired.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectRequired.ts new file mode 100644 index 0000000000..d91c288838 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectRequired.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_parameters_chatgpt_ObjectRequired = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectRequired", +})(typia.llm.parameters()); + +interface ObjectRequiredParameters { + regular: ObjectRequired; + nullable: ObjectRequired | null; + optional: ObjectRequired | undefined; + faint: ObjectRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectSimple.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectSimple.ts new file mode 100644 index 0000000000..3463e3c6d5 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_parameters_chatgpt_ObjectSimple = _test_llm_parameters({ + model: "chatgpt", + name: "ObjectSimple", +})(typia.llm.parameters()); + +interface ObjectSimpleParameters { + regular: ObjectSimple; + nullable: ObjectSimple | null; + optional: ObjectSimple | undefined; + faint: ObjectSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUndefined.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUndefined.ts new file mode 100644 index 0000000000..44379372c8 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUndefined.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_parameters_chatgpt_ObjectUndefined = _test_llm_parameters( + { + model: "chatgpt", + name: "ObjectUndefined", + }, +)(typia.llm.parameters()); + +interface ObjectUndefinedParameters { + regular: ObjectUndefined; + nullable: ObjectUndefined | null; + optional: ObjectUndefined | undefined; + faint: ObjectUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionComposite.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionComposite.ts new file mode 100644 index 0000000000..f4b23ba240 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionComposite.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_parameters_chatgpt_ObjectUnionComposite = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionComposite", + })(typia.llm.parameters()); + +interface ObjectUnionCompositeParameters { + regular: ObjectUnionComposite; + nullable: ObjectUnionComposite | null; + optional: ObjectUnionComposite | undefined; + faint: ObjectUnionComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionCompositePointer.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..e1a4da840c --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionCompositePointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_parameters_chatgpt_ObjectUnionCompositePointer = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionCompositePointer", + })(typia.llm.parameters()); + +interface ObjectUnionCompositePointerParameters { + regular: ObjectUnionCompositePointer; + nullable: ObjectUnionCompositePointer | null; + optional: ObjectUnionCompositePointer | undefined; + faint: ObjectUnionCompositePointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionDouble.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionDouble.ts new file mode 100644 index 0000000000..6caa309e41 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionDouble.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_parameters_chatgpt_ObjectUnionDouble = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionDouble", + })(typia.llm.parameters()); + +interface ObjectUnionDoubleParameters { + regular: ObjectUnionDouble; + nullable: ObjectUnionDouble | null; + optional: ObjectUnionDouble | undefined; + faint: ObjectUnionDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionExplicit.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..2be65dd3cb --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_parameters_chatgpt_ObjectUnionExplicit = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionExplicit", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitParameters { + regular: ObjectUnionExplicit; + nullable: ObjectUnionExplicit | null; + optional: ObjectUnionExplicit | undefined; + faint: ObjectUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionExplicitPointer.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..8a87a0a42b --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionExplicitPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_parameters_chatgpt_ObjectUnionExplicitPointer = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionExplicitPointer", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitPointerParameters { + regular: ObjectUnionExplicitPointer; + nullable: ObjectUnionExplicitPointer | null; + optional: ObjectUnionExplicitPointer | undefined; + faint: ObjectUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionImplicit.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..5d50720c10 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_parameters_chatgpt_ObjectUnionImplicit = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionImplicit", + })(typia.llm.parameters()); + +interface ObjectUnionImplicitParameters { + regular: ObjectUnionImplicit; + nullable: ObjectUnionImplicit | null; + optional: ObjectUnionImplicit | undefined; + faint: ObjectUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionNonPredictable.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..572613ed88 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ObjectUnionNonPredictable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_parameters_chatgpt_ObjectUnionNonPredictable = + _test_llm_parameters({ + model: "chatgpt", + name: "ObjectUnionNonPredictable", + })(typia.llm.parameters()); + +interface ObjectUnionNonPredictableParameters { + regular: ObjectUnionNonPredictable; + nullable: ObjectUnionNonPredictable | null; + optional: ObjectUnionNonPredictable | undefined; + faint: ObjectUnionNonPredictable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateAtomic.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateAtomic.ts new file mode 100644 index 0000000000..fa746d73c6 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateAtomic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_parameters_chatgpt_TemplateAtomic = _test_llm_parameters({ + model: "chatgpt", + name: "TemplateAtomic", +})(typia.llm.parameters()); + +interface TemplateAtomicParameters { + regular: TemplateAtomic; + nullable: TemplateAtomic | null; + optional: TemplateAtomic | undefined; + faint: TemplateAtomic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateConstant.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateConstant.ts new file mode 100644 index 0000000000..2b57e9cb7b --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateConstant.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_parameters_chatgpt_TemplateConstant = + _test_llm_parameters({ + model: "chatgpt", + name: "TemplateConstant", + })(typia.llm.parameters()); + +interface TemplateConstantParameters { + regular: TemplateConstant; + nullable: TemplateConstant | null; + optional: TemplateConstant | undefined; + faint: TemplateConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateUnion.ts new file mode 100644 index 0000000000..c685a1bcdc --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TemplateUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_parameters_chatgpt_TemplateUnion = _test_llm_parameters({ + model: "chatgpt", + name: "TemplateUnion", +})(typia.llm.parameters()); + +interface TemplateUnionParameters { + regular: TemplateUnion; + nullable: TemplateUnion | null; + optional: TemplateUnion | undefined; + faint: TemplateUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonAtomicUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..218f67fab2 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_parameters_chatgpt_ToJsonAtomicUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "ToJsonAtomicUnion", + })(typia.llm.parameters()); + +interface ToJsonAtomicUnionParameters { + regular: ToJsonAtomicUnion; + nullable: ToJsonAtomicUnion | null; + optional: ToJsonAtomicUnion | undefined; + faint: ToJsonAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonDouble.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonDouble.ts new file mode 100644 index 0000000000..e25692bcec --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_parameters_chatgpt_ToJsonDouble = _test_llm_parameters({ + model: "chatgpt", + name: "ToJsonDouble", +})(typia.llm.parameters()); + +interface ToJsonDoubleParameters { + regular: ToJsonDouble; + nullable: ToJsonDouble | null; + optional: ToJsonDouble | undefined; + faint: ToJsonDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonNull.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonNull.ts new file mode 100644 index 0000000000..742c3f3d60 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonNull.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_parameters_chatgpt_ToJsonNull = _test_llm_parameters({ + model: "chatgpt", + name: "ToJsonNull", +})(typia.llm.parameters()); + +interface ToJsonNullParameters { + regular: ToJsonNull; + nullable: ToJsonNull | null; + optional: ToJsonNull | undefined; + faint: ToJsonNull | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonUnion.ts new file mode 100644 index 0000000000..1318b76bd7 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_ToJsonUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_parameters_chatgpt_ToJsonUnion = _test_llm_parameters({ + model: "chatgpt", + name: "ToJsonUnion", +})(typia.llm.parameters()); + +interface ToJsonUnionParameters { + regular: ToJsonUnion; + nullable: ToJsonUnion | null; + optional: ToJsonUnion | undefined; + faint: ToJsonUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagArray.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagArray.ts new file mode 100644 index 0000000000..3e2368c208 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_parameters_chatgpt_TypeTagArray = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagArray", +})(typia.llm.parameters()); + +interface TypeTagArrayParameters { + regular: TypeTagArray; + nullable: TypeTagArray | null; + optional: TypeTagArray | undefined; + faint: TypeTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagArrayUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..78ad1ce66b --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_parameters_chatgpt_TypeTagArrayUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagArrayUnion", + })(typia.llm.parameters()); + +interface TypeTagArrayUnionParameters { + regular: TypeTagArrayUnion; + nullable: TypeTagArrayUnion | null; + optional: TypeTagArrayUnion | undefined; + faint: TypeTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagAtomicUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..26057c5c98 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_parameters_chatgpt_TypeTagAtomicUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagAtomicUnion", + })(typia.llm.parameters()); + +interface TypeTagAtomicUnionParameters { + regular: TypeTagAtomicUnion; + nullable: TypeTagAtomicUnion | null; + optional: TypeTagAtomicUnion | undefined; + faint: TypeTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts new file mode 100644 index 0000000000..711594ee67 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagCustom.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_parameters_chatgpt_TypeTagCustom = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagCustom", +})(typia.llm.parameters()); + +interface TypeTagCustomParameters { + regular: TypeTagCustom; + nullable: TypeTagCustom | null; + optional: TypeTagCustom | undefined; + faint: TypeTagCustom | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagDefault.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagDefault.ts new file mode 100644 index 0000000000..089c3f37b7 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_parameters_chatgpt_TypeTagDefault = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagDefault", +})(typia.llm.parameters()); + +interface TypeTagDefaultParameters { + regular: TypeTagDefault; + nullable: TypeTagDefault | null; + optional: TypeTagDefault | undefined; + faint: TypeTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagFormat.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagFormat.ts new file mode 100644 index 0000000000..98ba2f5c3b --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_parameters_chatgpt_TypeTagFormat = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagFormat", +})(typia.llm.parameters()); + +interface TypeTagFormatParameters { + regular: TypeTagFormat; + nullable: TypeTagFormat | null; + optional: TypeTagFormat | undefined; + faint: TypeTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagLength.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagLength.ts new file mode 100644 index 0000000000..84fbee801f --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_parameters_chatgpt_TypeTagLength = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagLength", +})(typia.llm.parameters()); + +interface TypeTagLengthParameters { + regular: TypeTagLength; + nullable: TypeTagLength | null; + optional: TypeTagLength | undefined; + faint: TypeTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagMatrix.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagMatrix.ts new file mode 100644 index 0000000000..7a45d6e65e --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_parameters_chatgpt_TypeTagMatrix = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagMatrix", +})(typia.llm.parameters()); + +interface TypeTagMatrixParameters { + regular: TypeTagMatrix; + nullable: TypeTagMatrix | null; + optional: TypeTagMatrix | undefined; + faint: TypeTagMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagObjectUnion.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..2db9ce04ef --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_parameters_chatgpt_TypeTagObjectUnion = + _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagObjectUnion", + })(typia.llm.parameters()); + +interface TypeTagObjectUnionParameters { + regular: TypeTagObjectUnion; + nullable: TypeTagObjectUnion | null; + optional: TypeTagObjectUnion | undefined; + faint: TypeTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagPattern.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagPattern.ts new file mode 100644 index 0000000000..bd988472fd --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_parameters_chatgpt_TypeTagPattern = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagPattern", +})(typia.llm.parameters()); + +interface TypeTagPatternParameters { + regular: TypeTagPattern; + nullable: TypeTagPattern | null; + optional: TypeTagPattern | undefined; + faint: TypeTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagRange.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagRange.ts new file mode 100644 index 0000000000..ba32dd2822 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_parameters_chatgpt_TypeTagRange = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagRange", +})(typia.llm.parameters()); + +interface TypeTagRangeParameters { + regular: TypeTagRange; + nullable: TypeTagRange | null; + optional: TypeTagRange | undefined; + faint: TypeTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagType.ts b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagType.ts new file mode 100644 index 0000000000..4357170cb6 --- /dev/null +++ b/test/src/features/llm.parameters/chatgpt/test_llm_parameters_chatgpt_TypeTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_parameters_chatgpt_TypeTagType = _test_llm_parameters({ + model: "chatgpt", + name: "TypeTagType", +})(typia.llm.parameters()); + +interface TypeTagTypeParameters { + regular: TypeTagType; + nullable: TypeTagType | null; + optional: TypeTagType | undefined; + faint: TypeTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayAny.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayAny.ts new file mode 100644 index 0000000000..1c394e11a0 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayAny.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_parameters_claude_ArrayAny = _test_llm_parameters({ + model: "claude", + name: "ArrayAny", +})(typia.llm.parameters()); + +interface ArrayAnyParameters { + regular: ArrayAny; + nullable: ArrayAny | null; + optional: ArrayAny | undefined; + faint: ArrayAny | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayHierarchical.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayHierarchical.ts new file mode 100644 index 0000000000..ecda652a28 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayHierarchical.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_parameters_claude_ArrayHierarchical = + _test_llm_parameters({ + model: "claude", + name: "ArrayHierarchical", + })(typia.llm.parameters()); + +interface ArrayHierarchicalParameters { + regular: ArrayHierarchical; + nullable: ArrayHierarchical | null; + optional: ArrayHierarchical | undefined; + faint: ArrayHierarchical | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayHierarchicalPointer.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..817d496c36 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayHierarchicalPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_parameters_claude_ArrayHierarchicalPointer = + _test_llm_parameters({ + model: "claude", + name: "ArrayHierarchicalPointer", + })(typia.llm.parameters()); + +interface ArrayHierarchicalPointerParameters { + regular: ArrayHierarchicalPointer; + nullable: ArrayHierarchicalPointer | null; + optional: ArrayHierarchicalPointer | undefined; + faint: ArrayHierarchicalPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayMatrix.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayMatrix.ts new file mode 100644 index 0000000000..886f0c7c93 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_parameters_claude_ArrayMatrix = _test_llm_parameters({ + model: "claude", + name: "ArrayMatrix", +})(typia.llm.parameters()); + +interface ArrayMatrixParameters { + regular: ArrayMatrix; + nullable: ArrayMatrix | null; + optional: ArrayMatrix | undefined; + faint: ArrayMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursive.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursive.ts new file mode 100644 index 0000000000..372c8c536e --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_parameters_claude_ArrayRecursive = _test_llm_parameters({ + model: "claude", + name: "ArrayRecursive", +})(typia.llm.parameters()); + +interface ArrayRecursiveParameters { + regular: ArrayRecursive; + nullable: ArrayRecursive | null; + optional: ArrayRecursive | undefined; + faint: ArrayRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..c9560942d6 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_parameters_claude_ArrayRecursiveUnionExplicit = + _test_llm_parameters({ + model: "claude", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionExplicitParameters { + regular: ArrayRecursiveUnionExplicit; + nullable: ArrayRecursiveUnionExplicit | null; + optional: ArrayRecursiveUnionExplicit | undefined; + faint: ArrayRecursiveUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..fcc50c00bd --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_parameters_claude_ArrayRecursiveUnionExplicitPointer = + _test_llm_parameters({ + model: "claude", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.parameters< + ArrayRecursiveUnionExplicitPointerParameters, + "claude" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerParameters { + regular: ArrayRecursiveUnionExplicitPointer; + nullable: ArrayRecursiveUnionExplicitPointer | null; + optional: ArrayRecursiveUnionExplicitPointer | undefined; + faint: ArrayRecursiveUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..d9f4fe21ef --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_parameters_claude_ArrayRecursiveUnionImplicit = + _test_llm_parameters({ + model: "claude", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionImplicitParameters { + regular: ArrayRecursiveUnionImplicit; + nullable: ArrayRecursiveUnionImplicit | null; + optional: ArrayRecursiveUnionImplicit | undefined; + faint: ArrayRecursiveUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedNullable.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..3fbaae59a1 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedNullable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_parameters_claude_ArrayRepeatedNullable = + _test_llm_parameters({ + model: "claude", + name: "ArrayRepeatedNullable", + })(typia.llm.parameters()); + +interface ArrayRepeatedNullableParameters { + regular: ArrayRepeatedNullable; + nullable: ArrayRepeatedNullable | null; + optional: ArrayRepeatedNullable | undefined; + faint: ArrayRepeatedNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedRequired.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..bfa360fa5d --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_parameters_claude_ArrayRepeatedRequired = + _test_llm_parameters({ + model: "claude", + name: "ArrayRepeatedRequired", + })(typia.llm.parameters()); + +interface ArrayRepeatedRequiredParameters { + regular: ArrayRepeatedRequired; + nullable: ArrayRepeatedRequired | null; + optional: ArrayRepeatedRequired | undefined; + faint: ArrayRepeatedRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..c81bddae77 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayRepeatedUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_parameters_claude_ArrayRepeatedUnion = + _test_llm_parameters({ + model: "claude", + name: "ArrayRepeatedUnion", + })(typia.llm.parameters()); + +interface ArrayRepeatedUnionParameters { + regular: ArrayRepeatedUnion; + nullable: ArrayRepeatedUnion | null; + optional: ArrayRepeatedUnion | undefined; + faint: ArrayRepeatedUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArraySimple.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArraySimple.ts new file mode 100644 index 0000000000..6348f5a3e5 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArraySimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_parameters_claude_ArraySimple = _test_llm_parameters({ + model: "claude", + name: "ArraySimple", +})(typia.llm.parameters()); + +interface ArraySimpleParameters { + regular: ArraySimple; + nullable: ArraySimple | null; + optional: ArraySimple | undefined; + faint: ArraySimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayUnion.ts new file mode 100644 index 0000000000..9d464e35c8 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_parameters_claude_ArrayUnion = _test_llm_parameters({ + model: "claude", + name: "ArrayUnion", +})(typia.llm.parameters()); + +interface ArrayUnionParameters { + regular: ArrayUnion; + nullable: ArrayUnion | null; + optional: ArrayUnion | undefined; + faint: ArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_AtomicUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_AtomicUnion.ts new file mode 100644 index 0000000000..b4d6acae02 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_AtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_parameters_claude_AtomicUnion = _test_llm_parameters({ + model: "claude", + name: "AtomicUnion", +})(typia.llm.parameters()); + +interface AtomicUnionParameters { + regular: AtomicUnion; + nullable: AtomicUnion | null; + optional: AtomicUnion | undefined; + faint: AtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassGetter.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassGetter.ts new file mode 100644 index 0000000000..25db403f4e --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassGetter.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_parameters_claude_ClassGetter = _test_llm_parameters({ + model: "claude", + name: "ClassGetter", +})(typia.llm.parameters()); + +interface ClassGetterParameters { + regular: ClassGetter; + nullable: ClassGetter | null; + optional: ClassGetter | undefined; + faint: ClassGetter | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassMethod.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassMethod.ts new file mode 100644 index 0000000000..26a27d1f1c --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassMethod.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_parameters_claude_ClassMethod = _test_llm_parameters({ + model: "claude", + name: "ClassMethod", +})(typia.llm.parameters()); + +interface ClassMethodParameters { + regular: ClassMethod; + nullable: ClassMethod | null; + optional: ClassMethod | undefined; + faint: ClassMethod | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassPropertyAssignment.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..21fa4295bb --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ClassPropertyAssignment.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_parameters_claude_ClassPropertyAssignment = + _test_llm_parameters({ + model: "claude", + name: "ClassPropertyAssignment", + })(typia.llm.parameters()); + +interface ClassPropertyAssignmentParameters { + regular: ClassPropertyAssignment; + nullable: ClassPropertyAssignment | null; + optional: ClassPropertyAssignment | undefined; + faint: ClassPropertyAssignment | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagArray.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagArray.ts new file mode 100644 index 0000000000..992c150f67 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_parameters_claude_CommentTagArray = _test_llm_parameters({ + model: "claude", + name: "CommentTagArray", +})(typia.llm.parameters()); + +interface CommentTagArrayParameters { + regular: CommentTagArray; + nullable: CommentTagArray | null; + optional: CommentTagArray | undefined; + faint: CommentTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagArrayUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..9189b1ed1c --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_parameters_claude_CommentTagArrayUnion = + _test_llm_parameters({ + model: "claude", + name: "CommentTagArrayUnion", + })(typia.llm.parameters()); + +interface CommentTagArrayUnionParameters { + regular: CommentTagArrayUnion; + nullable: CommentTagArrayUnion | null; + optional: CommentTagArrayUnion | undefined; + faint: CommentTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagAtomicUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..11e4de7583 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_parameters_claude_CommentTagAtomicUnion = + _test_llm_parameters({ + model: "claude", + name: "CommentTagAtomicUnion", + })(typia.llm.parameters()); + +interface CommentTagAtomicUnionParameters { + regular: CommentTagAtomicUnion; + nullable: CommentTagAtomicUnion | null; + optional: CommentTagAtomicUnion | undefined; + faint: CommentTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagDefault.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagDefault.ts new file mode 100644 index 0000000000..3727ac69b5 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagDefault.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_parameters_claude_CommentTagDefault = + _test_llm_parameters({ + model: "claude", + name: "CommentTagDefault", + })(typia.llm.parameters()); + +interface CommentTagDefaultParameters { + regular: CommentTagDefault; + nullable: CommentTagDefault | null; + optional: CommentTagDefault | undefined; + faint: CommentTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagFormat.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagFormat.ts new file mode 100644 index 0000000000..d24242e770 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagFormat.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_parameters_claude_CommentTagFormat = _test_llm_parameters( + { + model: "claude", + name: "CommentTagFormat", + }, +)(typia.llm.parameters()); + +interface CommentTagFormatParameters { + regular: CommentTagFormat; + nullable: CommentTagFormat | null; + optional: CommentTagFormat | undefined; + faint: CommentTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagLength.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagLength.ts new file mode 100644 index 0000000000..9760c2343b --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagLength.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_parameters_claude_CommentTagLength = _test_llm_parameters( + { + model: "claude", + name: "CommentTagLength", + }, +)(typia.llm.parameters()); + +interface CommentTagLengthParameters { + regular: CommentTagLength; + nullable: CommentTagLength | null; + optional: CommentTagLength | undefined; + faint: CommentTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagObjectUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..0089feebc5 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_parameters_claude_CommentTagObjectUnion = + _test_llm_parameters({ + model: "claude", + name: "CommentTagObjectUnion", + })(typia.llm.parameters()); + +interface CommentTagObjectUnionParameters { + regular: CommentTagObjectUnion; + nullable: CommentTagObjectUnion | null; + optional: CommentTagObjectUnion | undefined; + faint: CommentTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagPattern.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagPattern.ts new file mode 100644 index 0000000000..ea0eabb8d3 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagPattern.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_parameters_claude_CommentTagPattern = + _test_llm_parameters({ + model: "claude", + name: "CommentTagPattern", + })(typia.llm.parameters()); + +interface CommentTagPatternParameters { + regular: CommentTagPattern; + nullable: CommentTagPattern | null; + optional: CommentTagPattern | undefined; + faint: CommentTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagRange.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagRange.ts new file mode 100644 index 0000000000..af331067d7 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_parameters_claude_CommentTagRange = _test_llm_parameters({ + model: "claude", + name: "CommentTagRange", +})(typia.llm.parameters()); + +interface CommentTagRangeParameters { + regular: CommentTagRange; + nullable: CommentTagRange | null; + optional: CommentTagRange | undefined; + faint: CommentTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagType.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagType.ts new file mode 100644 index 0000000000..1f26292c96 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_CommentTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_parameters_claude_CommentTagType = _test_llm_parameters({ + model: "claude", + name: "CommentTagType", +})(typia.llm.parameters()); + +interface CommentTagTypeParameters { + regular: CommentTagType; + nullable: CommentTagType | null; + optional: CommentTagType | undefined; + faint: CommentTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicAbsorbed.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..57ab951eac --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicAbsorbed.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_parameters_claude_ConstantAtomicAbsorbed = + _test_llm_parameters({ + model: "claude", + name: "ConstantAtomicAbsorbed", + })(typia.llm.parameters()); + +interface ConstantAtomicAbsorbedParameters { + regular: ConstantAtomicAbsorbed; + nullable: ConstantAtomicAbsorbed | null; + optional: ConstantAtomicAbsorbed | undefined; + faint: ConstantAtomicAbsorbed | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicTagged.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..9c93a24efd --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicTagged.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_parameters_claude_ConstantAtomicTagged = + _test_llm_parameters({ + model: "claude", + name: "ConstantAtomicTagged", + })(typia.llm.parameters()); + +interface ConstantAtomicTaggedParameters { + regular: ConstantAtomicTagged; + nullable: ConstantAtomicTagged | null; + optional: ConstantAtomicTagged | undefined; + faint: ConstantAtomicTagged | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..be77fb94af --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_parameters_claude_ConstantAtomicUnion = + _test_llm_parameters({ + model: "claude", + name: "ConstantAtomicUnion", + })(typia.llm.parameters()); + +interface ConstantAtomicUnionParameters { + regular: ConstantAtomicUnion; + nullable: ConstantAtomicUnion | null; + optional: ConstantAtomicUnion | undefined; + faint: ConstantAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantConstEnumeration.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..c4c987a52f --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantConstEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_parameters_claude_ConstantConstEnumeration = + _test_llm_parameters({ + model: "claude", + name: "ConstantConstEnumeration", + })(typia.llm.parameters()); + +interface ConstantConstEnumerationParameters { + regular: ConstantConstEnumeration; + nullable: ConstantConstEnumeration | null; + optional: ConstantConstEnumeration | undefined; + faint: ConstantConstEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantEnumeration.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantEnumeration.ts new file mode 100644 index 0000000000..f9a0ca8fec --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ConstantEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_parameters_claude_ConstantEnumeration = + _test_llm_parameters({ + model: "claude", + name: "ConstantEnumeration", + })(typia.llm.parameters()); + +interface ConstantEnumerationParameters { + regular: ConstantEnumeration; + nullable: ConstantEnumeration | null; + optional: ConstantEnumeration | undefined; + faint: ConstantEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicArray.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicArray.ts new file mode 100644 index 0000000000..d1cef6b86a --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_parameters_claude_DynamicArray = _test_llm_parameters({ + model: "claude", + name: "DynamicArray", +})(typia.llm.parameters()); + +interface DynamicArrayParameters { + regular: DynamicArray; + nullable: DynamicArray | null; + optional: DynamicArray | undefined; + faint: DynamicArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicComposite.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicComposite.ts new file mode 100644 index 0000000000..4864f4097c --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicComposite.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_parameters_claude_DynamicComposite = _test_llm_parameters( + { + model: "claude", + name: "DynamicComposite", + }, +)(typia.llm.parameters()); + +interface DynamicCompositeParameters { + regular: DynamicComposite; + nullable: DynamicComposite | null; + optional: DynamicComposite | undefined; + faint: DynamicComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicConstant.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicConstant.ts new file mode 100644 index 0000000000..a6722125d4 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_parameters_claude_DynamicConstant = _test_llm_parameters({ + model: "claude", + name: "DynamicConstant", +})(typia.llm.parameters()); + +interface DynamicConstantParameters { + regular: DynamicConstant; + nullable: DynamicConstant | null; + optional: DynamicConstant | undefined; + faint: DynamicConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicEnumeration.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicEnumeration.ts new file mode 100644 index 0000000000..161499d13b --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_parameters_claude_DynamicEnumeration = + _test_llm_parameters({ + model: "claude", + name: "DynamicEnumeration", + })(typia.llm.parameters()); + +interface DynamicEnumerationParameters { + regular: DynamicEnumeration; + nullable: DynamicEnumeration | null; + optional: DynamicEnumeration | undefined; + faint: DynamicEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicNever.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicNever.ts new file mode 100644 index 0000000000..376b7a3031 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicNever.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_parameters_claude_DynamicNever = _test_llm_parameters({ + model: "claude", + name: "DynamicNever", +})(typia.llm.parameters()); + +interface DynamicNeverParameters { + regular: DynamicNever; + nullable: DynamicNever | null; + optional: DynamicNever | undefined; + faint: DynamicNever | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicSimple.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicSimple.ts new file mode 100644 index 0000000000..d090aa3473 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_parameters_claude_DynamicSimple = _test_llm_parameters({ + model: "claude", + name: "DynamicSimple", +})(typia.llm.parameters()); + +interface DynamicSimpleParameters { + regular: DynamicSimple; + nullable: DynamicSimple | null; + optional: DynamicSimple | undefined; + faint: DynamicSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicTemplate.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicTemplate.ts new file mode 100644 index 0000000000..ba7cb04b43 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicTemplate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_parameters_claude_DynamicTemplate = _test_llm_parameters({ + model: "claude", + name: "DynamicTemplate", +})(typia.llm.parameters()); + +interface DynamicTemplateParameters { + regular: DynamicTemplate; + nullable: DynamicTemplate | null; + optional: DynamicTemplate | undefined; + faint: DynamicTemplate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicTree.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicTree.ts new file mode 100644 index 0000000000..d4382b099d --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicTree.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_parameters_claude_DynamicTree = _test_llm_parameters({ + model: "claude", + name: "DynamicTree", +})(typia.llm.parameters()); + +interface DynamicTreeParameters { + regular: DynamicTree; + nullable: DynamicTree | null; + optional: DynamicTree | undefined; + faint: DynamicTree | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicUndefined.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicUndefined.ts new file mode 100644 index 0000000000..5bb007f897 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicUndefined.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_parameters_claude_DynamicUndefined = _test_llm_parameters( + { + model: "claude", + name: "DynamicUndefined", + }, +)(typia.llm.parameters()); + +interface DynamicUndefinedParameters { + regular: DynamicUndefined; + nullable: DynamicUndefined | null; + optional: DynamicUndefined | undefined; + faint: DynamicUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicUnion.ts new file mode 100644 index 0000000000..b7bb07544d --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_DynamicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_parameters_claude_DynamicUnion = _test_llm_parameters({ + model: "claude", + name: "DynamicUnion", +})(typia.llm.parameters()); + +interface DynamicUnionParameters { + regular: DynamicUnion; + nullable: DynamicUnion | null; + optional: DynamicUnion | undefined; + faint: DynamicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectAlias.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectAlias.ts new file mode 100644 index 0000000000..9af1f1fbdb --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_parameters_claude_ObjectAlias = _test_llm_parameters({ + model: "claude", + name: "ObjectAlias", +})(typia.llm.parameters()); + +interface ObjectAliasParameters { + regular: ObjectAlias; + nullable: ObjectAlias | null; + optional: ObjectAlias | undefined; + faint: ObjectAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDate.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDate.ts new file mode 100644 index 0000000000..a20db787d2 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_parameters_claude_ObjectDate = _test_llm_parameters({ + model: "claude", + name: "ObjectDate", +})(typia.llm.parameters()); + +interface ObjectDateParameters { + regular: ObjectDate; + nullable: ObjectDate | null; + optional: ObjectDate | undefined; + faint: ObjectDate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDescription.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDescription.ts new file mode 100644 index 0000000000..c6b96f6882 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDescription.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_parameters_claude_ObjectDescription = + _test_llm_parameters({ + model: "claude", + name: "ObjectDescription", + })(typia.llm.parameters()); + +interface ObjectDescriptionParameters { + regular: ObjectDescription; + nullable: ObjectDescription | null; + optional: ObjectDescription | undefined; + faint: ObjectDescription | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDynamic.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDynamic.ts new file mode 100644 index 0000000000..fbdebc4eb7 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectDynamic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_parameters_claude_ObjectDynamic = _test_llm_parameters({ + model: "claude", + name: "ObjectDynamic", +})(typia.llm.parameters()); + +interface ObjectDynamicParameters { + regular: ObjectDynamic; + nullable: ObjectDynamic | null; + optional: ObjectDynamic | undefined; + faint: ObjectDynamic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericAlias.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericAlias.ts new file mode 100644 index 0000000000..8e05b36a05 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericAlias.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_parameters_claude_ObjectGenericAlias = + _test_llm_parameters({ + model: "claude", + name: "ObjectGenericAlias", + })(typia.llm.parameters()); + +interface ObjectGenericAliasParameters { + regular: ObjectGenericAlias; + nullable: ObjectGenericAlias | null; + optional: ObjectGenericAlias | undefined; + faint: ObjectGenericAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericArray.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericArray.ts new file mode 100644 index 0000000000..cbf5ab741a --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericArray.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_parameters_claude_ObjectGenericArray = + _test_llm_parameters({ + model: "claude", + name: "ObjectGenericArray", + })(typia.llm.parameters()); + +interface ObjectGenericArrayParameters { + regular: ObjectGenericArray; + nullable: ObjectGenericArray | null; + optional: ObjectGenericArray | undefined; + faint: ObjectGenericArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericUnion.ts new file mode 100644 index 0000000000..7cbdfa8cff --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectGenericUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_parameters_claude_ObjectGenericUnion = + _test_llm_parameters({ + model: "claude", + name: "ObjectGenericUnion", + })(typia.llm.parameters()); + +interface ObjectGenericUnionParameters { + regular: ObjectGenericUnion; + nullable: ObjectGenericUnion | null; + optional: ObjectGenericUnion | undefined; + faint: ObjectGenericUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectInternal.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectInternal.ts new file mode 100644 index 0000000000..4f95cbb243 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectInternal.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_parameters_claude_ObjectInternal = _test_llm_parameters({ + model: "claude", + name: "ObjectInternal", +})(typia.llm.parameters()); + +interface ObjectInternalParameters { + regular: ObjectInternal; + nullable: ObjectInternal | null; + optional: ObjectInternal | undefined; + faint: ObjectInternal | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectIntersection.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectIntersection.ts new file mode 100644 index 0000000000..80714f3974 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectIntersection.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_parameters_claude_ObjectIntersection = + _test_llm_parameters({ + model: "claude", + name: "ObjectIntersection", + })(typia.llm.parameters()); + +interface ObjectIntersectionParameters { + regular: ObjectIntersection; + nullable: ObjectIntersection | null; + optional: ObjectIntersection | undefined; + faint: ObjectIntersection | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectJsonTag.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectJsonTag.ts new file mode 100644 index 0000000000..bf39c48fd0 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectJsonTag.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_parameters_claude_ObjectJsonTag = _test_llm_parameters({ + model: "claude", + name: "ObjectJsonTag", +})(typia.llm.parameters()); + +interface ObjectJsonTagParameters { + regular: ObjectJsonTag; + nullable: ObjectJsonTag | null; + optional: ObjectJsonTag | undefined; + faint: ObjectJsonTag | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectLiteralProperty.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..d678673471 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectLiteralProperty.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_parameters_claude_ObjectLiteralProperty = + _test_llm_parameters({ + model: "claude", + name: "ObjectLiteralProperty", + })(typia.llm.parameters()); + +interface ObjectLiteralPropertyParameters { + regular: ObjectLiteralProperty; + nullable: ObjectLiteralProperty | null; + optional: ObjectLiteralProperty | undefined; + faint: ObjectLiteralProperty | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectLiteralType.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectLiteralType.ts new file mode 100644 index 0000000000..41caed6e8f --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectLiteralType.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_parameters_claude_ObjectLiteralType = + _test_llm_parameters({ + model: "claude", + name: "ObjectLiteralType", + })(typia.llm.parameters()); + +interface ObjectLiteralTypeParameters { + regular: ObjectLiteralType; + nullable: ObjectLiteralType | null; + optional: ObjectLiteralType | undefined; + faint: ObjectLiteralType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectNullable.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectNullable.ts new file mode 100644 index 0000000000..e22afab43f --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectNullable.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_parameters_claude_ObjectNullable = _test_llm_parameters({ + model: "claude", + name: "ObjectNullable", +})(typia.llm.parameters()); + +interface ObjectNullableParameters { + regular: ObjectNullable; + nullable: ObjectNullable | null; + optional: ObjectNullable | undefined; + faint: ObjectNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectOptional.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectOptional.ts new file mode 100644 index 0000000000..cd0b659ad6 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectOptional.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_parameters_claude_ObjectOptional = _test_llm_parameters({ + model: "claude", + name: "ObjectOptional", +})(typia.llm.parameters()); + +interface ObjectOptionalParameters { + regular: ObjectOptional; + nullable: ObjectOptional | null; + optional: ObjectOptional | undefined; + faint: ObjectOptional | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPartial.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPartial.ts new file mode 100644 index 0000000000..8e455dbf21 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPartial.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_parameters_claude_ObjectPartial = _test_llm_parameters({ + model: "claude", + name: "ObjectPartial", +})(typia.llm.parameters()); + +interface ObjectPartialParameters { + regular: ObjectPartial; + nullable: ObjectPartial | null; + optional: ObjectPartial | undefined; + faint: ObjectPartial | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPartialAndRequired.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..b47943cf14 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPartialAndRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_parameters_claude_ObjectPartialAndRequired = + _test_llm_parameters({ + model: "claude", + name: "ObjectPartialAndRequired", + })(typia.llm.parameters()); + +interface ObjectPartialAndRequiredParameters { + regular: ObjectPartialAndRequired; + nullable: ObjectPartialAndRequired | null; + optional: ObjectPartialAndRequired | undefined; + faint: ObjectPartialAndRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPrimitive.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPrimitive.ts new file mode 100644 index 0000000000..d582a2435e --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectPrimitive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_parameters_claude_ObjectPrimitive = _test_llm_parameters({ + model: "claude", + name: "ObjectPrimitive", +})(typia.llm.parameters()); + +interface ObjectPrimitiveParameters { + regular: ObjectPrimitive; + nullable: ObjectPrimitive | null; + optional: ObjectPrimitive | undefined; + faint: ObjectPrimitive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectRecursive.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectRecursive.ts new file mode 100644 index 0000000000..3fe90e7fc6 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_parameters_claude_ObjectRecursive = _test_llm_parameters({ + model: "claude", + name: "ObjectRecursive", +})(typia.llm.parameters()); + +interface ObjectRecursiveParameters { + regular: ObjectRecursive; + nullable: ObjectRecursive | null; + optional: ObjectRecursive | undefined; + faint: ObjectRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectRequired.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectRequired.ts new file mode 100644 index 0000000000..f530b28dbb --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectRequired.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_parameters_claude_ObjectRequired = _test_llm_parameters({ + model: "claude", + name: "ObjectRequired", +})(typia.llm.parameters()); + +interface ObjectRequiredParameters { + regular: ObjectRequired; + nullable: ObjectRequired | null; + optional: ObjectRequired | undefined; + faint: ObjectRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectSimple.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectSimple.ts new file mode 100644 index 0000000000..66e80abcc7 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_parameters_claude_ObjectSimple = _test_llm_parameters({ + model: "claude", + name: "ObjectSimple", +})(typia.llm.parameters()); + +interface ObjectSimpleParameters { + regular: ObjectSimple; + nullable: ObjectSimple | null; + optional: ObjectSimple | undefined; + faint: ObjectSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUndefined.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUndefined.ts new file mode 100644 index 0000000000..8082585723 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_parameters_claude_ObjectUndefined = _test_llm_parameters({ + model: "claude", + name: "ObjectUndefined", +})(typia.llm.parameters()); + +interface ObjectUndefinedParameters { + regular: ObjectUndefined; + nullable: ObjectUndefined | null; + optional: ObjectUndefined | undefined; + faint: ObjectUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionComposite.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionComposite.ts new file mode 100644 index 0000000000..0ba693e4a0 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionComposite.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_parameters_claude_ObjectUnionComposite = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionComposite", + })(typia.llm.parameters()); + +interface ObjectUnionCompositeParameters { + regular: ObjectUnionComposite; + nullable: ObjectUnionComposite | null; + optional: ObjectUnionComposite | undefined; + faint: ObjectUnionComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionCompositePointer.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..c601e53840 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionCompositePointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_parameters_claude_ObjectUnionCompositePointer = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionCompositePointer", + })(typia.llm.parameters()); + +interface ObjectUnionCompositePointerParameters { + regular: ObjectUnionCompositePointer; + nullable: ObjectUnionCompositePointer | null; + optional: ObjectUnionCompositePointer | undefined; + faint: ObjectUnionCompositePointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionDouble.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionDouble.ts new file mode 100644 index 0000000000..35a0f53000 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionDouble.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_parameters_claude_ObjectUnionDouble = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionDouble", + })(typia.llm.parameters()); + +interface ObjectUnionDoubleParameters { + regular: ObjectUnionDouble; + nullable: ObjectUnionDouble | null; + optional: ObjectUnionDouble | undefined; + faint: ObjectUnionDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionExplicit.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..b475f35892 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_parameters_claude_ObjectUnionExplicit = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionExplicit", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitParameters { + regular: ObjectUnionExplicit; + nullable: ObjectUnionExplicit | null; + optional: ObjectUnionExplicit | undefined; + faint: ObjectUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionExplicitPointer.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..b823152519 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionExplicitPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_parameters_claude_ObjectUnionExplicitPointer = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionExplicitPointer", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitPointerParameters { + regular: ObjectUnionExplicitPointer; + nullable: ObjectUnionExplicitPointer | null; + optional: ObjectUnionExplicitPointer | undefined; + faint: ObjectUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionImplicit.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..9bf29b5c2c --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_parameters_claude_ObjectUnionImplicit = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionImplicit", + })(typia.llm.parameters()); + +interface ObjectUnionImplicitParameters { + regular: ObjectUnionImplicit; + nullable: ObjectUnionImplicit | null; + optional: ObjectUnionImplicit | undefined; + faint: ObjectUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionNonPredictable.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..af020b49d2 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ObjectUnionNonPredictable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_parameters_claude_ObjectUnionNonPredictable = + _test_llm_parameters({ + model: "claude", + name: "ObjectUnionNonPredictable", + })(typia.llm.parameters()); + +interface ObjectUnionNonPredictableParameters { + regular: ObjectUnionNonPredictable; + nullable: ObjectUnionNonPredictable | null; + optional: ObjectUnionNonPredictable | undefined; + faint: ObjectUnionNonPredictable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateAtomic.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateAtomic.ts new file mode 100644 index 0000000000..5b47cedff8 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateAtomic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_parameters_claude_TemplateAtomic = _test_llm_parameters({ + model: "claude", + name: "TemplateAtomic", +})(typia.llm.parameters()); + +interface TemplateAtomicParameters { + regular: TemplateAtomic; + nullable: TemplateAtomic | null; + optional: TemplateAtomic | undefined; + faint: TemplateAtomic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateConstant.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateConstant.ts new file mode 100644 index 0000000000..e1bdfde893 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateConstant.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_parameters_claude_TemplateConstant = _test_llm_parameters( + { + model: "claude", + name: "TemplateConstant", + }, +)(typia.llm.parameters()); + +interface TemplateConstantParameters { + regular: TemplateConstant; + nullable: TemplateConstant | null; + optional: TemplateConstant | undefined; + faint: TemplateConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateUnion.ts new file mode 100644 index 0000000000..884e255ae0 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TemplateUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_parameters_claude_TemplateUnion = _test_llm_parameters({ + model: "claude", + name: "TemplateUnion", +})(typia.llm.parameters()); + +interface TemplateUnionParameters { + regular: TemplateUnion; + nullable: TemplateUnion | null; + optional: TemplateUnion | undefined; + faint: TemplateUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonAtomicUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..641f2b7311 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_parameters_claude_ToJsonAtomicUnion = + _test_llm_parameters({ + model: "claude", + name: "ToJsonAtomicUnion", + })(typia.llm.parameters()); + +interface ToJsonAtomicUnionParameters { + regular: ToJsonAtomicUnion; + nullable: ToJsonAtomicUnion | null; + optional: ToJsonAtomicUnion | undefined; + faint: ToJsonAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonDouble.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonDouble.ts new file mode 100644 index 0000000000..fc3c6ca928 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_parameters_claude_ToJsonDouble = _test_llm_parameters({ + model: "claude", + name: "ToJsonDouble", +})(typia.llm.parameters()); + +interface ToJsonDoubleParameters { + regular: ToJsonDouble; + nullable: ToJsonDouble | null; + optional: ToJsonDouble | undefined; + faint: ToJsonDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonNull.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonNull.ts new file mode 100644 index 0000000000..b9fb16752c --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonNull.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_parameters_claude_ToJsonNull = _test_llm_parameters({ + model: "claude", + name: "ToJsonNull", +})(typia.llm.parameters()); + +interface ToJsonNullParameters { + regular: ToJsonNull; + nullable: ToJsonNull | null; + optional: ToJsonNull | undefined; + faint: ToJsonNull | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonUnion.ts new file mode 100644 index 0000000000..1790b7e6b7 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_ToJsonUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_parameters_claude_ToJsonUnion = _test_llm_parameters({ + model: "claude", + name: "ToJsonUnion", +})(typia.llm.parameters()); + +interface ToJsonUnionParameters { + regular: ToJsonUnion; + nullable: ToJsonUnion | null; + optional: ToJsonUnion | undefined; + faint: ToJsonUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagArray.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagArray.ts new file mode 100644 index 0000000000..ba0645a26b --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_parameters_claude_TypeTagArray = _test_llm_parameters({ + model: "claude", + name: "TypeTagArray", +})(typia.llm.parameters()); + +interface TypeTagArrayParameters { + regular: TypeTagArray; + nullable: TypeTagArray | null; + optional: TypeTagArray | undefined; + faint: TypeTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagArrayUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..0dec8b0f10 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_parameters_claude_TypeTagArrayUnion = + _test_llm_parameters({ + model: "claude", + name: "TypeTagArrayUnion", + })(typia.llm.parameters()); + +interface TypeTagArrayUnionParameters { + regular: TypeTagArrayUnion; + nullable: TypeTagArrayUnion | null; + optional: TypeTagArrayUnion | undefined; + faint: TypeTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagAtomicUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..1c031de715 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_parameters_claude_TypeTagAtomicUnion = + _test_llm_parameters({ + model: "claude", + name: "TypeTagAtomicUnion", + })(typia.llm.parameters()); + +interface TypeTagAtomicUnionParameters { + regular: TypeTagAtomicUnion; + nullable: TypeTagAtomicUnion | null; + optional: TypeTagAtomicUnion | undefined; + faint: TypeTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagCustom.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagCustom.ts new file mode 100644 index 0000000000..895def450b --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagCustom.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_parameters_claude_TypeTagCustom = _test_llm_parameters({ + model: "claude", + name: "TypeTagCustom", +})(typia.llm.parameters()); + +interface TypeTagCustomParameters { + regular: TypeTagCustom; + nullable: TypeTagCustom | null; + optional: TypeTagCustom | undefined; + faint: TypeTagCustom | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagDefault.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagDefault.ts new file mode 100644 index 0000000000..af9c76c790 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_parameters_claude_TypeTagDefault = _test_llm_parameters({ + model: "claude", + name: "TypeTagDefault", +})(typia.llm.parameters()); + +interface TypeTagDefaultParameters { + regular: TypeTagDefault; + nullable: TypeTagDefault | null; + optional: TypeTagDefault | undefined; + faint: TypeTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagFormat.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagFormat.ts new file mode 100644 index 0000000000..bef83bb42e --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_parameters_claude_TypeTagFormat = _test_llm_parameters({ + model: "claude", + name: "TypeTagFormat", +})(typia.llm.parameters()); + +interface TypeTagFormatParameters { + regular: TypeTagFormat; + nullable: TypeTagFormat | null; + optional: TypeTagFormat | undefined; + faint: TypeTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagLength.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagLength.ts new file mode 100644 index 0000000000..b6b6474243 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_parameters_claude_TypeTagLength = _test_llm_parameters({ + model: "claude", + name: "TypeTagLength", +})(typia.llm.parameters()); + +interface TypeTagLengthParameters { + regular: TypeTagLength; + nullable: TypeTagLength | null; + optional: TypeTagLength | undefined; + faint: TypeTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagMatrix.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagMatrix.ts new file mode 100644 index 0000000000..dc61d33d35 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_parameters_claude_TypeTagMatrix = _test_llm_parameters({ + model: "claude", + name: "TypeTagMatrix", +})(typia.llm.parameters()); + +interface TypeTagMatrixParameters { + regular: TypeTagMatrix; + nullable: TypeTagMatrix | null; + optional: TypeTagMatrix | undefined; + faint: TypeTagMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagObjectUnion.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..d870a4a7ff --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_parameters_claude_TypeTagObjectUnion = + _test_llm_parameters({ + model: "claude", + name: "TypeTagObjectUnion", + })(typia.llm.parameters()); + +interface TypeTagObjectUnionParameters { + regular: TypeTagObjectUnion; + nullable: TypeTagObjectUnion | null; + optional: TypeTagObjectUnion | undefined; + faint: TypeTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagPattern.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagPattern.ts new file mode 100644 index 0000000000..ebfbc038a3 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_parameters_claude_TypeTagPattern = _test_llm_parameters({ + model: "claude", + name: "TypeTagPattern", +})(typia.llm.parameters()); + +interface TypeTagPatternParameters { + regular: TypeTagPattern; + nullable: TypeTagPattern | null; + optional: TypeTagPattern | undefined; + faint: TypeTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagRange.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagRange.ts new file mode 100644 index 0000000000..b3f5b86ca3 --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_parameters_claude_TypeTagRange = _test_llm_parameters({ + model: "claude", + name: "TypeTagRange", +})(typia.llm.parameters()); + +interface TypeTagRangeParameters { + regular: TypeTagRange; + nullable: TypeTagRange | null; + optional: TypeTagRange | undefined; + faint: TypeTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagType.ts b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagType.ts new file mode 100644 index 0000000000..045c1d31ec --- /dev/null +++ b/test/src/features/llm.parameters/claude/test_llm_parameters_claude_TypeTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_parameters_claude_TypeTagType = _test_llm_parameters({ + model: "claude", + name: "TypeTagType", +})(typia.llm.parameters()); + +interface TypeTagTypeParameters { + regular: TypeTagType; + nullable: TypeTagType | null; + optional: TypeTagType | undefined; + faint: TypeTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayAny.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayAny.ts new file mode 100644 index 0000000000..dde72b83cd --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayAny.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_parameters_gemini_ArrayAny = _test_llm_parameters({ + model: "gemini", + name: "ArrayAny", +})(typia.llm.parameters()); + +interface ArrayAnyParameters { + regular: ArrayAny; + nullable: ArrayAny | null; + optional: ArrayAny | undefined; + faint: ArrayAny | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayHierarchical.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayHierarchical.ts new file mode 100644 index 0000000000..a74361a46c --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayHierarchical.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_parameters_gemini_ArrayHierarchical = + _test_llm_parameters({ + model: "gemini", + name: "ArrayHierarchical", + })(typia.llm.parameters()); + +interface ArrayHierarchicalParameters { + regular: ArrayHierarchical; + nullable: ArrayHierarchical | null; + optional: ArrayHierarchical | undefined; + faint: ArrayHierarchical | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayHierarchicalPointer.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..962d401738 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayHierarchicalPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_parameters_gemini_ArrayHierarchicalPointer = + _test_llm_parameters({ + model: "gemini", + name: "ArrayHierarchicalPointer", + })(typia.llm.parameters()); + +interface ArrayHierarchicalPointerParameters { + regular: ArrayHierarchicalPointer; + nullable: ArrayHierarchicalPointer | null; + optional: ArrayHierarchicalPointer | undefined; + faint: ArrayHierarchicalPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayMatrix.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayMatrix.ts new file mode 100644 index 0000000000..645cf4f4f4 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_parameters_gemini_ArrayMatrix = _test_llm_parameters({ + model: "gemini", + name: "ArrayMatrix", +})(typia.llm.parameters()); + +interface ArrayMatrixParameters { + regular: ArrayMatrix; + nullable: ArrayMatrix | null; + optional: ArrayMatrix | undefined; + faint: ArrayMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayRecursive.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayRecursive.ts new file mode 100644 index 0000000000..e6ab288717 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArrayRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_parameters_gemini_ArrayRecursive = _test_llm_parameters({ + model: "gemini", + name: "ArrayRecursive", +})(typia.llm.parameters()); + +interface ArrayRecursiveParameters { + regular: ArrayRecursive; + nullable: ArrayRecursive | null; + optional: ArrayRecursive | undefined; + faint: ArrayRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArraySimple.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArraySimple.ts new file mode 100644 index 0000000000..e06d64f905 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ArraySimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_parameters_gemini_ArraySimple = _test_llm_parameters({ + model: "gemini", + name: "ArraySimple", +})(typia.llm.parameters()); + +interface ArraySimpleParameters { + regular: ArraySimple; + nullable: ArraySimple | null; + optional: ArraySimple | undefined; + faint: ArraySimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassGetter.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassGetter.ts new file mode 100644 index 0000000000..f40f0be9de --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassGetter.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_parameters_gemini_ClassGetter = _test_llm_parameters({ + model: "gemini", + name: "ClassGetter", +})(typia.llm.parameters()); + +interface ClassGetterParameters { + regular: ClassGetter; + nullable: ClassGetter | null; + optional: ClassGetter | undefined; + faint: ClassGetter | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassMethod.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassMethod.ts new file mode 100644 index 0000000000..258f81624a --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassMethod.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_parameters_gemini_ClassMethod = _test_llm_parameters({ + model: "gemini", + name: "ClassMethod", +})(typia.llm.parameters()); + +interface ClassMethodParameters { + regular: ClassMethod; + nullable: ClassMethod | null; + optional: ClassMethod | undefined; + faint: ClassMethod | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassPropertyAssignment.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..b8c4ed58da --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ClassPropertyAssignment.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_parameters_gemini_ClassPropertyAssignment = + _test_llm_parameters({ + model: "gemini", + name: "ClassPropertyAssignment", + })(typia.llm.parameters()); + +interface ClassPropertyAssignmentParameters { + regular: ClassPropertyAssignment; + nullable: ClassPropertyAssignment | null; + optional: ClassPropertyAssignment | undefined; + faint: ClassPropertyAssignment | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagArray.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagArray.ts new file mode 100644 index 0000000000..7921baa727 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_parameters_gemini_CommentTagArray = _test_llm_parameters({ + model: "gemini", + name: "CommentTagArray", +})(typia.llm.parameters()); + +interface CommentTagArrayParameters { + regular: CommentTagArray; + nullable: CommentTagArray | null; + optional: CommentTagArray | undefined; + faint: CommentTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagFormat.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagFormat.ts new file mode 100644 index 0000000000..868d1f0d0f --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagFormat.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_parameters_gemini_CommentTagFormat = _test_llm_parameters( + { + model: "gemini", + name: "CommentTagFormat", + }, +)(typia.llm.parameters()); + +interface CommentTagFormatParameters { + regular: CommentTagFormat; + nullable: CommentTagFormat | null; + optional: CommentTagFormat | undefined; + faint: CommentTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagLength.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagLength.ts new file mode 100644 index 0000000000..4835030ff1 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagLength.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_parameters_gemini_CommentTagLength = _test_llm_parameters( + { + model: "gemini", + name: "CommentTagLength", + }, +)(typia.llm.parameters()); + +interface CommentTagLengthParameters { + regular: CommentTagLength; + nullable: CommentTagLength | null; + optional: CommentTagLength | undefined; + faint: CommentTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagPattern.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagPattern.ts new file mode 100644 index 0000000000..2d6ca9ea01 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagPattern.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_parameters_gemini_CommentTagPattern = + _test_llm_parameters({ + model: "gemini", + name: "CommentTagPattern", + })(typia.llm.parameters()); + +interface CommentTagPatternParameters { + regular: CommentTagPattern; + nullable: CommentTagPattern | null; + optional: CommentTagPattern | undefined; + faint: CommentTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagRange.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagRange.ts new file mode 100644 index 0000000000..6030cb8059 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_parameters_gemini_CommentTagRange = _test_llm_parameters({ + model: "gemini", + name: "CommentTagRange", +})(typia.llm.parameters()); + +interface CommentTagRangeParameters { + regular: CommentTagRange; + nullable: CommentTagRange | null; + optional: CommentTagRange | undefined; + faint: CommentTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagType.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagType.ts new file mode 100644 index 0000000000..d03751f472 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_CommentTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_parameters_gemini_CommentTagType = _test_llm_parameters({ + model: "gemini", + name: "CommentTagType", +})(typia.llm.parameters()); + +interface CommentTagTypeParameters { + regular: CommentTagType; + nullable: CommentTagType | null; + optional: CommentTagType | undefined; + faint: CommentTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ConstantAtomicAbsorbed.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..999e3ee3e1 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ConstantAtomicAbsorbed.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_parameters_gemini_ConstantAtomicAbsorbed = + _test_llm_parameters({ + model: "gemini", + name: "ConstantAtomicAbsorbed", + })(typia.llm.parameters()); + +interface ConstantAtomicAbsorbedParameters { + regular: ConstantAtomicAbsorbed; + nullable: ConstantAtomicAbsorbed | null; + optional: ConstantAtomicAbsorbed | undefined; + faint: ConstantAtomicAbsorbed | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicConstant.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicConstant.ts new file mode 100644 index 0000000000..cc88378f9e --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_parameters_gemini_DynamicConstant = _test_llm_parameters({ + model: "gemini", + name: "DynamicConstant", +})(typia.llm.parameters()); + +interface DynamicConstantParameters { + regular: DynamicConstant; + nullable: DynamicConstant | null; + optional: DynamicConstant | undefined; + faint: DynamicConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicEnumeration.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicEnumeration.ts new file mode 100644 index 0000000000..e85223ac70 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_parameters_gemini_DynamicEnumeration = + _test_llm_parameters({ + model: "gemini", + name: "DynamicEnumeration", + })(typia.llm.parameters()); + +interface DynamicEnumerationParameters { + regular: DynamicEnumeration; + nullable: DynamicEnumeration | null; + optional: DynamicEnumeration | undefined; + faint: DynamicEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicNever.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicNever.ts new file mode 100644 index 0000000000..220a7c9797 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicNever.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_parameters_gemini_DynamicNever = _test_llm_parameters({ + model: "gemini", + name: "DynamicNever", +})(typia.llm.parameters()); + +interface DynamicNeverParameters { + regular: DynamicNever; + nullable: DynamicNever | null; + optional: DynamicNever | undefined; + faint: DynamicNever | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicUndefined.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicUndefined.ts new file mode 100644 index 0000000000..d960752a2e --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_DynamicUndefined.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_parameters_gemini_DynamicUndefined = _test_llm_parameters( + { + model: "gemini", + name: "DynamicUndefined", + }, +)(typia.llm.parameters()); + +interface DynamicUndefinedParameters { + regular: DynamicUndefined; + nullable: DynamicUndefined | null; + optional: DynamicUndefined | undefined; + faint: DynamicUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectDate.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectDate.ts new file mode 100644 index 0000000000..349e9d7312 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectDate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_parameters_gemini_ObjectDate = _test_llm_parameters({ + model: "gemini", + name: "ObjectDate", +})(typia.llm.parameters()); + +interface ObjectDateParameters { + regular: ObjectDate; + nullable: ObjectDate | null; + optional: ObjectDate | undefined; + faint: ObjectDate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectDescription.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectDescription.ts new file mode 100644 index 0000000000..ecbe1d1a01 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectDescription.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_parameters_gemini_ObjectDescription = + _test_llm_parameters({ + model: "gemini", + name: "ObjectDescription", + })(typia.llm.parameters()); + +interface ObjectDescriptionParameters { + regular: ObjectDescription; + nullable: ObjectDescription | null; + optional: ObjectDescription | undefined; + faint: ObjectDescription | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectGenericAlias.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectGenericAlias.ts new file mode 100644 index 0000000000..ec01349ffc --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectGenericAlias.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_parameters_gemini_ObjectGenericAlias = + _test_llm_parameters({ + model: "gemini", + name: "ObjectGenericAlias", + })(typia.llm.parameters()); + +interface ObjectGenericAliasParameters { + regular: ObjectGenericAlias; + nullable: ObjectGenericAlias | null; + optional: ObjectGenericAlias | undefined; + faint: ObjectGenericAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectGenericArray.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectGenericArray.ts new file mode 100644 index 0000000000..d82f1062aa --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectGenericArray.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_parameters_gemini_ObjectGenericArray = + _test_llm_parameters({ + model: "gemini", + name: "ObjectGenericArray", + })(typia.llm.parameters()); + +interface ObjectGenericArrayParameters { + regular: ObjectGenericArray; + nullable: ObjectGenericArray | null; + optional: ObjectGenericArray | undefined; + faint: ObjectGenericArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectInternal.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectInternal.ts new file mode 100644 index 0000000000..b86bb2921a --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectInternal.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_parameters_gemini_ObjectInternal = _test_llm_parameters({ + model: "gemini", + name: "ObjectInternal", +})(typia.llm.parameters()); + +interface ObjectInternalParameters { + regular: ObjectInternal; + nullable: ObjectInternal | null; + optional: ObjectInternal | undefined; + faint: ObjectInternal | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectIntersection.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectIntersection.ts new file mode 100644 index 0000000000..40723c8353 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectIntersection.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_parameters_gemini_ObjectIntersection = + _test_llm_parameters({ + model: "gemini", + name: "ObjectIntersection", + })(typia.llm.parameters()); + +interface ObjectIntersectionParameters { + regular: ObjectIntersection; + nullable: ObjectIntersection | null; + optional: ObjectIntersection | undefined; + faint: ObjectIntersection | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectJsonTag.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectJsonTag.ts new file mode 100644 index 0000000000..b882562691 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectJsonTag.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_parameters_gemini_ObjectJsonTag = _test_llm_parameters({ + model: "gemini", + name: "ObjectJsonTag", +})(typia.llm.parameters()); + +interface ObjectJsonTagParameters { + regular: ObjectJsonTag; + nullable: ObjectJsonTag | null; + optional: ObjectJsonTag | undefined; + faint: ObjectJsonTag | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectLiteralProperty.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..d862484959 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectLiteralProperty.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_parameters_gemini_ObjectLiteralProperty = + _test_llm_parameters({ + model: "gemini", + name: "ObjectLiteralProperty", + })(typia.llm.parameters()); + +interface ObjectLiteralPropertyParameters { + regular: ObjectLiteralProperty; + nullable: ObjectLiteralProperty | null; + optional: ObjectLiteralProperty | undefined; + faint: ObjectLiteralProperty | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectLiteralType.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectLiteralType.ts new file mode 100644 index 0000000000..6055378e04 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectLiteralType.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_parameters_gemini_ObjectLiteralType = + _test_llm_parameters({ + model: "gemini", + name: "ObjectLiteralType", + })(typia.llm.parameters()); + +interface ObjectLiteralTypeParameters { + regular: ObjectLiteralType; + nullable: ObjectLiteralType | null; + optional: ObjectLiteralType | undefined; + faint: ObjectLiteralType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectOptional.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectOptional.ts new file mode 100644 index 0000000000..4056b41331 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectOptional.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_parameters_gemini_ObjectOptional = _test_llm_parameters({ + model: "gemini", + name: "ObjectOptional", +})(typia.llm.parameters()); + +interface ObjectOptionalParameters { + regular: ObjectOptional; + nullable: ObjectOptional | null; + optional: ObjectOptional | undefined; + faint: ObjectOptional | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPartial.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPartial.ts new file mode 100644 index 0000000000..c479b1c160 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPartial.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_parameters_gemini_ObjectPartial = _test_llm_parameters({ + model: "gemini", + name: "ObjectPartial", +})(typia.llm.parameters()); + +interface ObjectPartialParameters { + regular: ObjectPartial; + nullable: ObjectPartial | null; + optional: ObjectPartial | undefined; + faint: ObjectPartial | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPartialAndRequired.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..7d404f27b6 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPartialAndRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_parameters_gemini_ObjectPartialAndRequired = + _test_llm_parameters({ + model: "gemini", + name: "ObjectPartialAndRequired", + })(typia.llm.parameters()); + +interface ObjectPartialAndRequiredParameters { + regular: ObjectPartialAndRequired; + nullable: ObjectPartialAndRequired | null; + optional: ObjectPartialAndRequired | undefined; + faint: ObjectPartialAndRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPrimitive.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPrimitive.ts new file mode 100644 index 0000000000..56f23b0d00 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectPrimitive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_parameters_gemini_ObjectPrimitive = _test_llm_parameters({ + model: "gemini", + name: "ObjectPrimitive", +})(typia.llm.parameters()); + +interface ObjectPrimitiveParameters { + regular: ObjectPrimitive; + nullable: ObjectPrimitive | null; + optional: ObjectPrimitive | undefined; + faint: ObjectPrimitive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectRecursive.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectRecursive.ts new file mode 100644 index 0000000000..d792edcbb1 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_parameters_gemini_ObjectRecursive = _test_llm_parameters({ + model: "gemini", + name: "ObjectRecursive", +})(typia.llm.parameters()); + +interface ObjectRecursiveParameters { + regular: ObjectRecursive; + nullable: ObjectRecursive | null; + optional: ObjectRecursive | undefined; + faint: ObjectRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectRequired.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectRequired.ts new file mode 100644 index 0000000000..59704e9a97 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectRequired.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_parameters_gemini_ObjectRequired = _test_llm_parameters({ + model: "gemini", + name: "ObjectRequired", +})(typia.llm.parameters()); + +interface ObjectRequiredParameters { + regular: ObjectRequired; + nullable: ObjectRequired | null; + optional: ObjectRequired | undefined; + faint: ObjectRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectSimple.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectSimple.ts new file mode 100644 index 0000000000..9996661834 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ObjectSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_parameters_gemini_ObjectSimple = _test_llm_parameters({ + model: "gemini", + name: "ObjectSimple", +})(typia.llm.parameters()); + +interface ObjectSimpleParameters { + regular: ObjectSimple; + nullable: ObjectSimple | null; + optional: ObjectSimple | undefined; + faint: ObjectSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TemplateAtomic.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TemplateAtomic.ts new file mode 100644 index 0000000000..7b987d2b1a --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TemplateAtomic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_parameters_gemini_TemplateAtomic = _test_llm_parameters({ + model: "gemini", + name: "TemplateAtomic", +})(typia.llm.parameters()); + +interface TemplateAtomicParameters { + regular: TemplateAtomic; + nullable: TemplateAtomic | null; + optional: TemplateAtomic | undefined; + faint: TemplateAtomic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TemplateConstant.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TemplateConstant.ts new file mode 100644 index 0000000000..bc125e44fd --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TemplateConstant.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_parameters_gemini_TemplateConstant = _test_llm_parameters( + { + model: "gemini", + name: "TemplateConstant", + }, +)(typia.llm.parameters()); + +interface TemplateConstantParameters { + regular: TemplateConstant; + nullable: TemplateConstant | null; + optional: TemplateConstant | undefined; + faint: TemplateConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ToJsonDouble.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ToJsonDouble.ts new file mode 100644 index 0000000000..ca685fe590 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ToJsonDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_parameters_gemini_ToJsonDouble = _test_llm_parameters({ + model: "gemini", + name: "ToJsonDouble", +})(typia.llm.parameters()); + +interface ToJsonDoubleParameters { + regular: ToJsonDouble; + nullable: ToJsonDouble | null; + optional: ToJsonDouble | undefined; + faint: ToJsonDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ToJsonNull.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ToJsonNull.ts new file mode 100644 index 0000000000..139aa02915 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_ToJsonNull.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_parameters_gemini_ToJsonNull = _test_llm_parameters({ + model: "gemini", + name: "ToJsonNull", +})(typia.llm.parameters()); + +interface ToJsonNullParameters { + regular: ToJsonNull; + nullable: ToJsonNull | null; + optional: ToJsonNull | undefined; + faint: ToJsonNull | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagArray.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagArray.ts new file mode 100644 index 0000000000..793c2afe81 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_parameters_gemini_TypeTagArray = _test_llm_parameters({ + model: "gemini", + name: "TypeTagArray", +})(typia.llm.parameters()); + +interface TypeTagArrayParameters { + regular: TypeTagArray; + nullable: TypeTagArray | null; + optional: TypeTagArray | undefined; + faint: TypeTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagCustom.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagCustom.ts new file mode 100644 index 0000000000..97698a69c5 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagCustom.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_parameters_gemini_TypeTagCustom = _test_llm_parameters({ + model: "gemini", + name: "TypeTagCustom", +})(typia.llm.parameters()); + +interface TypeTagCustomParameters { + regular: TypeTagCustom; + nullable: TypeTagCustom | null; + optional: TypeTagCustom | undefined; + faint: TypeTagCustom | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagFormat.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagFormat.ts new file mode 100644 index 0000000000..f37902a92c --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_parameters_gemini_TypeTagFormat = _test_llm_parameters({ + model: "gemini", + name: "TypeTagFormat", +})(typia.llm.parameters()); + +interface TypeTagFormatParameters { + regular: TypeTagFormat; + nullable: TypeTagFormat | null; + optional: TypeTagFormat | undefined; + faint: TypeTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagLength.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagLength.ts new file mode 100644 index 0000000000..318faca314 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_parameters_gemini_TypeTagLength = _test_llm_parameters({ + model: "gemini", + name: "TypeTagLength", +})(typia.llm.parameters()); + +interface TypeTagLengthParameters { + regular: TypeTagLength; + nullable: TypeTagLength | null; + optional: TypeTagLength | undefined; + faint: TypeTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagMatrix.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagMatrix.ts new file mode 100644 index 0000000000..0a1ea2c937 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_parameters_gemini_TypeTagMatrix = _test_llm_parameters({ + model: "gemini", + name: "TypeTagMatrix", +})(typia.llm.parameters()); + +interface TypeTagMatrixParameters { + regular: TypeTagMatrix; + nullable: TypeTagMatrix | null; + optional: TypeTagMatrix | undefined; + faint: TypeTagMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagPattern.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagPattern.ts new file mode 100644 index 0000000000..de55cb5b6a --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_parameters_gemini_TypeTagPattern = _test_llm_parameters({ + model: "gemini", + name: "TypeTagPattern", +})(typia.llm.parameters()); + +interface TypeTagPatternParameters { + regular: TypeTagPattern; + nullable: TypeTagPattern | null; + optional: TypeTagPattern | undefined; + faint: TypeTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagRange.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagRange.ts new file mode 100644 index 0000000000..f460c561a9 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_parameters_gemini_TypeTagRange = _test_llm_parameters({ + model: "gemini", + name: "TypeTagRange", +})(typia.llm.parameters()); + +interface TypeTagRangeParameters { + regular: TypeTagRange; + nullable: TypeTagRange | null; + optional: TypeTagRange | undefined; + faint: TypeTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagType.ts b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagType.ts new file mode 100644 index 0000000000..6f65887107 --- /dev/null +++ b/test/src/features/llm.parameters/gemini/test_llm_parameters_gemini_TypeTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_parameters_gemini_TypeTagType = _test_llm_parameters({ + model: "gemini", + name: "TypeTagType", +})(typia.llm.parameters()); + +interface TypeTagTypeParameters { + regular: TypeTagType; + nullable: TypeTagType | null; + optional: TypeTagType | undefined; + faint: TypeTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayAny.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayAny.ts new file mode 100644 index 0000000000..0d2248f876 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayAny.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_parameters_llama_ArrayAny = _test_llm_parameters({ + model: "llama", + name: "ArrayAny", +})(typia.llm.parameters()); + +interface ArrayAnyParameters { + regular: ArrayAny; + nullable: ArrayAny | null; + optional: ArrayAny | undefined; + faint: ArrayAny | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayHierarchical.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayHierarchical.ts new file mode 100644 index 0000000000..52426e4bc6 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayHierarchical.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_parameters_llama_ArrayHierarchical = _test_llm_parameters( + { + model: "llama", + name: "ArrayHierarchical", + }, +)(typia.llm.parameters()); + +interface ArrayHierarchicalParameters { + regular: ArrayHierarchical; + nullable: ArrayHierarchical | null; + optional: ArrayHierarchical | undefined; + faint: ArrayHierarchical | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayHierarchicalPointer.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..9eb2a78496 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayHierarchicalPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_parameters_llama_ArrayHierarchicalPointer = + _test_llm_parameters({ + model: "llama", + name: "ArrayHierarchicalPointer", + })(typia.llm.parameters()); + +interface ArrayHierarchicalPointerParameters { + regular: ArrayHierarchicalPointer; + nullable: ArrayHierarchicalPointer | null; + optional: ArrayHierarchicalPointer | undefined; + faint: ArrayHierarchicalPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayMatrix.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayMatrix.ts new file mode 100644 index 0000000000..fd7ce9470d --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_parameters_llama_ArrayMatrix = _test_llm_parameters({ + model: "llama", + name: "ArrayMatrix", +})(typia.llm.parameters()); + +interface ArrayMatrixParameters { + regular: ArrayMatrix; + nullable: ArrayMatrix | null; + optional: ArrayMatrix | undefined; + faint: ArrayMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursive.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursive.ts new file mode 100644 index 0000000000..0f286f6d0d --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_parameters_llama_ArrayRecursive = _test_llm_parameters({ + model: "llama", + name: "ArrayRecursive", +})(typia.llm.parameters()); + +interface ArrayRecursiveParameters { + regular: ArrayRecursive; + nullable: ArrayRecursive | null; + optional: ArrayRecursive | undefined; + faint: ArrayRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..8ca7e217a9 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_parameters_llama_ArrayRecursiveUnionExplicit = + _test_llm_parameters({ + model: "llama", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionExplicitParameters { + regular: ArrayRecursiveUnionExplicit; + nullable: ArrayRecursiveUnionExplicit | null; + optional: ArrayRecursiveUnionExplicit | undefined; + faint: ArrayRecursiveUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..bcb03e000e --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,23 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_parameters_llama_ArrayRecursiveUnionExplicitPointer = + _test_llm_parameters({ + model: "llama", + name: "ArrayRecursiveUnionExplicitPointer", + })( + typia.llm.parameters< + ArrayRecursiveUnionExplicitPointerParameters, + "llama" + >(), + ); + +interface ArrayRecursiveUnionExplicitPointerParameters { + regular: ArrayRecursiveUnionExplicitPointer; + nullable: ArrayRecursiveUnionExplicitPointer | null; + optional: ArrayRecursiveUnionExplicitPointer | undefined; + faint: ArrayRecursiveUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..fe4fb78aab --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_parameters_llama_ArrayRecursiveUnionImplicit = + _test_llm_parameters({ + model: "llama", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.parameters()); + +interface ArrayRecursiveUnionImplicitParameters { + regular: ArrayRecursiveUnionImplicit; + nullable: ArrayRecursiveUnionImplicit | null; + optional: ArrayRecursiveUnionImplicit | undefined; + faint: ArrayRecursiveUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedNullable.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..feb85a8b4b --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedNullable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_parameters_llama_ArrayRepeatedNullable = + _test_llm_parameters({ + model: "llama", + name: "ArrayRepeatedNullable", + })(typia.llm.parameters()); + +interface ArrayRepeatedNullableParameters { + regular: ArrayRepeatedNullable; + nullable: ArrayRepeatedNullable | null; + optional: ArrayRepeatedNullable | undefined; + faint: ArrayRepeatedNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedRequired.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..07e9c2e0af --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_parameters_llama_ArrayRepeatedRequired = + _test_llm_parameters({ + model: "llama", + name: "ArrayRepeatedRequired", + })(typia.llm.parameters()); + +interface ArrayRepeatedRequiredParameters { + regular: ArrayRepeatedRequired; + nullable: ArrayRepeatedRequired | null; + optional: ArrayRepeatedRequired | undefined; + faint: ArrayRepeatedRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..9b4d5a52a4 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayRepeatedUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_parameters_llama_ArrayRepeatedUnion = + _test_llm_parameters({ + model: "llama", + name: "ArrayRepeatedUnion", + })(typia.llm.parameters()); + +interface ArrayRepeatedUnionParameters { + regular: ArrayRepeatedUnion; + nullable: ArrayRepeatedUnion | null; + optional: ArrayRepeatedUnion | undefined; + faint: ArrayRepeatedUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArraySimple.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArraySimple.ts new file mode 100644 index 0000000000..f12f655caa --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArraySimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_parameters_llama_ArraySimple = _test_llm_parameters({ + model: "llama", + name: "ArraySimple", +})(typia.llm.parameters()); + +interface ArraySimpleParameters { + regular: ArraySimple; + nullable: ArraySimple | null; + optional: ArraySimple | undefined; + faint: ArraySimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayUnion.ts new file mode 100644 index 0000000000..c348821200 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ArrayUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_parameters_llama_ArrayUnion = _test_llm_parameters({ + model: "llama", + name: "ArrayUnion", +})(typia.llm.parameters()); + +interface ArrayUnionParameters { + regular: ArrayUnion; + nullable: ArrayUnion | null; + optional: ArrayUnion | undefined; + faint: ArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_AtomicUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_AtomicUnion.ts new file mode 100644 index 0000000000..322a4f97cd --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_AtomicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_parameters_llama_AtomicUnion = _test_llm_parameters({ + model: "llama", + name: "AtomicUnion", +})(typia.llm.parameters()); + +interface AtomicUnionParameters { + regular: AtomicUnion; + nullable: AtomicUnion | null; + optional: AtomicUnion | undefined; + faint: AtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassGetter.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassGetter.ts new file mode 100644 index 0000000000..e20367f74c --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassGetter.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_parameters_llama_ClassGetter = _test_llm_parameters({ + model: "llama", + name: "ClassGetter", +})(typia.llm.parameters()); + +interface ClassGetterParameters { + regular: ClassGetter; + nullable: ClassGetter | null; + optional: ClassGetter | undefined; + faint: ClassGetter | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassMethod.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassMethod.ts new file mode 100644 index 0000000000..41b591deff --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassMethod.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_parameters_llama_ClassMethod = _test_llm_parameters({ + model: "llama", + name: "ClassMethod", +})(typia.llm.parameters()); + +interface ClassMethodParameters { + regular: ClassMethod; + nullable: ClassMethod | null; + optional: ClassMethod | undefined; + faint: ClassMethod | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassPropertyAssignment.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..ca77cf2122 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ClassPropertyAssignment.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_parameters_llama_ClassPropertyAssignment = + _test_llm_parameters({ + model: "llama", + name: "ClassPropertyAssignment", + })(typia.llm.parameters()); + +interface ClassPropertyAssignmentParameters { + regular: ClassPropertyAssignment; + nullable: ClassPropertyAssignment | null; + optional: ClassPropertyAssignment | undefined; + faint: ClassPropertyAssignment | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagArray.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagArray.ts new file mode 100644 index 0000000000..0418a1c340 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_parameters_llama_CommentTagArray = _test_llm_parameters({ + model: "llama", + name: "CommentTagArray", +})(typia.llm.parameters()); + +interface CommentTagArrayParameters { + regular: CommentTagArray; + nullable: CommentTagArray | null; + optional: CommentTagArray | undefined; + faint: CommentTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagArrayUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..a50e1a392a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagArrayUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_parameters_llama_CommentTagArrayUnion = + _test_llm_parameters({ + model: "llama", + name: "CommentTagArrayUnion", + })(typia.llm.parameters()); + +interface CommentTagArrayUnionParameters { + regular: CommentTagArrayUnion; + nullable: CommentTagArrayUnion | null; + optional: CommentTagArrayUnion | undefined; + faint: CommentTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagAtomicUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..d66ba1d1d6 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_parameters_llama_CommentTagAtomicUnion = + _test_llm_parameters({ + model: "llama", + name: "CommentTagAtomicUnion", + })(typia.llm.parameters()); + +interface CommentTagAtomicUnionParameters { + regular: CommentTagAtomicUnion; + nullable: CommentTagAtomicUnion | null; + optional: CommentTagAtomicUnion | undefined; + faint: CommentTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagDefault.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagDefault.ts new file mode 100644 index 0000000000..dd3b641aec --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagDefault.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_parameters_llama_CommentTagDefault = _test_llm_parameters( + { + model: "llama", + name: "CommentTagDefault", + }, +)(typia.llm.parameters()); + +interface CommentTagDefaultParameters { + regular: CommentTagDefault; + nullable: CommentTagDefault | null; + optional: CommentTagDefault | undefined; + faint: CommentTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagFormat.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagFormat.ts new file mode 100644 index 0000000000..d85f6e291e --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_parameters_llama_CommentTagFormat = _test_llm_parameters({ + model: "llama", + name: "CommentTagFormat", +})(typia.llm.parameters()); + +interface CommentTagFormatParameters { + regular: CommentTagFormat; + nullable: CommentTagFormat | null; + optional: CommentTagFormat | undefined; + faint: CommentTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagLength.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagLength.ts new file mode 100644 index 0000000000..bb15e5c462 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_parameters_llama_CommentTagLength = _test_llm_parameters({ + model: "llama", + name: "CommentTagLength", +})(typia.llm.parameters()); + +interface CommentTagLengthParameters { + regular: CommentTagLength; + nullable: CommentTagLength | null; + optional: CommentTagLength | undefined; + faint: CommentTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagObjectUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..4078ca6518 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_parameters_llama_CommentTagObjectUnion = + _test_llm_parameters({ + model: "llama", + name: "CommentTagObjectUnion", + })(typia.llm.parameters()); + +interface CommentTagObjectUnionParameters { + regular: CommentTagObjectUnion; + nullable: CommentTagObjectUnion | null; + optional: CommentTagObjectUnion | undefined; + faint: CommentTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagPattern.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagPattern.ts new file mode 100644 index 0000000000..1e58b2dbba --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagPattern.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_parameters_llama_CommentTagPattern = _test_llm_parameters( + { + model: "llama", + name: "CommentTagPattern", + }, +)(typia.llm.parameters()); + +interface CommentTagPatternParameters { + regular: CommentTagPattern; + nullable: CommentTagPattern | null; + optional: CommentTagPattern | undefined; + faint: CommentTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagRange.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagRange.ts new file mode 100644 index 0000000000..ff7c39ae6a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_parameters_llama_CommentTagRange = _test_llm_parameters({ + model: "llama", + name: "CommentTagRange", +})(typia.llm.parameters()); + +interface CommentTagRangeParameters { + regular: CommentTagRange; + nullable: CommentTagRange | null; + optional: CommentTagRange | undefined; + faint: CommentTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagType.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagType.ts new file mode 100644 index 0000000000..3ddc8f344d --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_CommentTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_parameters_llama_CommentTagType = _test_llm_parameters({ + model: "llama", + name: "CommentTagType", +})(typia.llm.parameters()); + +interface CommentTagTypeParameters { + regular: CommentTagType; + nullable: CommentTagType | null; + optional: CommentTagType | undefined; + faint: CommentTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicAbsorbed.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..b5bba5e147 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicAbsorbed.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_parameters_llama_ConstantAtomicAbsorbed = + _test_llm_parameters({ + model: "llama", + name: "ConstantAtomicAbsorbed", + })(typia.llm.parameters()); + +interface ConstantAtomicAbsorbedParameters { + regular: ConstantAtomicAbsorbed; + nullable: ConstantAtomicAbsorbed | null; + optional: ConstantAtomicAbsorbed | undefined; + faint: ConstantAtomicAbsorbed | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicTagged.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..c613da9c5b --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicTagged.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_parameters_llama_ConstantAtomicTagged = + _test_llm_parameters({ + model: "llama", + name: "ConstantAtomicTagged", + })(typia.llm.parameters()); + +interface ConstantAtomicTaggedParameters { + regular: ConstantAtomicTagged; + nullable: ConstantAtomicTagged | null; + optional: ConstantAtomicTagged | undefined; + faint: ConstantAtomicTagged | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..b92381df0d --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_parameters_llama_ConstantAtomicUnion = + _test_llm_parameters({ + model: "llama", + name: "ConstantAtomicUnion", + })(typia.llm.parameters()); + +interface ConstantAtomicUnionParameters { + regular: ConstantAtomicUnion; + nullable: ConstantAtomicUnion | null; + optional: ConstantAtomicUnion | undefined; + faint: ConstantAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantConstEnumeration.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..653fbf9f0a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantConstEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_parameters_llama_ConstantConstEnumeration = + _test_llm_parameters({ + model: "llama", + name: "ConstantConstEnumeration", + })(typia.llm.parameters()); + +interface ConstantConstEnumerationParameters { + regular: ConstantConstEnumeration; + nullable: ConstantConstEnumeration | null; + optional: ConstantConstEnumeration | undefined; + faint: ConstantConstEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantEnumeration.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantEnumeration.ts new file mode 100644 index 0000000000..b43d1675ef --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ConstantEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_parameters_llama_ConstantEnumeration = + _test_llm_parameters({ + model: "llama", + name: "ConstantEnumeration", + })(typia.llm.parameters()); + +interface ConstantEnumerationParameters { + regular: ConstantEnumeration; + nullable: ConstantEnumeration | null; + optional: ConstantEnumeration | undefined; + faint: ConstantEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicArray.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicArray.ts new file mode 100644 index 0000000000..10048e6f6d --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_parameters_llama_DynamicArray = _test_llm_parameters({ + model: "llama", + name: "DynamicArray", +})(typia.llm.parameters()); + +interface DynamicArrayParameters { + regular: DynamicArray; + nullable: DynamicArray | null; + optional: DynamicArray | undefined; + faint: DynamicArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicComposite.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicComposite.ts new file mode 100644 index 0000000000..0343125b4e --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicComposite.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_parameters_llama_DynamicComposite = _test_llm_parameters({ + model: "llama", + name: "DynamicComposite", +})(typia.llm.parameters()); + +interface DynamicCompositeParameters { + regular: DynamicComposite; + nullable: DynamicComposite | null; + optional: DynamicComposite | undefined; + faint: DynamicComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicConstant.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicConstant.ts new file mode 100644 index 0000000000..286bab8517 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_parameters_llama_DynamicConstant = _test_llm_parameters({ + model: "llama", + name: "DynamicConstant", +})(typia.llm.parameters()); + +interface DynamicConstantParameters { + regular: DynamicConstant; + nullable: DynamicConstant | null; + optional: DynamicConstant | undefined; + faint: DynamicConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicEnumeration.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicEnumeration.ts new file mode 100644 index 0000000000..0a23b26b83 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicEnumeration.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_parameters_llama_DynamicEnumeration = + _test_llm_parameters({ + model: "llama", + name: "DynamicEnumeration", + })(typia.llm.parameters()); + +interface DynamicEnumerationParameters { + regular: DynamicEnumeration; + nullable: DynamicEnumeration | null; + optional: DynamicEnumeration | undefined; + faint: DynamicEnumeration | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicNever.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicNever.ts new file mode 100644 index 0000000000..1ec0d871eb --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicNever.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_parameters_llama_DynamicNever = _test_llm_parameters({ + model: "llama", + name: "DynamicNever", +})(typia.llm.parameters()); + +interface DynamicNeverParameters { + regular: DynamicNever; + nullable: DynamicNever | null; + optional: DynamicNever | undefined; + faint: DynamicNever | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicSimple.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicSimple.ts new file mode 100644 index 0000000000..c4f0b4fd65 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_parameters_llama_DynamicSimple = _test_llm_parameters({ + model: "llama", + name: "DynamicSimple", +})(typia.llm.parameters()); + +interface DynamicSimpleParameters { + regular: DynamicSimple; + nullable: DynamicSimple | null; + optional: DynamicSimple | undefined; + faint: DynamicSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicTemplate.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicTemplate.ts new file mode 100644 index 0000000000..72be077f79 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicTemplate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_parameters_llama_DynamicTemplate = _test_llm_parameters({ + model: "llama", + name: "DynamicTemplate", +})(typia.llm.parameters()); + +interface DynamicTemplateParameters { + regular: DynamicTemplate; + nullable: DynamicTemplate | null; + optional: DynamicTemplate | undefined; + faint: DynamicTemplate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicTree.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicTree.ts new file mode 100644 index 0000000000..0ac02fe7c1 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicTree.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_parameters_llama_DynamicTree = _test_llm_parameters({ + model: "llama", + name: "DynamicTree", +})(typia.llm.parameters()); + +interface DynamicTreeParameters { + regular: DynamicTree; + nullable: DynamicTree | null; + optional: DynamicTree | undefined; + faint: DynamicTree | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicUndefined.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicUndefined.ts new file mode 100644 index 0000000000..f8dd4036d5 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_parameters_llama_DynamicUndefined = _test_llm_parameters({ + model: "llama", + name: "DynamicUndefined", +})(typia.llm.parameters()); + +interface DynamicUndefinedParameters { + regular: DynamicUndefined; + nullable: DynamicUndefined | null; + optional: DynamicUndefined | undefined; + faint: DynamicUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicUnion.ts new file mode 100644 index 0000000000..73309af23b --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_DynamicUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_parameters_llama_DynamicUnion = _test_llm_parameters({ + model: "llama", + name: "DynamicUnion", +})(typia.llm.parameters()); + +interface DynamicUnionParameters { + regular: DynamicUnion; + nullable: DynamicUnion | null; + optional: DynamicUnion | undefined; + faint: DynamicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectAlias.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectAlias.ts new file mode 100644 index 0000000000..2c7a9de07a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectAlias.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_parameters_llama_ObjectAlias = _test_llm_parameters({ + model: "llama", + name: "ObjectAlias", +})(typia.llm.parameters()); + +interface ObjectAliasParameters { + regular: ObjectAlias; + nullable: ObjectAlias | null; + optional: ObjectAlias | undefined; + faint: ObjectAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDate.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDate.ts new file mode 100644 index 0000000000..7f9a82f153 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDate.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_parameters_llama_ObjectDate = _test_llm_parameters({ + model: "llama", + name: "ObjectDate", +})(typia.llm.parameters()); + +interface ObjectDateParameters { + regular: ObjectDate; + nullable: ObjectDate | null; + optional: ObjectDate | undefined; + faint: ObjectDate | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDescription.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDescription.ts new file mode 100644 index 0000000000..6eab1114e5 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDescription.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_parameters_llama_ObjectDescription = _test_llm_parameters( + { + model: "llama", + name: "ObjectDescription", + }, +)(typia.llm.parameters()); + +interface ObjectDescriptionParameters { + regular: ObjectDescription; + nullable: ObjectDescription | null; + optional: ObjectDescription | undefined; + faint: ObjectDescription | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDynamic.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDynamic.ts new file mode 100644 index 0000000000..a3321d1f15 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectDynamic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_parameters_llama_ObjectDynamic = _test_llm_parameters({ + model: "llama", + name: "ObjectDynamic", +})(typia.llm.parameters()); + +interface ObjectDynamicParameters { + regular: ObjectDynamic; + nullable: ObjectDynamic | null; + optional: ObjectDynamic | undefined; + faint: ObjectDynamic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericAlias.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericAlias.ts new file mode 100644 index 0000000000..eee4b473c5 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericAlias.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_parameters_llama_ObjectGenericAlias = + _test_llm_parameters({ + model: "llama", + name: "ObjectGenericAlias", + })(typia.llm.parameters()); + +interface ObjectGenericAliasParameters { + regular: ObjectGenericAlias; + nullable: ObjectGenericAlias | null; + optional: ObjectGenericAlias | undefined; + faint: ObjectGenericAlias | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericArray.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericArray.ts new file mode 100644 index 0000000000..058bc529d1 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericArray.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_parameters_llama_ObjectGenericArray = + _test_llm_parameters({ + model: "llama", + name: "ObjectGenericArray", + })(typia.llm.parameters()); + +interface ObjectGenericArrayParameters { + regular: ObjectGenericArray; + nullable: ObjectGenericArray | null; + optional: ObjectGenericArray | undefined; + faint: ObjectGenericArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericUnion.ts new file mode 100644 index 0000000000..ef46312041 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectGenericUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_parameters_llama_ObjectGenericUnion = + _test_llm_parameters({ + model: "llama", + name: "ObjectGenericUnion", + })(typia.llm.parameters()); + +interface ObjectGenericUnionParameters { + regular: ObjectGenericUnion; + nullable: ObjectGenericUnion | null; + optional: ObjectGenericUnion | undefined; + faint: ObjectGenericUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectInternal.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectInternal.ts new file mode 100644 index 0000000000..5e86132e3a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectInternal.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_parameters_llama_ObjectInternal = _test_llm_parameters({ + model: "llama", + name: "ObjectInternal", +})(typia.llm.parameters()); + +interface ObjectInternalParameters { + regular: ObjectInternal; + nullable: ObjectInternal | null; + optional: ObjectInternal | undefined; + faint: ObjectInternal | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectIntersection.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectIntersection.ts new file mode 100644 index 0000000000..fb604235be --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectIntersection.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_parameters_llama_ObjectIntersection = + _test_llm_parameters({ + model: "llama", + name: "ObjectIntersection", + })(typia.llm.parameters()); + +interface ObjectIntersectionParameters { + regular: ObjectIntersection; + nullable: ObjectIntersection | null; + optional: ObjectIntersection | undefined; + faint: ObjectIntersection | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectJsonTag.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectJsonTag.ts new file mode 100644 index 0000000000..b7613e0dab --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectJsonTag.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_parameters_llama_ObjectJsonTag = _test_llm_parameters({ + model: "llama", + name: "ObjectJsonTag", +})(typia.llm.parameters()); + +interface ObjectJsonTagParameters { + regular: ObjectJsonTag; + nullable: ObjectJsonTag | null; + optional: ObjectJsonTag | undefined; + faint: ObjectJsonTag | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectLiteralProperty.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..cef1cca31c --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectLiteralProperty.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_parameters_llama_ObjectLiteralProperty = + _test_llm_parameters({ + model: "llama", + name: "ObjectLiteralProperty", + })(typia.llm.parameters()); + +interface ObjectLiteralPropertyParameters { + regular: ObjectLiteralProperty; + nullable: ObjectLiteralProperty | null; + optional: ObjectLiteralProperty | undefined; + faint: ObjectLiteralProperty | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectLiteralType.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectLiteralType.ts new file mode 100644 index 0000000000..7c69fe15a0 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectLiteralType.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_parameters_llama_ObjectLiteralType = _test_llm_parameters( + { + model: "llama", + name: "ObjectLiteralType", + }, +)(typia.llm.parameters()); + +interface ObjectLiteralTypeParameters { + regular: ObjectLiteralType; + nullable: ObjectLiteralType | null; + optional: ObjectLiteralType | undefined; + faint: ObjectLiteralType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectNullable.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectNullable.ts new file mode 100644 index 0000000000..2e5a346358 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectNullable.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_parameters_llama_ObjectNullable = _test_llm_parameters({ + model: "llama", + name: "ObjectNullable", +})(typia.llm.parameters()); + +interface ObjectNullableParameters { + regular: ObjectNullable; + nullable: ObjectNullable | null; + optional: ObjectNullable | undefined; + faint: ObjectNullable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectOptional.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectOptional.ts new file mode 100644 index 0000000000..a4d6d443c8 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectOptional.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_parameters_llama_ObjectOptional = _test_llm_parameters({ + model: "llama", + name: "ObjectOptional", +})(typia.llm.parameters()); + +interface ObjectOptionalParameters { + regular: ObjectOptional; + nullable: ObjectOptional | null; + optional: ObjectOptional | undefined; + faint: ObjectOptional | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPartial.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPartial.ts new file mode 100644 index 0000000000..d89f2254ae --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPartial.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_parameters_llama_ObjectPartial = _test_llm_parameters({ + model: "llama", + name: "ObjectPartial", +})(typia.llm.parameters()); + +interface ObjectPartialParameters { + regular: ObjectPartial; + nullable: ObjectPartial | null; + optional: ObjectPartial | undefined; + faint: ObjectPartial | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPartialAndRequired.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..fc026cbec8 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPartialAndRequired.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_parameters_llama_ObjectPartialAndRequired = + _test_llm_parameters({ + model: "llama", + name: "ObjectPartialAndRequired", + })(typia.llm.parameters()); + +interface ObjectPartialAndRequiredParameters { + regular: ObjectPartialAndRequired; + nullable: ObjectPartialAndRequired | null; + optional: ObjectPartialAndRequired | undefined; + faint: ObjectPartialAndRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPrimitive.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPrimitive.ts new file mode 100644 index 0000000000..c96a174ed8 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectPrimitive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_parameters_llama_ObjectPrimitive = _test_llm_parameters({ + model: "llama", + name: "ObjectPrimitive", +})(typia.llm.parameters()); + +interface ObjectPrimitiveParameters { + regular: ObjectPrimitive; + nullable: ObjectPrimitive | null; + optional: ObjectPrimitive | undefined; + faint: ObjectPrimitive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectRecursive.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectRecursive.ts new file mode 100644 index 0000000000..047c3c0210 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectRecursive.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_parameters_llama_ObjectRecursive = _test_llm_parameters({ + model: "llama", + name: "ObjectRecursive", +})(typia.llm.parameters()); + +interface ObjectRecursiveParameters { + regular: ObjectRecursive; + nullable: ObjectRecursive | null; + optional: ObjectRecursive | undefined; + faint: ObjectRecursive | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectRequired.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectRequired.ts new file mode 100644 index 0000000000..6ed0a71f4c --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectRequired.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_parameters_llama_ObjectRequired = _test_llm_parameters({ + model: "llama", + name: "ObjectRequired", +})(typia.llm.parameters()); + +interface ObjectRequiredParameters { + regular: ObjectRequired; + nullable: ObjectRequired | null; + optional: ObjectRequired | undefined; + faint: ObjectRequired | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectSimple.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectSimple.ts new file mode 100644 index 0000000000..339db69ca0 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectSimple.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_parameters_llama_ObjectSimple = _test_llm_parameters({ + model: "llama", + name: "ObjectSimple", +})(typia.llm.parameters()); + +interface ObjectSimpleParameters { + regular: ObjectSimple; + nullable: ObjectSimple | null; + optional: ObjectSimple | undefined; + faint: ObjectSimple | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUndefined.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUndefined.ts new file mode 100644 index 0000000000..d6c98e7e08 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUndefined.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_parameters_llama_ObjectUndefined = _test_llm_parameters({ + model: "llama", + name: "ObjectUndefined", +})(typia.llm.parameters()); + +interface ObjectUndefinedParameters { + regular: ObjectUndefined; + nullable: ObjectUndefined | null; + optional: ObjectUndefined | undefined; + faint: ObjectUndefined | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionComposite.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionComposite.ts new file mode 100644 index 0000000000..57e325caf9 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionComposite.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_parameters_llama_ObjectUnionComposite = + _test_llm_parameters({ + model: "llama", + name: "ObjectUnionComposite", + })(typia.llm.parameters()); + +interface ObjectUnionCompositeParameters { + regular: ObjectUnionComposite; + nullable: ObjectUnionComposite | null; + optional: ObjectUnionComposite | undefined; + faint: ObjectUnionComposite | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionCompositePointer.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..ce9acb0b66 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionCompositePointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_parameters_llama_ObjectUnionCompositePointer = + _test_llm_parameters({ + model: "llama", + name: "ObjectUnionCompositePointer", + })(typia.llm.parameters()); + +interface ObjectUnionCompositePointerParameters { + regular: ObjectUnionCompositePointer; + nullable: ObjectUnionCompositePointer | null; + optional: ObjectUnionCompositePointer | undefined; + faint: ObjectUnionCompositePointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionDouble.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionDouble.ts new file mode 100644 index 0000000000..af744e8d79 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionDouble.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_parameters_llama_ObjectUnionDouble = _test_llm_parameters( + { + model: "llama", + name: "ObjectUnionDouble", + }, +)(typia.llm.parameters()); + +interface ObjectUnionDoubleParameters { + regular: ObjectUnionDouble; + nullable: ObjectUnionDouble | null; + optional: ObjectUnionDouble | undefined; + faint: ObjectUnionDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionExplicit.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..a13d91d1dc --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionExplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_parameters_llama_ObjectUnionExplicit = + _test_llm_parameters({ + model: "llama", + name: "ObjectUnionExplicit", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitParameters { + regular: ObjectUnionExplicit; + nullable: ObjectUnionExplicit | null; + optional: ObjectUnionExplicit | undefined; + faint: ObjectUnionExplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionExplicitPointer.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..6f6f1073df --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionExplicitPointer.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_parameters_llama_ObjectUnionExplicitPointer = + _test_llm_parameters({ + model: "llama", + name: "ObjectUnionExplicitPointer", + })(typia.llm.parameters()); + +interface ObjectUnionExplicitPointerParameters { + regular: ObjectUnionExplicitPointer; + nullable: ObjectUnionExplicitPointer | null; + optional: ObjectUnionExplicitPointer | undefined; + faint: ObjectUnionExplicitPointer | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionImplicit.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..28329cbc83 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionImplicit.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_parameters_llama_ObjectUnionImplicit = + _test_llm_parameters({ + model: "llama", + name: "ObjectUnionImplicit", + })(typia.llm.parameters()); + +interface ObjectUnionImplicitParameters { + regular: ObjectUnionImplicit; + nullable: ObjectUnionImplicit | null; + optional: ObjectUnionImplicit | undefined; + faint: ObjectUnionImplicit | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionNonPredictable.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..88083740b5 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ObjectUnionNonPredictable.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_parameters_llama_ObjectUnionNonPredictable = + _test_llm_parameters({ + model: "llama", + name: "ObjectUnionNonPredictable", + })(typia.llm.parameters()); + +interface ObjectUnionNonPredictableParameters { + regular: ObjectUnionNonPredictable; + nullable: ObjectUnionNonPredictable | null; + optional: ObjectUnionNonPredictable | undefined; + faint: ObjectUnionNonPredictable | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateAtomic.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateAtomic.ts new file mode 100644 index 0000000000..9f079c2a1a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateAtomic.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_parameters_llama_TemplateAtomic = _test_llm_parameters({ + model: "llama", + name: "TemplateAtomic", +})(typia.llm.parameters()); + +interface TemplateAtomicParameters { + regular: TemplateAtomic; + nullable: TemplateAtomic | null; + optional: TemplateAtomic | undefined; + faint: TemplateAtomic | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateConstant.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateConstant.ts new file mode 100644 index 0000000000..c047341f58 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateConstant.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_parameters_llama_TemplateConstant = _test_llm_parameters({ + model: "llama", + name: "TemplateConstant", +})(typia.llm.parameters()); + +interface TemplateConstantParameters { + regular: TemplateConstant; + nullable: TemplateConstant | null; + optional: TemplateConstant | undefined; + faint: TemplateConstant | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateUnion.ts new file mode 100644 index 0000000000..0a1704bff6 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TemplateUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_parameters_llama_TemplateUnion = _test_llm_parameters({ + model: "llama", + name: "TemplateUnion", +})(typia.llm.parameters()); + +interface TemplateUnionParameters { + regular: TemplateUnion; + nullable: TemplateUnion | null; + optional: TemplateUnion | undefined; + faint: TemplateUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonAtomicUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..0eeda8ce30 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonAtomicUnion.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_parameters_llama_ToJsonAtomicUnion = _test_llm_parameters( + { + model: "llama", + name: "ToJsonAtomicUnion", + }, +)(typia.llm.parameters()); + +interface ToJsonAtomicUnionParameters { + regular: ToJsonAtomicUnion; + nullable: ToJsonAtomicUnion | null; + optional: ToJsonAtomicUnion | undefined; + faint: ToJsonAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonDouble.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonDouble.ts new file mode 100644 index 0000000000..d5a7224692 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonDouble.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_parameters_llama_ToJsonDouble = _test_llm_parameters({ + model: "llama", + name: "ToJsonDouble", +})(typia.llm.parameters()); + +interface ToJsonDoubleParameters { + regular: ToJsonDouble; + nullable: ToJsonDouble | null; + optional: ToJsonDouble | undefined; + faint: ToJsonDouble | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonNull.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonNull.ts new file mode 100644 index 0000000000..69479bf526 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonNull.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_parameters_llama_ToJsonNull = _test_llm_parameters({ + model: "llama", + name: "ToJsonNull", +})(typia.llm.parameters()); + +interface ToJsonNullParameters { + regular: ToJsonNull; + nullable: ToJsonNull | null; + optional: ToJsonNull | undefined; + faint: ToJsonNull | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonUnion.ts new file mode 100644 index 0000000000..b8bca84127 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_ToJsonUnion.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_parameters_llama_ToJsonUnion = _test_llm_parameters({ + model: "llama", + name: "ToJsonUnion", +})(typia.llm.parameters()); + +interface ToJsonUnionParameters { + regular: ToJsonUnion; + nullable: ToJsonUnion | null; + optional: ToJsonUnion | undefined; + faint: ToJsonUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagArray.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagArray.ts new file mode 100644 index 0000000000..6c8c6a50b0 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagArray.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_parameters_llama_TypeTagArray = _test_llm_parameters({ + model: "llama", + name: "TypeTagArray", +})(typia.llm.parameters()); + +interface TypeTagArrayParameters { + regular: TypeTagArray; + nullable: TypeTagArray | null; + optional: TypeTagArray | undefined; + faint: TypeTagArray | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagArrayUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..5a9dc9d0a4 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagArrayUnion.ts @@ -0,0 +1,19 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_parameters_llama_TypeTagArrayUnion = _test_llm_parameters( + { + model: "llama", + name: "TypeTagArrayUnion", + }, +)(typia.llm.parameters()); + +interface TypeTagArrayUnionParameters { + regular: TypeTagArrayUnion; + nullable: TypeTagArrayUnion | null; + optional: TypeTagArrayUnion | undefined; + faint: TypeTagArrayUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagAtomicUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..e1c0802fe6 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagAtomicUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_parameters_llama_TypeTagAtomicUnion = + _test_llm_parameters({ + model: "llama", + name: "TypeTagAtomicUnion", + })(typia.llm.parameters()); + +interface TypeTagAtomicUnionParameters { + regular: TypeTagAtomicUnion; + nullable: TypeTagAtomicUnion | null; + optional: TypeTagAtomicUnion | undefined; + faint: TypeTagAtomicUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagCustom.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagCustom.ts new file mode 100644 index 0000000000..a260c9bfd8 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagCustom.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_parameters_llama_TypeTagCustom = _test_llm_parameters({ + model: "llama", + name: "TypeTagCustom", +})(typia.llm.parameters()); + +interface TypeTagCustomParameters { + regular: TypeTagCustom; + nullable: TypeTagCustom | null; + optional: TypeTagCustom | undefined; + faint: TypeTagCustom | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagDefault.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagDefault.ts new file mode 100644 index 0000000000..528fb66842 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagDefault.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_parameters_llama_TypeTagDefault = _test_llm_parameters({ + model: "llama", + name: "TypeTagDefault", +})(typia.llm.parameters()); + +interface TypeTagDefaultParameters { + regular: TypeTagDefault; + nullable: TypeTagDefault | null; + optional: TypeTagDefault | undefined; + faint: TypeTagDefault | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagFormat.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagFormat.ts new file mode 100644 index 0000000000..3afbc9fde8 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagFormat.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_parameters_llama_TypeTagFormat = _test_llm_parameters({ + model: "llama", + name: "TypeTagFormat", +})(typia.llm.parameters()); + +interface TypeTagFormatParameters { + regular: TypeTagFormat; + nullable: TypeTagFormat | null; + optional: TypeTagFormat | undefined; + faint: TypeTagFormat | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagLength.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagLength.ts new file mode 100644 index 0000000000..c9fbbc0998 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagLength.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_parameters_llama_TypeTagLength = _test_llm_parameters({ + model: "llama", + name: "TypeTagLength", +})(typia.llm.parameters()); + +interface TypeTagLengthParameters { + regular: TypeTagLength; + nullable: TypeTagLength | null; + optional: TypeTagLength | undefined; + faint: TypeTagLength | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagMatrix.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagMatrix.ts new file mode 100644 index 0000000000..644f74b10d --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagMatrix.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_parameters_llama_TypeTagMatrix = _test_llm_parameters({ + model: "llama", + name: "TypeTagMatrix", +})(typia.llm.parameters()); + +interface TypeTagMatrixParameters { + regular: TypeTagMatrix; + nullable: TypeTagMatrix | null; + optional: TypeTagMatrix | undefined; + faint: TypeTagMatrix | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagObjectUnion.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..a8d97dd882 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagObjectUnion.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_parameters_llama_TypeTagObjectUnion = + _test_llm_parameters({ + model: "llama", + name: "TypeTagObjectUnion", + })(typia.llm.parameters()); + +interface TypeTagObjectUnionParameters { + regular: TypeTagObjectUnion; + nullable: TypeTagObjectUnion | null; + optional: TypeTagObjectUnion | undefined; + faint: TypeTagObjectUnion | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagPattern.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagPattern.ts new file mode 100644 index 0000000000..a0f5b870d9 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagPattern.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_parameters_llama_TypeTagPattern = _test_llm_parameters({ + model: "llama", + name: "TypeTagPattern", +})(typia.llm.parameters()); + +interface TypeTagPatternParameters { + regular: TypeTagPattern; + nullable: TypeTagPattern | null; + optional: TypeTagPattern | undefined; + faint: TypeTagPattern | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagRange.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagRange.ts new file mode 100644 index 0000000000..0ac440fb0a --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagRange.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_parameters_llama_TypeTagRange = _test_llm_parameters({ + model: "llama", + name: "TypeTagRange", +})(typia.llm.parameters()); + +interface TypeTagRangeParameters { + regular: TypeTagRange; + nullable: TypeTagRange | null; + optional: TypeTagRange | undefined; + faint: TypeTagRange | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagType.ts b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagType.ts new file mode 100644 index 0000000000..d33a75b148 --- /dev/null +++ b/test/src/features/llm.parameters/llama/test_llm_parameters_llama_TypeTagType.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { _test_llm_parameters } from "../../../internal/_test_llm_parameters"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_parameters_llama_TypeTagType = _test_llm_parameters({ + model: "llama", + name: "TypeTagType", +})(typia.llm.parameters()); + +interface TypeTagTypeParameters { + regular: TypeTagType; + nullable: TypeTagType | null; + optional: TypeTagType | undefined; + faint: TypeTagType | null | undefined; + array: Array; +} diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayAny.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayAny.ts new file mode 100644 index 0000000000..7d9ecf1d58 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_schema_3_0_ArrayAny = _test_llm_schema({ + model: "3.0", + name: "ArrayAny", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayHierarchical.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayHierarchical.ts new file mode 100644 index 0000000000..fcdc62226b --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_schema_3_0_ArrayHierarchical = _test_llm_schema({ + model: "3.0", + name: "ArrayHierarchical", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..93718f38d9 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayHierarchicalPointer.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_schema_3_0_ArrayHierarchicalPointer = _test_llm_schema({ + model: "3.0", + name: "ArrayHierarchicalPointer", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayMatrix.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayMatrix.ts new file mode 100644 index 0000000000..a34c7456a2 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_schema_3_0_ArrayMatrix = _test_llm_schema({ + model: "3.0", + name: "ArrayMatrix", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursive.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursive.ts new file mode 100644 index 0000000000..61b15c14c2 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_schema_3_0_ArrayRecursive = _test_llm_schema({ + model: "3.0", + name: "ArrayRecursive", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..b7b6946c5d --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_schema_3_0_ArrayRecursiveUnionExplicit = _test_llm_schema( + { + model: "3.0", + name: "ArrayRecursiveUnionExplicit", + }, +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..e6081ce738 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_schema_3_0_ArrayRecursiveUnionExplicitPointer = + _test_llm_schema({ + model: "3.0", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..60be74106a --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_schema_3_0_ArrayRecursiveUnionImplicit = _test_llm_schema( + { + model: "3.0", + name: "ArrayRecursiveUnionImplicit", + }, +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedNullable.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..737b01ea19 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_schema_3_0_ArrayRepeatedNullable = _test_llm_schema({ + model: "3.0", + name: "ArrayRepeatedNullable", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedRequired.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..840bcb41cf --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_schema_3_0_ArrayRepeatedRequired = _test_llm_schema({ + model: "3.0", + name: "ArrayRepeatedRequired", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..4326ff129d --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_schema_3_0_ArrayRepeatedUnion = _test_llm_schema({ + model: "3.0", + name: "ArrayRepeatedUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArraySimple.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArraySimple.ts new file mode 100644 index 0000000000..7f00f46cb9 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_schema_3_0_ArraySimple = _test_llm_schema({ + model: "3.0", + name: "ArraySimple", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayUnion.ts new file mode 100644 index 0000000000..3ef15dea25 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_schema_3_0_ArrayUnion = _test_llm_schema({ + model: "3.0", + name: "ArrayUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_AtomicUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_AtomicUnion.ts new file mode 100644 index 0000000000..9729988a2a --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_schema_3_0_AtomicUnion = _test_llm_schema({ + model: "3.0", + name: "AtomicUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassGetter.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassGetter.ts new file mode 100644 index 0000000000..edbfc3caba --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_schema_3_0_ClassGetter = _test_llm_schema({ + model: "3.0", + name: "ClassGetter", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassMethod.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassMethod.ts new file mode 100644 index 0000000000..a0a0329fb7 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_schema_3_0_ClassMethod = _test_llm_schema({ + model: "3.0", + name: "ClassMethod", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassPropertyAssignment.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..7cfe9b1349 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ClassPropertyAssignment.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_schema_3_0_ClassPropertyAssignment = _test_llm_schema({ + model: "3.0", + name: "ClassPropertyAssignment", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagArray.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagArray.ts new file mode 100644 index 0000000000..a62d0d304c --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_schema_3_0_CommentTagArray = _test_llm_schema({ + model: "3.0", + name: "CommentTagArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagArrayUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..55ab942ebd --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_schema_3_0_CommentTagArrayUnion = _test_llm_schema({ + model: "3.0", + name: "CommentTagArrayUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagAtomicUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..85dce55b5f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_schema_3_0_CommentTagAtomicUnion = _test_llm_schema({ + model: "3.0", + name: "CommentTagAtomicUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagDefault.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagDefault.ts new file mode 100644 index 0000000000..5986b58a9a --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_schema_3_0_CommentTagDefault = _test_llm_schema({ + model: "3.0", + name: "CommentTagDefault", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagFormat.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagFormat.ts new file mode 100644 index 0000000000..0c1e9747fa --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_schema_3_0_CommentTagFormat = _test_llm_schema({ + model: "3.0", + name: "CommentTagFormat", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagLength.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagLength.ts new file mode 100644 index 0000000000..a20f35f81f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_schema_3_0_CommentTagLength = _test_llm_schema({ + model: "3.0", + name: "CommentTagLength", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagObjectUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..a540b535b0 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_schema_3_0_CommentTagObjectUnion = _test_llm_schema({ + model: "3.0", + name: "CommentTagObjectUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagPattern.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagPattern.ts new file mode 100644 index 0000000000..74a43399ee --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_schema_3_0_CommentTagPattern = _test_llm_schema({ + model: "3.0", + name: "CommentTagPattern", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagRange.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagRange.ts new file mode 100644 index 0000000000..1fc4240870 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_schema_3_0_CommentTagRange = _test_llm_schema({ + model: "3.0", + name: "CommentTagRange", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagType.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagType.ts new file mode 100644 index 0000000000..5986c89dc2 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_schema_3_0_CommentTagType = _test_llm_schema({ + model: "3.0", + name: "CommentTagType", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..cdb8a89253 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicAbsorbed.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_schema_3_0_ConstantAtomicAbsorbed = _test_llm_schema({ + model: "3.0", + name: "ConstantAtomicAbsorbed", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicTagged.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..b3fc14444a --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_schema_3_0_ConstantAtomicTagged = _test_llm_schema({ + model: "3.0", + name: "ConstantAtomicTagged", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..039c81849f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_schema_3_0_ConstantAtomicUnion = _test_llm_schema({ + model: "3.0", + name: "ConstantAtomicUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantConstEnumeration.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..5ebea5d585 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantConstEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_schema_3_0_ConstantConstEnumeration = _test_llm_schema({ + model: "3.0", + name: "ConstantConstEnumeration", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantEnumeration.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantEnumeration.ts new file mode 100644 index 0000000000..ec01849b5f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_schema_3_0_ConstantEnumeration = _test_llm_schema({ + model: "3.0", + name: "ConstantEnumeration", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicArray.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicArray.ts new file mode 100644 index 0000000000..1e8ac80b70 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_schema_3_0_DynamicArray = _test_llm_schema({ + model: "3.0", + name: "DynamicArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicComposite.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicComposite.ts new file mode 100644 index 0000000000..ca714b57a4 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_schema_3_0_DynamicComposite = _test_llm_schema({ + model: "3.0", + name: "DynamicComposite", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicConstant.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicConstant.ts new file mode 100644 index 0000000000..2227587191 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_schema_3_0_DynamicConstant = _test_llm_schema({ + model: "3.0", + name: "DynamicConstant", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicEnumeration.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicEnumeration.ts new file mode 100644 index 0000000000..2e16132285 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_schema_3_0_DynamicEnumeration = _test_llm_schema({ + model: "3.0", + name: "DynamicEnumeration", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicNever.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicNever.ts new file mode 100644 index 0000000000..2a20bba9c5 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_schema_3_0_DynamicNever = _test_llm_schema({ + model: "3.0", + name: "DynamicNever", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicSimple.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicSimple.ts new file mode 100644 index 0000000000..9be39c0bc5 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_schema_3_0_DynamicSimple = _test_llm_schema({ + model: "3.0", + name: "DynamicSimple", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicTemplate.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicTemplate.ts new file mode 100644 index 0000000000..54b9c178a7 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicTemplate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_schema_3_0_DynamicTemplate = _test_llm_schema({ + model: "3.0", + name: "DynamicTemplate", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicTree.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicTree.ts new file mode 100644 index 0000000000..d777d865c8 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicTree.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_schema_3_0_DynamicTree = _test_llm_schema({ + model: "3.0", + name: "DynamicTree", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicUndefined.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicUndefined.ts new file mode 100644 index 0000000000..ef0e2c5012 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_schema_3_0_DynamicUndefined = _test_llm_schema({ + model: "3.0", + name: "DynamicUndefined", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicUnion.ts new file mode 100644 index 0000000000..7180edb3dd --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_DynamicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_schema_3_0_DynamicUnion = _test_llm_schema({ + model: "3.0", + name: "DynamicUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectAlias.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectAlias.ts new file mode 100644 index 0000000000..e861f2f191 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_schema_3_0_ObjectAlias = _test_llm_schema({ + model: "3.0", + name: "ObjectAlias", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDate.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDate.ts new file mode 100644 index 0000000000..146c6dd8d7 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_schema_3_0_ObjectDate = _test_llm_schema({ + model: "3.0", + name: "ObjectDate", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDescription.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDescription.ts new file mode 100644 index 0000000000..754871cb9c --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_schema_3_0_ObjectDescription = _test_llm_schema({ + model: "3.0", + name: "ObjectDescription", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDynamic.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDynamic.ts new file mode 100644 index 0000000000..c5e83ae33a --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectDynamic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_schema_3_0_ObjectDynamic = _test_llm_schema({ + model: "3.0", + name: "ObjectDynamic", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericAlias.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericAlias.ts new file mode 100644 index 0000000000..fcc7c4ff21 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_schema_3_0_ObjectGenericAlias = _test_llm_schema({ + model: "3.0", + name: "ObjectGenericAlias", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericArray.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericArray.ts new file mode 100644 index 0000000000..fb56b8f310 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_schema_3_0_ObjectGenericArray = _test_llm_schema({ + model: "3.0", + name: "ObjectGenericArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericUnion.ts new file mode 100644 index 0000000000..a023c73271 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_schema_3_0_ObjectGenericUnion = _test_llm_schema({ + model: "3.0", + name: "ObjectGenericUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectInternal.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectInternal.ts new file mode 100644 index 0000000000..10391dfa07 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_schema_3_0_ObjectInternal = _test_llm_schema({ + model: "3.0", + name: "ObjectInternal", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectIntersection.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectIntersection.ts new file mode 100644 index 0000000000..55fa669373 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_schema_3_0_ObjectIntersection = _test_llm_schema({ + model: "3.0", + name: "ObjectIntersection", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectJsonTag.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectJsonTag.ts new file mode 100644 index 0000000000..9b6620eec8 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_schema_3_0_ObjectJsonTag = _test_llm_schema({ + model: "3.0", + name: "ObjectJsonTag", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectLiteralProperty.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..703ccc6955 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_schema_3_0_ObjectLiteralProperty = _test_llm_schema({ + model: "3.0", + name: "ObjectLiteralProperty", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectLiteralType.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectLiteralType.ts new file mode 100644 index 0000000000..04c6788b34 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_schema_3_0_ObjectLiteralType = _test_llm_schema({ + model: "3.0", + name: "ObjectLiteralType", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectNullable.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectNullable.ts new file mode 100644 index 0000000000..9a32257f6d --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_schema_3_0_ObjectNullable = _test_llm_schema({ + model: "3.0", + name: "ObjectNullable", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectOptional.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectOptional.ts new file mode 100644 index 0000000000..ef750b405e --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_schema_3_0_ObjectOptional = _test_llm_schema({ + model: "3.0", + name: "ObjectOptional", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPartial.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPartial.ts new file mode 100644 index 0000000000..26c77912fa --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_schema_3_0_ObjectPartial = _test_llm_schema({ + model: "3.0", + name: "ObjectPartial", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..bd801d63ab --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPartialAndRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_3_0_ObjectPartialAndRequired = _test_llm_schema({ + model: "3.0", + name: "ObjectPartialAndRequired", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPrimitive.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPrimitive.ts new file mode 100644 index 0000000000..2285f73723 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_schema_3_0_ObjectPrimitive = _test_llm_schema({ + model: "3.0", + name: "ObjectPrimitive", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectRecursive.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectRecursive.ts new file mode 100644 index 0000000000..81badbcb96 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_schema_3_0_ObjectRecursive = _test_llm_schema({ + model: "3.0", + name: "ObjectRecursive", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectRequired.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectRequired.ts new file mode 100644 index 0000000000..a81852914f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_schema_3_0_ObjectRequired = _test_llm_schema({ + model: "3.0", + name: "ObjectRequired", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectSimple.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectSimple.ts new file mode 100644 index 0000000000..d3aaaf0253 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_schema_3_0_ObjectSimple = _test_llm_schema({ + model: "3.0", + name: "ObjectSimple", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUndefined.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUndefined.ts new file mode 100644 index 0000000000..bf2c1046d7 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_schema_3_0_ObjectUndefined = _test_llm_schema({ + model: "3.0", + name: "ObjectUndefined", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionComposite.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionComposite.ts new file mode 100644 index 0000000000..29413c57d0 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_schema_3_0_ObjectUnionComposite = _test_llm_schema({ + model: "3.0", + name: "ObjectUnionComposite", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionCompositePointer.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..cc798437a3 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionCompositePointer.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_schema_3_0_ObjectUnionCompositePointer = _test_llm_schema( + { + model: "3.0", + name: "ObjectUnionCompositePointer", + }, +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionDouble.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionDouble.ts new file mode 100644 index 0000000000..9ec7e35991 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_schema_3_0_ObjectUnionDouble = _test_llm_schema({ + model: "3.0", + name: "ObjectUnionDouble", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionExplicit.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..0a929c41c3 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_schema_3_0_ObjectUnionExplicit = _test_llm_schema({ + model: "3.0", + name: "ObjectUnionExplicit", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionExplicitPointer.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..d73877ab16 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionExplicitPointer.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_schema_3_0_ObjectUnionExplicitPointer = _test_llm_schema({ + model: "3.0", + name: "ObjectUnionExplicitPointer", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionImplicit.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..16a7092763 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_schema_3_0_ObjectUnionImplicit = _test_llm_schema({ + model: "3.0", + name: "ObjectUnionImplicit", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionNonPredictable.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..b7675131c2 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ObjectUnionNonPredictable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_schema_3_0_ObjectUnionNonPredictable = _test_llm_schema({ + model: "3.0", + name: "ObjectUnionNonPredictable", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateAtomic.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateAtomic.ts new file mode 100644 index 0000000000..61afd40f95 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_schema_3_0_TemplateAtomic = _test_llm_schema({ + model: "3.0", + name: "TemplateAtomic", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateConstant.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateConstant.ts new file mode 100644 index 0000000000..7f1528d643 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_schema_3_0_TemplateConstant = _test_llm_schema({ + model: "3.0", + name: "TemplateConstant", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateUnion.ts new file mode 100644 index 0000000000..b62cb809a4 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_schema_3_0_TemplateUnion = _test_llm_schema({ + model: "3.0", + name: "TemplateUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonAtomicUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..d4ea61ab53 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_schema_3_0_ToJsonAtomicUnion = _test_llm_schema({ + model: "3.0", + name: "ToJsonAtomicUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonDouble.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonDouble.ts new file mode 100644 index 0000000000..42f3f8dceb --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_schema_3_0_ToJsonDouble = _test_llm_schema({ + model: "3.0", + name: "ToJsonDouble", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonNull.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonNull.ts new file mode 100644 index 0000000000..3b339df0df --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_schema_3_0_ToJsonNull = _test_llm_schema({ + model: "3.0", + name: "ToJsonNull", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonUnion.ts new file mode 100644 index 0000000000..990ca901c3 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_schema_3_0_ToJsonUnion = _test_llm_schema({ + model: "3.0", + name: "ToJsonUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagArray.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagArray.ts new file mode 100644 index 0000000000..69f73f6a05 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_schema_3_0_TypeTagArray = _test_llm_schema({ + model: "3.0", + name: "TypeTagArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagArrayUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..25e78ad354 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_schema_3_0_TypeTagArrayUnion = _test_llm_schema({ + model: "3.0", + name: "TypeTagArrayUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagAtomicUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..e10ce1ee1e --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_schema_3_0_TypeTagAtomicUnion = _test_llm_schema({ + model: "3.0", + name: "TypeTagAtomicUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagCustom.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagCustom.ts new file mode 100644 index 0000000000..2fc3e62a5b --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_schema_3_0_TypeTagCustom = _test_llm_schema({ + model: "3.0", + name: "TypeTagCustom", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagDefault.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagDefault.ts new file mode 100644 index 0000000000..6527c546b6 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_schema_3_0_TypeTagDefault = _test_llm_schema({ + model: "3.0", + name: "TypeTagDefault", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagFormat.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagFormat.ts new file mode 100644 index 0000000000..e77b6a9c8f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_schema_3_0_TypeTagFormat = _test_llm_schema({ + model: "3.0", + name: "TypeTagFormat", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagLength.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagLength.ts new file mode 100644 index 0000000000..191f59f7c2 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_schema_3_0_TypeTagLength = _test_llm_schema({ + model: "3.0", + name: "TypeTagLength", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagMatrix.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagMatrix.ts new file mode 100644 index 0000000000..e8c03eb09f --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_schema_3_0_TypeTagMatrix = _test_llm_schema({ + model: "3.0", + name: "TypeTagMatrix", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagObjectUnion.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..bbef697ee5 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_schema_3_0_TypeTagObjectUnion = _test_llm_schema({ + model: "3.0", + name: "TypeTagObjectUnion", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagPattern.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagPattern.ts new file mode 100644 index 0000000000..4f48c6f9f9 --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_schema_3_0_TypeTagPattern = _test_llm_schema({ + model: "3.0", + name: "TypeTagPattern", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagRange.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagRange.ts new file mode 100644 index 0000000000..371a1fed7c --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_schema_3_0_TypeTagRange = _test_llm_schema({ + model: "3.0", + name: "TypeTagRange", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagType.ts b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagType.ts new file mode 100644 index 0000000000..f4f0bd382c --- /dev/null +++ b/test/src/features/llm.schema/3.0/test_llm_schema_3_0_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_schema_3_0_TypeTagType = _test_llm_schema({ + model: "3.0", + name: "TypeTagType", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayAny.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayAny.ts new file mode 100644 index 0000000000..fe6c78c96c --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_schema_3_1_ArrayAny = _test_llm_schema({ + model: "3.1", + name: "ArrayAny", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayHierarchical.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayHierarchical.ts new file mode 100644 index 0000000000..bf8fc25f73 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_schema_3_1_ArrayHierarchical = _test_llm_schema({ + model: "3.1", + name: "ArrayHierarchical", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..157e838fad --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayHierarchicalPointer.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_schema_3_1_ArrayHierarchicalPointer = _test_llm_schema({ + model: "3.1", + name: "ArrayHierarchicalPointer", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayMatrix.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayMatrix.ts new file mode 100644 index 0000000000..10b410b0aa --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_schema_3_1_ArrayMatrix = _test_llm_schema({ + model: "3.1", + name: "ArrayMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursive.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursive.ts new file mode 100644 index 0000000000..1cc9cf6879 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_schema_3_1_ArrayRecursive = _test_llm_schema({ + model: "3.1", + name: "ArrayRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..b7a1512cf9 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_schema_3_1_ArrayRecursiveUnionExplicit = _test_llm_schema( + { + model: "3.1", + name: "ArrayRecursiveUnionExplicit", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..4aec2fe76f --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_schema_3_1_ArrayRecursiveUnionExplicitPointer = + _test_llm_schema({ + model: "3.1", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..147a840ce0 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_schema_3_1_ArrayRecursiveUnionImplicit = _test_llm_schema( + { + model: "3.1", + name: "ArrayRecursiveUnionImplicit", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedNullable.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..1ff6b8f023 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_schema_3_1_ArrayRepeatedNullable = _test_llm_schema({ + model: "3.1", + name: "ArrayRepeatedNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedRequired.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..a15541775e --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_schema_3_1_ArrayRepeatedRequired = _test_llm_schema({ + model: "3.1", + name: "ArrayRepeatedRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..45f5183d8a --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_schema_3_1_ArrayRepeatedUnion = _test_llm_schema({ + model: "3.1", + name: "ArrayRepeatedUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArraySimple.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArraySimple.ts new file mode 100644 index 0000000000..def2059600 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_schema_3_1_ArraySimple = _test_llm_schema({ + model: "3.1", + name: "ArraySimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayUnion.ts new file mode 100644 index 0000000000..52c87cbc1f --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_schema_3_1_ArrayUnion = _test_llm_schema({ + model: "3.1", + name: "ArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_AtomicUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_AtomicUnion.ts new file mode 100644 index 0000000000..e5c0f6573d --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_schema_3_1_AtomicUnion = _test_llm_schema({ + model: "3.1", + name: "AtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassGetter.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassGetter.ts new file mode 100644 index 0000000000..b71a95cd18 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_schema_3_1_ClassGetter = _test_llm_schema({ + model: "3.1", + name: "ClassGetter", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassMethod.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassMethod.ts new file mode 100644 index 0000000000..620f91de07 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_schema_3_1_ClassMethod = _test_llm_schema({ + model: "3.1", + name: "ClassMethod", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassPropertyAssignment.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..14dd12f1e5 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ClassPropertyAssignment.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_schema_3_1_ClassPropertyAssignment = _test_llm_schema({ + model: "3.1", + name: "ClassPropertyAssignment", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagArray.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagArray.ts new file mode 100644 index 0000000000..c21eea6b4c --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_schema_3_1_CommentTagArray = _test_llm_schema({ + model: "3.1", + name: "CommentTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagArrayUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..d752152cde --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_schema_3_1_CommentTagArrayUnion = _test_llm_schema({ + model: "3.1", + name: "CommentTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagAtomicUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..0761b3ca08 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_schema_3_1_CommentTagAtomicUnion = _test_llm_schema({ + model: "3.1", + name: "CommentTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagDefault.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagDefault.ts new file mode 100644 index 0000000000..0b91cde189 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_schema_3_1_CommentTagDefault = _test_llm_schema({ + model: "3.1", + name: "CommentTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagFormat.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagFormat.ts new file mode 100644 index 0000000000..7da0c044d4 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_schema_3_1_CommentTagFormat = _test_llm_schema({ + model: "3.1", + name: "CommentTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagLength.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagLength.ts new file mode 100644 index 0000000000..1f60ff2c58 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_schema_3_1_CommentTagLength = _test_llm_schema({ + model: "3.1", + name: "CommentTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagObjectUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..1be0a339f6 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_schema_3_1_CommentTagObjectUnion = _test_llm_schema({ + model: "3.1", + name: "CommentTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagPattern.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagPattern.ts new file mode 100644 index 0000000000..f62cded9c6 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_schema_3_1_CommentTagPattern = _test_llm_schema({ + model: "3.1", + name: "CommentTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagRange.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagRange.ts new file mode 100644 index 0000000000..0a0e265229 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_schema_3_1_CommentTagRange = _test_llm_schema({ + model: "3.1", + name: "CommentTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagType.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagType.ts new file mode 100644 index 0000000000..b4cdf79a08 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_schema_3_1_CommentTagType = _test_llm_schema({ + model: "3.1", + name: "CommentTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..40b7bf7169 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicAbsorbed.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_schema_3_1_ConstantAtomicAbsorbed = _test_llm_schema({ + model: "3.1", + name: "ConstantAtomicAbsorbed", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicTagged.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..05ea21950e --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_schema_3_1_ConstantAtomicTagged = _test_llm_schema({ + model: "3.1", + name: "ConstantAtomicTagged", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..1e32058312 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_schema_3_1_ConstantAtomicUnion = _test_llm_schema({ + model: "3.1", + name: "ConstantAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantConstEnumeration.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..3e7fdf6f3f --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantConstEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_schema_3_1_ConstantConstEnumeration = _test_llm_schema({ + model: "3.1", + name: "ConstantConstEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantEnumeration.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantEnumeration.ts new file mode 100644 index 0000000000..12d7b8b9f1 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_schema_3_1_ConstantEnumeration = _test_llm_schema({ + model: "3.1", + name: "ConstantEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicArray.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicArray.ts new file mode 100644 index 0000000000..2ad5fe9cd8 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_schema_3_1_DynamicArray = _test_llm_schema({ + model: "3.1", + name: "DynamicArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicComposite.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicComposite.ts new file mode 100644 index 0000000000..ec6690d8aa --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_schema_3_1_DynamicComposite = _test_llm_schema({ + model: "3.1", + name: "DynamicComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicConstant.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicConstant.ts new file mode 100644 index 0000000000..64a3ed0844 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_schema_3_1_DynamicConstant = _test_llm_schema({ + model: "3.1", + name: "DynamicConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicEnumeration.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicEnumeration.ts new file mode 100644 index 0000000000..fc3c30075a --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_schema_3_1_DynamicEnumeration = _test_llm_schema({ + model: "3.1", + name: "DynamicEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicNever.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicNever.ts new file mode 100644 index 0000000000..81cefb50b3 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_schema_3_1_DynamicNever = _test_llm_schema({ + model: "3.1", + name: "DynamicNever", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicSimple.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicSimple.ts new file mode 100644 index 0000000000..4b70c62608 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_schema_3_1_DynamicSimple = _test_llm_schema({ + model: "3.1", + name: "DynamicSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicTemplate.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicTemplate.ts new file mode 100644 index 0000000000..72ef234e69 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicTemplate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_schema_3_1_DynamicTemplate = _test_llm_schema({ + model: "3.1", + name: "DynamicTemplate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicTree.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicTree.ts new file mode 100644 index 0000000000..421e2e86ce --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicTree.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_schema_3_1_DynamicTree = _test_llm_schema({ + model: "3.1", + name: "DynamicTree", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicUndefined.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicUndefined.ts new file mode 100644 index 0000000000..db68b857b4 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_schema_3_1_DynamicUndefined = _test_llm_schema({ + model: "3.1", + name: "DynamicUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicUnion.ts new file mode 100644 index 0000000000..9510870d58 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_DynamicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_schema_3_1_DynamicUnion = _test_llm_schema({ + model: "3.1", + name: "DynamicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectAlias.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectAlias.ts new file mode 100644 index 0000000000..63ccee95e6 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_schema_3_1_ObjectAlias = _test_llm_schema({ + model: "3.1", + name: "ObjectAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDate.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDate.ts new file mode 100644 index 0000000000..dc70203684 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_schema_3_1_ObjectDate = _test_llm_schema({ + model: "3.1", + name: "ObjectDate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDescription.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDescription.ts new file mode 100644 index 0000000000..33df3889e8 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_schema_3_1_ObjectDescription = _test_llm_schema({ + model: "3.1", + name: "ObjectDescription", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDynamic.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDynamic.ts new file mode 100644 index 0000000000..4134e5f5dc --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectDynamic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_schema_3_1_ObjectDynamic = _test_llm_schema({ + model: "3.1", + name: "ObjectDynamic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericAlias.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericAlias.ts new file mode 100644 index 0000000000..9bb045d34a --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_schema_3_1_ObjectGenericAlias = _test_llm_schema({ + model: "3.1", + name: "ObjectGenericAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericArray.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericArray.ts new file mode 100644 index 0000000000..6aa2c5b569 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_schema_3_1_ObjectGenericArray = _test_llm_schema({ + model: "3.1", + name: "ObjectGenericArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericUnion.ts new file mode 100644 index 0000000000..6fc5808d20 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_schema_3_1_ObjectGenericUnion = _test_llm_schema({ + model: "3.1", + name: "ObjectGenericUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectInternal.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectInternal.ts new file mode 100644 index 0000000000..c47220f9e4 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_schema_3_1_ObjectInternal = _test_llm_schema({ + model: "3.1", + name: "ObjectInternal", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectIntersection.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectIntersection.ts new file mode 100644 index 0000000000..61ca002e0d --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_schema_3_1_ObjectIntersection = _test_llm_schema({ + model: "3.1", + name: "ObjectIntersection", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectJsonTag.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectJsonTag.ts new file mode 100644 index 0000000000..7702e96a63 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_schema_3_1_ObjectJsonTag = _test_llm_schema({ + model: "3.1", + name: "ObjectJsonTag", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectLiteralProperty.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..31533581d8 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_schema_3_1_ObjectLiteralProperty = _test_llm_schema({ + model: "3.1", + name: "ObjectLiteralProperty", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectLiteralType.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectLiteralType.ts new file mode 100644 index 0000000000..c9d89aeaab --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_schema_3_1_ObjectLiteralType = _test_llm_schema({ + model: "3.1", + name: "ObjectLiteralType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectNullable.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectNullable.ts new file mode 100644 index 0000000000..204a584aa4 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_schema_3_1_ObjectNullable = _test_llm_schema({ + model: "3.1", + name: "ObjectNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectOptional.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectOptional.ts new file mode 100644 index 0000000000..73e05a86b8 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_schema_3_1_ObjectOptional = _test_llm_schema({ + model: "3.1", + name: "ObjectOptional", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPartial.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPartial.ts new file mode 100644 index 0000000000..12c9a27a0b --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_schema_3_1_ObjectPartial = _test_llm_schema({ + model: "3.1", + name: "ObjectPartial", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..d1f51abe50 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPartialAndRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_3_1_ObjectPartialAndRequired = _test_llm_schema({ + model: "3.1", + name: "ObjectPartialAndRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPrimitive.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPrimitive.ts new file mode 100644 index 0000000000..98758264d2 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_schema_3_1_ObjectPrimitive = _test_llm_schema({ + model: "3.1", + name: "ObjectPrimitive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectRecursive.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectRecursive.ts new file mode 100644 index 0000000000..a5f641aacb --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_schema_3_1_ObjectRecursive = _test_llm_schema({ + model: "3.1", + name: "ObjectRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectRequired.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectRequired.ts new file mode 100644 index 0000000000..08a0e80a04 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_schema_3_1_ObjectRequired = _test_llm_schema({ + model: "3.1", + name: "ObjectRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectSimple.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectSimple.ts new file mode 100644 index 0000000000..2a392a7958 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_schema_3_1_ObjectSimple = _test_llm_schema({ + model: "3.1", + name: "ObjectSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUndefined.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUndefined.ts new file mode 100644 index 0000000000..b65ac87798 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_schema_3_1_ObjectUndefined = _test_llm_schema({ + model: "3.1", + name: "ObjectUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionComposite.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionComposite.ts new file mode 100644 index 0000000000..29132eee3b --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_schema_3_1_ObjectUnionComposite = _test_llm_schema({ + model: "3.1", + name: "ObjectUnionComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionCompositePointer.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..b260c835b3 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionCompositePointer.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_schema_3_1_ObjectUnionCompositePointer = _test_llm_schema( + { + model: "3.1", + name: "ObjectUnionCompositePointer", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionDouble.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionDouble.ts new file mode 100644 index 0000000000..f935a9c582 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_schema_3_1_ObjectUnionDouble = _test_llm_schema({ + model: "3.1", + name: "ObjectUnionDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionExplicit.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..16cb43df26 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_schema_3_1_ObjectUnionExplicit = _test_llm_schema({ + model: "3.1", + name: "ObjectUnionExplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionExplicitPointer.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..3970f82e4d --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionExplicitPointer.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_schema_3_1_ObjectUnionExplicitPointer = _test_llm_schema({ + model: "3.1", + name: "ObjectUnionExplicitPointer", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionImplicit.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..a61e977ed2 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_schema_3_1_ObjectUnionImplicit = _test_llm_schema({ + model: "3.1", + name: "ObjectUnionImplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionNonPredictable.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..0785e2cd8c --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ObjectUnionNonPredictable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_schema_3_1_ObjectUnionNonPredictable = _test_llm_schema({ + model: "3.1", + name: "ObjectUnionNonPredictable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateAtomic.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateAtomic.ts new file mode 100644 index 0000000000..c421a84ccc --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_schema_3_1_TemplateAtomic = _test_llm_schema({ + model: "3.1", + name: "TemplateAtomic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateConstant.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateConstant.ts new file mode 100644 index 0000000000..9bce74e089 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_schema_3_1_TemplateConstant = _test_llm_schema({ + model: "3.1", + name: "TemplateConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateUnion.ts new file mode 100644 index 0000000000..6ec3e7a19b --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_schema_3_1_TemplateUnion = _test_llm_schema({ + model: "3.1", + name: "TemplateUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonAtomicUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..0ef0056044 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_schema_3_1_ToJsonAtomicUnion = _test_llm_schema({ + model: "3.1", + name: "ToJsonAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonDouble.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonDouble.ts new file mode 100644 index 0000000000..c490743297 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_schema_3_1_ToJsonDouble = _test_llm_schema({ + model: "3.1", + name: "ToJsonDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonNull.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonNull.ts new file mode 100644 index 0000000000..a75c2c9d53 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_schema_3_1_ToJsonNull = _test_llm_schema({ + model: "3.1", + name: "ToJsonNull", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonUnion.ts new file mode 100644 index 0000000000..1a3fc50ec8 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_schema_3_1_ToJsonUnion = _test_llm_schema({ + model: "3.1", + name: "ToJsonUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagArray.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagArray.ts new file mode 100644 index 0000000000..64ebeb0522 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_schema_3_1_TypeTagArray = _test_llm_schema({ + model: "3.1", + name: "TypeTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagArrayUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..4eba220b61 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_schema_3_1_TypeTagArrayUnion = _test_llm_schema({ + model: "3.1", + name: "TypeTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagAtomicUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..e6d1879c53 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_schema_3_1_TypeTagAtomicUnion = _test_llm_schema({ + model: "3.1", + name: "TypeTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagCustom.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagCustom.ts new file mode 100644 index 0000000000..0dfd18f2db --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_schema_3_1_TypeTagCustom = _test_llm_schema({ + model: "3.1", + name: "TypeTagCustom", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagDefault.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagDefault.ts new file mode 100644 index 0000000000..419606f9cb --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_schema_3_1_TypeTagDefault = _test_llm_schema({ + model: "3.1", + name: "TypeTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagFormat.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagFormat.ts new file mode 100644 index 0000000000..0036366bf8 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_schema_3_1_TypeTagFormat = _test_llm_schema({ + model: "3.1", + name: "TypeTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagLength.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagLength.ts new file mode 100644 index 0000000000..233cfa17f7 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_schema_3_1_TypeTagLength = _test_llm_schema({ + model: "3.1", + name: "TypeTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagMatrix.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagMatrix.ts new file mode 100644 index 0000000000..b836e7d80a --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_schema_3_1_TypeTagMatrix = _test_llm_schema({ + model: "3.1", + name: "TypeTagMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagObjectUnion.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..4362fbbff0 --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_schema_3_1_TypeTagObjectUnion = _test_llm_schema({ + model: "3.1", + name: "TypeTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagPattern.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagPattern.ts new file mode 100644 index 0000000000..6eef69c66d --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_schema_3_1_TypeTagPattern = _test_llm_schema({ + model: "3.1", + name: "TypeTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagRange.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagRange.ts new file mode 100644 index 0000000000..22b757874e --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_schema_3_1_TypeTagRange = _test_llm_schema({ + model: "3.1", + name: "TypeTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagType.ts b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagType.ts new file mode 100644 index 0000000000..daecf7464e --- /dev/null +++ b/test/src/features/llm.schema/3.1/test_llm_schema_3_1_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_schema_3_1_TypeTagType = _test_llm_schema({ + model: "3.1", + name: "TypeTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayAny.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayAny.ts new file mode 100644 index 0000000000..1040cf9e4b --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_schema_chatgpt_ArrayAny = _test_llm_schema({ + model: "chatgpt", + name: "ArrayAny", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayHierarchical.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayHierarchical.ts new file mode 100644 index 0000000000..6e1defda99 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_schema_chatgpt_ArrayHierarchical = _test_llm_schema({ + model: "chatgpt", + name: "ArrayHierarchical", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..2a290ba659 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayHierarchicalPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_schema_chatgpt_ArrayHierarchicalPointer = + _test_llm_schema({ + model: "chatgpt", + name: "ArrayHierarchicalPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayMatrix.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayMatrix.ts new file mode 100644 index 0000000000..3bef5c30c2 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_schema_chatgpt_ArrayMatrix = _test_llm_schema({ + model: "chatgpt", + name: "ArrayMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursive.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursive.ts new file mode 100644 index 0000000000..a32c3e987e --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_schema_chatgpt_ArrayRecursive = _test_llm_schema({ + model: "chatgpt", + name: "ArrayRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..d601b3946d --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_schema_chatgpt_ArrayRecursiveUnionExplicit = + _test_llm_schema({ + model: "chatgpt", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..564936db7d --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_schema_chatgpt_ArrayRecursiveUnionExplicitPointer = + _test_llm_schema({ + model: "chatgpt", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..0afcad5578 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_schema_chatgpt_ArrayRecursiveUnionImplicit = + _test_llm_schema({ + model: "chatgpt", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedNullable.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..e8134edb4c --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_schema_chatgpt_ArrayRepeatedNullable = _test_llm_schema({ + model: "chatgpt", + name: "ArrayRepeatedNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedRequired.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..18374d1c83 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_schema_chatgpt_ArrayRepeatedRequired = _test_llm_schema({ + model: "chatgpt", + name: "ArrayRepeatedRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..46f58c6666 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_schema_chatgpt_ArrayRepeatedUnion = _test_llm_schema({ + model: "chatgpt", + name: "ArrayRepeatedUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArraySimple.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArraySimple.ts new file mode 100644 index 0000000000..47b10b79e6 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_schema_chatgpt_ArraySimple = _test_llm_schema({ + model: "chatgpt", + name: "ArraySimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayUnion.ts new file mode 100644 index 0000000000..388c02963b --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_schema_chatgpt_ArrayUnion = _test_llm_schema({ + model: "chatgpt", + name: "ArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_AtomicUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_AtomicUnion.ts new file mode 100644 index 0000000000..60e2683d98 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_schema_chatgpt_AtomicUnion = _test_llm_schema({ + model: "chatgpt", + name: "AtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassGetter.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassGetter.ts new file mode 100644 index 0000000000..34a65efa3f --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_schema_chatgpt_ClassGetter = _test_llm_schema({ + model: "chatgpt", + name: "ClassGetter", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassMethod.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassMethod.ts new file mode 100644 index 0000000000..997f03c9bc --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_schema_chatgpt_ClassMethod = _test_llm_schema({ + model: "chatgpt", + name: "ClassMethod", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassPropertyAssignment.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..09456d1876 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ClassPropertyAssignment.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_schema_chatgpt_ClassPropertyAssignment = _test_llm_schema( + { + model: "chatgpt", + name: "ClassPropertyAssignment", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagArray.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagArray.ts new file mode 100644 index 0000000000..bf60e6f57a --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_schema_chatgpt_CommentTagArray = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagArrayUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..f7af428d24 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_schema_chatgpt_CommentTagArrayUnion = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagAtomicUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..fbb6116823 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_schema_chatgpt_CommentTagAtomicUnion = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagDefault.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagDefault.ts new file mode 100644 index 0000000000..978e22ce3b --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_schema_chatgpt_CommentTagDefault = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagFormat.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagFormat.ts new file mode 100644 index 0000000000..122f7e5e4a --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_schema_chatgpt_CommentTagFormat = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagLength.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagLength.ts new file mode 100644 index 0000000000..d6b5697947 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_schema_chatgpt_CommentTagLength = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagObjectUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..1913a6b35c --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_schema_chatgpt_CommentTagObjectUnion = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagPattern.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagPattern.ts new file mode 100644 index 0000000000..de2aeb5d1c --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_schema_chatgpt_CommentTagPattern = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagRange.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagRange.ts new file mode 100644 index 0000000000..dcde1d3246 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_schema_chatgpt_CommentTagRange = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagType.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagType.ts new file mode 100644 index 0000000000..33df7f6f06 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_schema_chatgpt_CommentTagType = _test_llm_schema({ + model: "chatgpt", + name: "CommentTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..fba8adbde4 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicAbsorbed.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_schema_chatgpt_ConstantAtomicAbsorbed = _test_llm_schema({ + model: "chatgpt", + name: "ConstantAtomicAbsorbed", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicTagged.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..955f7c6483 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_schema_chatgpt_ConstantAtomicTagged = _test_llm_schema({ + model: "chatgpt", + name: "ConstantAtomicTagged", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..241ae81e23 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_schema_chatgpt_ConstantAtomicUnion = _test_llm_schema({ + model: "chatgpt", + name: "ConstantAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantConstEnumeration.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..38cac780bd --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantConstEnumeration.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_schema_chatgpt_ConstantConstEnumeration = + _test_llm_schema({ + model: "chatgpt", + name: "ConstantConstEnumeration", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantEnumeration.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantEnumeration.ts new file mode 100644 index 0000000000..369bb5602e --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_schema_chatgpt_ConstantEnumeration = _test_llm_schema({ + model: "chatgpt", + name: "ConstantEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicConstant.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicConstant.ts new file mode 100644 index 0000000000..e35904b854 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_schema_chatgpt_DynamicConstant = _test_llm_schema({ + model: "chatgpt", + name: "DynamicConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicEnumeration.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicEnumeration.ts new file mode 100644 index 0000000000..7d24eb0e0d --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_schema_chatgpt_DynamicEnumeration = _test_llm_schema({ + model: "chatgpt", + name: "DynamicEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicNever.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicNever.ts new file mode 100644 index 0000000000..3a28e34c2a --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_schema_chatgpt_DynamicNever = _test_llm_schema({ + model: "chatgpt", + name: "DynamicNever", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicUndefined.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicUndefined.ts new file mode 100644 index 0000000000..0681b4438f --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_schema_chatgpt_DynamicUndefined = _test_llm_schema({ + model: "chatgpt", + name: "DynamicUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectAlias.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectAlias.ts new file mode 100644 index 0000000000..5b82c1173e --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_schema_chatgpt_ObjectAlias = _test_llm_schema({ + model: "chatgpt", + name: "ObjectAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectDate.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectDate.ts new file mode 100644 index 0000000000..772e021d5a --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_schema_chatgpt_ObjectDate = _test_llm_schema({ + model: "chatgpt", + name: "ObjectDate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectDescription.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectDescription.ts new file mode 100644 index 0000000000..7db73e35b7 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_schema_chatgpt_ObjectDescription = _test_llm_schema({ + model: "chatgpt", + name: "ObjectDescription", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericAlias.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericAlias.ts new file mode 100644 index 0000000000..778040b83b --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_schema_chatgpt_ObjectGenericAlias = _test_llm_schema({ + model: "chatgpt", + name: "ObjectGenericAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericArray.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericArray.ts new file mode 100644 index 0000000000..2bff235c29 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_schema_chatgpt_ObjectGenericArray = _test_llm_schema({ + model: "chatgpt", + name: "ObjectGenericArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericUnion.ts new file mode 100644 index 0000000000..06c87d101d --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_schema_chatgpt_ObjectGenericUnion = _test_llm_schema({ + model: "chatgpt", + name: "ObjectGenericUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectInternal.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectInternal.ts new file mode 100644 index 0000000000..6a93c7c7b2 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_schema_chatgpt_ObjectInternal = _test_llm_schema({ + model: "chatgpt", + name: "ObjectInternal", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectIntersection.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectIntersection.ts new file mode 100644 index 0000000000..eea2567fb7 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_schema_chatgpt_ObjectIntersection = _test_llm_schema({ + model: "chatgpt", + name: "ObjectIntersection", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectJsonTag.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectJsonTag.ts new file mode 100644 index 0000000000..8591760be1 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_schema_chatgpt_ObjectJsonTag = _test_llm_schema({ + model: "chatgpt", + name: "ObjectJsonTag", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectLiteralProperty.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..cc848ad0bb --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_schema_chatgpt_ObjectLiteralProperty = _test_llm_schema({ + model: "chatgpt", + name: "ObjectLiteralProperty", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectLiteralType.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectLiteralType.ts new file mode 100644 index 0000000000..d4d64d0aee --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_schema_chatgpt_ObjectLiteralType = _test_llm_schema({ + model: "chatgpt", + name: "ObjectLiteralType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectNullable.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectNullable.ts new file mode 100644 index 0000000000..8803d48607 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_schema_chatgpt_ObjectNullable = _test_llm_schema({ + model: "chatgpt", + name: "ObjectNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectOptional.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectOptional.ts new file mode 100644 index 0000000000..e21f8fdd66 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_schema_chatgpt_ObjectOptional = _test_llm_schema({ + model: "chatgpt", + name: "ObjectOptional", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPartial.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPartial.ts new file mode 100644 index 0000000000..310ee2fe75 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_schema_chatgpt_ObjectPartial = _test_llm_schema({ + model: "chatgpt", + name: "ObjectPartial", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..7edeb95e70 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPartialAndRequired.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_chatgpt_ObjectPartialAndRequired = + _test_llm_schema({ + model: "chatgpt", + name: "ObjectPartialAndRequired", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPrimitive.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPrimitive.ts new file mode 100644 index 0000000000..f0480b8e63 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_schema_chatgpt_ObjectPrimitive = _test_llm_schema({ + model: "chatgpt", + name: "ObjectPrimitive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectRecursive.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectRecursive.ts new file mode 100644 index 0000000000..544aa31bc4 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_schema_chatgpt_ObjectRecursive = _test_llm_schema({ + model: "chatgpt", + name: "ObjectRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectRequired.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectRequired.ts new file mode 100644 index 0000000000..ccbaa85b1c --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_schema_chatgpt_ObjectRequired = _test_llm_schema({ + model: "chatgpt", + name: "ObjectRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectSimple.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectSimple.ts new file mode 100644 index 0000000000..3ba08796b3 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_schema_chatgpt_ObjectSimple = _test_llm_schema({ + model: "chatgpt", + name: "ObjectSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUndefined.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUndefined.ts new file mode 100644 index 0000000000..aaba3f78fc --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_schema_chatgpt_ObjectUndefined = _test_llm_schema({ + model: "chatgpt", + name: "ObjectUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionComposite.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionComposite.ts new file mode 100644 index 0000000000..06d6cb35bf --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_schema_chatgpt_ObjectUnionComposite = _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionCompositePointer.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..adda1596b6 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionCompositePointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_schema_chatgpt_ObjectUnionCompositePointer = + _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionCompositePointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionDouble.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionDouble.ts new file mode 100644 index 0000000000..d1f6b36001 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_schema_chatgpt_ObjectUnionDouble = _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionExplicit.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..8022818500 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_schema_chatgpt_ObjectUnionExplicit = _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionExplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionExplicitPointer.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..e452455c74 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_schema_chatgpt_ObjectUnionExplicitPointer = + _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionImplicit.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..e39f18a317 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_schema_chatgpt_ObjectUnionImplicit = _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionImplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionNonPredictable.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..730b3d0c57 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ObjectUnionNonPredictable.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_schema_chatgpt_ObjectUnionNonPredictable = + _test_llm_schema({ + model: "chatgpt", + name: "ObjectUnionNonPredictable", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateAtomic.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateAtomic.ts new file mode 100644 index 0000000000..fd5a0da87f --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_schema_chatgpt_TemplateAtomic = _test_llm_schema({ + model: "chatgpt", + name: "TemplateAtomic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateConstant.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateConstant.ts new file mode 100644 index 0000000000..89817d91eb --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_schema_chatgpt_TemplateConstant = _test_llm_schema({ + model: "chatgpt", + name: "TemplateConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateUnion.ts new file mode 100644 index 0000000000..c606e8c086 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_schema_chatgpt_TemplateUnion = _test_llm_schema({ + model: "chatgpt", + name: "TemplateUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonAtomicUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..4a829fd7ba --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_schema_chatgpt_ToJsonAtomicUnion = _test_llm_schema({ + model: "chatgpt", + name: "ToJsonAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonDouble.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonDouble.ts new file mode 100644 index 0000000000..269fc3222e --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_schema_chatgpt_ToJsonDouble = _test_llm_schema({ + model: "chatgpt", + name: "ToJsonDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonNull.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonNull.ts new file mode 100644 index 0000000000..8519837bcd --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_schema_chatgpt_ToJsonNull = _test_llm_schema({ + model: "chatgpt", + name: "ToJsonNull", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonUnion.ts new file mode 100644 index 0000000000..835cbdbf6e --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_schema_chatgpt_ToJsonUnion = _test_llm_schema({ + model: "chatgpt", + name: "ToJsonUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagArray.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagArray.ts new file mode 100644 index 0000000000..6a23e0304f --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_schema_chatgpt_TypeTagArray = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagArrayUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..7006bc46ba --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_schema_chatgpt_TypeTagArrayUnion = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagAtomicUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..84c2be7048 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_schema_chatgpt_TypeTagAtomicUnion = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagCustom.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagCustom.ts new file mode 100644 index 0000000000..19d9380727 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_schema_chatgpt_TypeTagCustom = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagCustom", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagDefault.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagDefault.ts new file mode 100644 index 0000000000..00417d50dc --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_schema_chatgpt_TypeTagDefault = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagFormat.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagFormat.ts new file mode 100644 index 0000000000..f4743f6456 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_schema_chatgpt_TypeTagFormat = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagLength.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagLength.ts new file mode 100644 index 0000000000..2594648620 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_schema_chatgpt_TypeTagLength = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagMatrix.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagMatrix.ts new file mode 100644 index 0000000000..5a514fc6ef --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_schema_chatgpt_TypeTagMatrix = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagObjectUnion.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..60460b88a7 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_schema_chatgpt_TypeTagObjectUnion = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagPattern.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagPattern.ts new file mode 100644 index 0000000000..128c54c20f --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_schema_chatgpt_TypeTagPattern = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagRange.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagRange.ts new file mode 100644 index 0000000000..35e148640b --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_schema_chatgpt_TypeTagRange = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagType.ts b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagType.ts new file mode 100644 index 0000000000..4930ddcc99 --- /dev/null +++ b/test/src/features/llm.schema/chatgpt/test_llm_schema_chatgpt_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_schema_chatgpt_TypeTagType = _test_llm_schema({ + model: "chatgpt", + name: "TypeTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayAny.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayAny.ts new file mode 100644 index 0000000000..cd64a02c74 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_schema_claude_ArrayAny = _test_llm_schema({ + model: "claude", + name: "ArrayAny", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayHierarchical.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayHierarchical.ts new file mode 100644 index 0000000000..e265a7fa45 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_schema_claude_ArrayHierarchical = _test_llm_schema({ + model: "claude", + name: "ArrayHierarchical", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..2940d4e8f2 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayHierarchicalPointer.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_schema_claude_ArrayHierarchicalPointer = _test_llm_schema( + { + model: "claude", + name: "ArrayHierarchicalPointer", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayMatrix.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayMatrix.ts new file mode 100644 index 0000000000..63ba6bb362 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_schema_claude_ArrayMatrix = _test_llm_schema({ + model: "claude", + name: "ArrayMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursive.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursive.ts new file mode 100644 index 0000000000..21fcf0ea28 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_schema_claude_ArrayRecursive = _test_llm_schema({ + model: "claude", + name: "ArrayRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..9f2c51c2e8 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_schema_claude_ArrayRecursiveUnionExplicit = + _test_llm_schema({ + model: "claude", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..8a290925a2 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_schema_claude_ArrayRecursiveUnionExplicitPointer = + _test_llm_schema({ + model: "claude", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..562ee3d79c --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_schema_claude_ArrayRecursiveUnionImplicit = + _test_llm_schema({ + model: "claude", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedNullable.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..0bccd4ca7a --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_schema_claude_ArrayRepeatedNullable = _test_llm_schema({ + model: "claude", + name: "ArrayRepeatedNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedRequired.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..7790a62314 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_schema_claude_ArrayRepeatedRequired = _test_llm_schema({ + model: "claude", + name: "ArrayRepeatedRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..6ed5dac170 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_schema_claude_ArrayRepeatedUnion = _test_llm_schema({ + model: "claude", + name: "ArrayRepeatedUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArraySimple.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArraySimple.ts new file mode 100644 index 0000000000..cfd6b72d8d --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_schema_claude_ArraySimple = _test_llm_schema({ + model: "claude", + name: "ArraySimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayUnion.ts new file mode 100644 index 0000000000..9fadbfcf36 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_schema_claude_ArrayUnion = _test_llm_schema({ + model: "claude", + name: "ArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_AtomicUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_AtomicUnion.ts new file mode 100644 index 0000000000..53ad37467c --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_schema_claude_AtomicUnion = _test_llm_schema({ + model: "claude", + name: "AtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassGetter.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassGetter.ts new file mode 100644 index 0000000000..0deca72ca8 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_schema_claude_ClassGetter = _test_llm_schema({ + model: "claude", + name: "ClassGetter", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassMethod.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassMethod.ts new file mode 100644 index 0000000000..c50ba94816 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_schema_claude_ClassMethod = _test_llm_schema({ + model: "claude", + name: "ClassMethod", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassPropertyAssignment.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..633d3d5b38 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ClassPropertyAssignment.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_schema_claude_ClassPropertyAssignment = _test_llm_schema({ + model: "claude", + name: "ClassPropertyAssignment", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagArray.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagArray.ts new file mode 100644 index 0000000000..8312b296cc --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_schema_claude_CommentTagArray = _test_llm_schema({ + model: "claude", + name: "CommentTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagArrayUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..ebb6ee5b8f --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_schema_claude_CommentTagArrayUnion = _test_llm_schema({ + model: "claude", + name: "CommentTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagAtomicUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..fa149e20c1 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_schema_claude_CommentTagAtomicUnion = _test_llm_schema({ + model: "claude", + name: "CommentTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagDefault.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagDefault.ts new file mode 100644 index 0000000000..c2f8bd9180 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_schema_claude_CommentTagDefault = _test_llm_schema({ + model: "claude", + name: "CommentTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagFormat.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagFormat.ts new file mode 100644 index 0000000000..48df73615f --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_schema_claude_CommentTagFormat = _test_llm_schema({ + model: "claude", + name: "CommentTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagLength.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagLength.ts new file mode 100644 index 0000000000..aebc68dde6 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_schema_claude_CommentTagLength = _test_llm_schema({ + model: "claude", + name: "CommentTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagObjectUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..421da70121 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_schema_claude_CommentTagObjectUnion = _test_llm_schema({ + model: "claude", + name: "CommentTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagPattern.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagPattern.ts new file mode 100644 index 0000000000..663f99b068 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_schema_claude_CommentTagPattern = _test_llm_schema({ + model: "claude", + name: "CommentTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagRange.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagRange.ts new file mode 100644 index 0000000000..14abf4bee4 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_schema_claude_CommentTagRange = _test_llm_schema({ + model: "claude", + name: "CommentTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagType.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagType.ts new file mode 100644 index 0000000000..b854b77a16 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_schema_claude_CommentTagType = _test_llm_schema({ + model: "claude", + name: "CommentTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..8e84400c62 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicAbsorbed.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_schema_claude_ConstantAtomicAbsorbed = _test_llm_schema({ + model: "claude", + name: "ConstantAtomicAbsorbed", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicTagged.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..d1ea99c300 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_schema_claude_ConstantAtomicTagged = _test_llm_schema({ + model: "claude", + name: "ConstantAtomicTagged", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..58bce2fb40 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_schema_claude_ConstantAtomicUnion = _test_llm_schema({ + model: "claude", + name: "ConstantAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantConstEnumeration.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..bed1b227c9 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantConstEnumeration.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_schema_claude_ConstantConstEnumeration = _test_llm_schema( + { + model: "claude", + name: "ConstantConstEnumeration", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantEnumeration.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantEnumeration.ts new file mode 100644 index 0000000000..dced4ca1d4 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_schema_claude_ConstantEnumeration = _test_llm_schema({ + model: "claude", + name: "ConstantEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicArray.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicArray.ts new file mode 100644 index 0000000000..43a4392dd4 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_schema_claude_DynamicArray = _test_llm_schema({ + model: "claude", + name: "DynamicArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicComposite.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicComposite.ts new file mode 100644 index 0000000000..f3b6ba9cb7 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_schema_claude_DynamicComposite = _test_llm_schema({ + model: "claude", + name: "DynamicComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicConstant.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicConstant.ts new file mode 100644 index 0000000000..e51f359a41 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_schema_claude_DynamicConstant = _test_llm_schema({ + model: "claude", + name: "DynamicConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicEnumeration.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicEnumeration.ts new file mode 100644 index 0000000000..85c3e198b1 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_schema_claude_DynamicEnumeration = _test_llm_schema({ + model: "claude", + name: "DynamicEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicNever.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicNever.ts new file mode 100644 index 0000000000..86773df3d5 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_schema_claude_DynamicNever = _test_llm_schema({ + model: "claude", + name: "DynamicNever", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicSimple.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicSimple.ts new file mode 100644 index 0000000000..0a8c1dfe48 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_schema_claude_DynamicSimple = _test_llm_schema({ + model: "claude", + name: "DynamicSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicTemplate.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicTemplate.ts new file mode 100644 index 0000000000..c2a0de2db7 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicTemplate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_schema_claude_DynamicTemplate = _test_llm_schema({ + model: "claude", + name: "DynamicTemplate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicTree.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicTree.ts new file mode 100644 index 0000000000..90af8fbd09 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicTree.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_schema_claude_DynamicTree = _test_llm_schema({ + model: "claude", + name: "DynamicTree", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicUndefined.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicUndefined.ts new file mode 100644 index 0000000000..33a3e80ef9 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_schema_claude_DynamicUndefined = _test_llm_schema({ + model: "claude", + name: "DynamicUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicUnion.ts new file mode 100644 index 0000000000..15ca00d895 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_DynamicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_schema_claude_DynamicUnion = _test_llm_schema({ + model: "claude", + name: "DynamicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectAlias.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectAlias.ts new file mode 100644 index 0000000000..6211575166 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_schema_claude_ObjectAlias = _test_llm_schema({ + model: "claude", + name: "ObjectAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDate.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDate.ts new file mode 100644 index 0000000000..359a8da054 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_schema_claude_ObjectDate = _test_llm_schema({ + model: "claude", + name: "ObjectDate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDescription.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDescription.ts new file mode 100644 index 0000000000..e03f624c92 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_schema_claude_ObjectDescription = _test_llm_schema({ + model: "claude", + name: "ObjectDescription", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDynamic.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDynamic.ts new file mode 100644 index 0000000000..981be12744 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectDynamic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_schema_claude_ObjectDynamic = _test_llm_schema({ + model: "claude", + name: "ObjectDynamic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericAlias.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericAlias.ts new file mode 100644 index 0000000000..9cb31ef47b --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_schema_claude_ObjectGenericAlias = _test_llm_schema({ + model: "claude", + name: "ObjectGenericAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericArray.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericArray.ts new file mode 100644 index 0000000000..5d5bc721aa --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_schema_claude_ObjectGenericArray = _test_llm_schema({ + model: "claude", + name: "ObjectGenericArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericUnion.ts new file mode 100644 index 0000000000..e32d656724 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_schema_claude_ObjectGenericUnion = _test_llm_schema({ + model: "claude", + name: "ObjectGenericUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectInternal.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectInternal.ts new file mode 100644 index 0000000000..502593cc47 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_schema_claude_ObjectInternal = _test_llm_schema({ + model: "claude", + name: "ObjectInternal", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectIntersection.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectIntersection.ts new file mode 100644 index 0000000000..973ed8f88e --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_schema_claude_ObjectIntersection = _test_llm_schema({ + model: "claude", + name: "ObjectIntersection", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectJsonTag.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectJsonTag.ts new file mode 100644 index 0000000000..b87890a6bb --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_schema_claude_ObjectJsonTag = _test_llm_schema({ + model: "claude", + name: "ObjectJsonTag", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectLiteralProperty.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..b487be121f --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_schema_claude_ObjectLiteralProperty = _test_llm_schema({ + model: "claude", + name: "ObjectLiteralProperty", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectLiteralType.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectLiteralType.ts new file mode 100644 index 0000000000..6342288f66 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_schema_claude_ObjectLiteralType = _test_llm_schema({ + model: "claude", + name: "ObjectLiteralType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectNullable.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectNullable.ts new file mode 100644 index 0000000000..25336f96d0 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_schema_claude_ObjectNullable = _test_llm_schema({ + model: "claude", + name: "ObjectNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectOptional.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectOptional.ts new file mode 100644 index 0000000000..affa05680e --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_schema_claude_ObjectOptional = _test_llm_schema({ + model: "claude", + name: "ObjectOptional", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPartial.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPartial.ts new file mode 100644 index 0000000000..23058e5a9c --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_schema_claude_ObjectPartial = _test_llm_schema({ + model: "claude", + name: "ObjectPartial", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..8afbfaa717 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPartialAndRequired.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_claude_ObjectPartialAndRequired = _test_llm_schema( + { + model: "claude", + name: "ObjectPartialAndRequired", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPrimitive.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPrimitive.ts new file mode 100644 index 0000000000..48021a44af --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_schema_claude_ObjectPrimitive = _test_llm_schema({ + model: "claude", + name: "ObjectPrimitive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectRecursive.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectRecursive.ts new file mode 100644 index 0000000000..7b62963f50 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_schema_claude_ObjectRecursive = _test_llm_schema({ + model: "claude", + name: "ObjectRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectRequired.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectRequired.ts new file mode 100644 index 0000000000..3c97e7f380 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_schema_claude_ObjectRequired = _test_llm_schema({ + model: "claude", + name: "ObjectRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectSimple.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectSimple.ts new file mode 100644 index 0000000000..35bad7a8de --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_schema_claude_ObjectSimple = _test_llm_schema({ + model: "claude", + name: "ObjectSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUndefined.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUndefined.ts new file mode 100644 index 0000000000..7c075575a2 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_schema_claude_ObjectUndefined = _test_llm_schema({ + model: "claude", + name: "ObjectUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionComposite.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionComposite.ts new file mode 100644 index 0000000000..53d3c754a1 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_schema_claude_ObjectUnionComposite = _test_llm_schema({ + model: "claude", + name: "ObjectUnionComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionCompositePointer.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..d1ad247cc4 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionCompositePointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_schema_claude_ObjectUnionCompositePointer = + _test_llm_schema({ + model: "claude", + name: "ObjectUnionCompositePointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionDouble.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionDouble.ts new file mode 100644 index 0000000000..e5e353030e --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_schema_claude_ObjectUnionDouble = _test_llm_schema({ + model: "claude", + name: "ObjectUnionDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionExplicit.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..3dea63a086 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_schema_claude_ObjectUnionExplicit = _test_llm_schema({ + model: "claude", + name: "ObjectUnionExplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionExplicitPointer.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..ded4612b92 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_schema_claude_ObjectUnionExplicitPointer = + _test_llm_schema({ + model: "claude", + name: "ObjectUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionImplicit.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..44e8674bd3 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_schema_claude_ObjectUnionImplicit = _test_llm_schema({ + model: "claude", + name: "ObjectUnionImplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionNonPredictable.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..13091dc118 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ObjectUnionNonPredictable.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_schema_claude_ObjectUnionNonPredictable = + _test_llm_schema({ + model: "claude", + name: "ObjectUnionNonPredictable", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateAtomic.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateAtomic.ts new file mode 100644 index 0000000000..7331bc6871 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_schema_claude_TemplateAtomic = _test_llm_schema({ + model: "claude", + name: "TemplateAtomic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateConstant.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateConstant.ts new file mode 100644 index 0000000000..10c986e887 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_schema_claude_TemplateConstant = _test_llm_schema({ + model: "claude", + name: "TemplateConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateUnion.ts new file mode 100644 index 0000000000..89c83f375c --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_schema_claude_TemplateUnion = _test_llm_schema({ + model: "claude", + name: "TemplateUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonAtomicUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..c5b33a5d58 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_schema_claude_ToJsonAtomicUnion = _test_llm_schema({ + model: "claude", + name: "ToJsonAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonDouble.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonDouble.ts new file mode 100644 index 0000000000..15768b1d9b --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_schema_claude_ToJsonDouble = _test_llm_schema({ + model: "claude", + name: "ToJsonDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonNull.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonNull.ts new file mode 100644 index 0000000000..f751339d4b --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_schema_claude_ToJsonNull = _test_llm_schema({ + model: "claude", + name: "ToJsonNull", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonUnion.ts new file mode 100644 index 0000000000..9f449cbd4d --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_schema_claude_ToJsonUnion = _test_llm_schema({ + model: "claude", + name: "ToJsonUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagArray.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagArray.ts new file mode 100644 index 0000000000..7654d39865 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_schema_claude_TypeTagArray = _test_llm_schema({ + model: "claude", + name: "TypeTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagArrayUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..13febdf194 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_schema_claude_TypeTagArrayUnion = _test_llm_schema({ + model: "claude", + name: "TypeTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagAtomicUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..663c9714fe --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_schema_claude_TypeTagAtomicUnion = _test_llm_schema({ + model: "claude", + name: "TypeTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagCustom.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagCustom.ts new file mode 100644 index 0000000000..60f5e374ce --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_schema_claude_TypeTagCustom = _test_llm_schema({ + model: "claude", + name: "TypeTagCustom", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagDefault.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagDefault.ts new file mode 100644 index 0000000000..c9210ed906 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_schema_claude_TypeTagDefault = _test_llm_schema({ + model: "claude", + name: "TypeTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagFormat.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagFormat.ts new file mode 100644 index 0000000000..72ccc73907 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_schema_claude_TypeTagFormat = _test_llm_schema({ + model: "claude", + name: "TypeTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagLength.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagLength.ts new file mode 100644 index 0000000000..8c42856a68 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_schema_claude_TypeTagLength = _test_llm_schema({ + model: "claude", + name: "TypeTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagMatrix.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagMatrix.ts new file mode 100644 index 0000000000..bb5c9f5be3 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_schema_claude_TypeTagMatrix = _test_llm_schema({ + model: "claude", + name: "TypeTagMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagObjectUnion.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..a01c786226 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_schema_claude_TypeTagObjectUnion = _test_llm_schema({ + model: "claude", + name: "TypeTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagPattern.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagPattern.ts new file mode 100644 index 0000000000..60f25fc8ad --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_schema_claude_TypeTagPattern = _test_llm_schema({ + model: "claude", + name: "TypeTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagRange.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagRange.ts new file mode 100644 index 0000000000..6b14add794 --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_schema_claude_TypeTagRange = _test_llm_schema({ + model: "claude", + name: "TypeTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagType.ts b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagType.ts new file mode 100644 index 0000000000..517f0ef97d --- /dev/null +++ b/test/src/features/llm.schema/claude/test_llm_schema_claude_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_schema_claude_TypeTagType = _test_llm_schema({ + model: "claude", + name: "TypeTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayAny.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayAny.ts new file mode 100644 index 0000000000..71bfb381bf --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_schema_gemini_ArrayAny = _test_llm_schema({ + model: "gemini", + name: "ArrayAny", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayHierarchical.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayHierarchical.ts new file mode 100644 index 0000000000..7c6ee8d8c4 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_schema_gemini_ArrayHierarchical = _test_llm_schema({ + model: "gemini", + name: "ArrayHierarchical", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..69ed8a6988 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayHierarchicalPointer.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_schema_gemini_ArrayHierarchicalPointer = _test_llm_schema( + { + model: "gemini", + name: "ArrayHierarchicalPointer", + }, +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayMatrix.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayMatrix.ts new file mode 100644 index 0000000000..490192eb55 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_schema_gemini_ArrayMatrix = _test_llm_schema({ + model: "gemini", + name: "ArrayMatrix", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayRecursive.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayRecursive.ts new file mode 100644 index 0000000000..484cf4d84e --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_schema_gemini_ArrayRecursive = _test_llm_schema({ + model: "gemini", + name: "ArrayRecursive", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArraySimple.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArraySimple.ts new file mode 100644 index 0000000000..252983b3d8 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_schema_gemini_ArraySimple = _test_llm_schema({ + model: "gemini", + name: "ArraySimple", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassGetter.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassGetter.ts new file mode 100644 index 0000000000..4dac7d7255 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_schema_gemini_ClassGetter = _test_llm_schema({ + model: "gemini", + name: "ClassGetter", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassMethod.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassMethod.ts new file mode 100644 index 0000000000..2b2cf95b72 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_schema_gemini_ClassMethod = _test_llm_schema({ + model: "gemini", + name: "ClassMethod", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassPropertyAssignment.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..d48c50db70 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ClassPropertyAssignment.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_schema_gemini_ClassPropertyAssignment = _test_llm_schema({ + model: "gemini", + name: "ClassPropertyAssignment", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagArray.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagArray.ts new file mode 100644 index 0000000000..4eb4506299 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_schema_gemini_CommentTagArray = _test_llm_schema({ + model: "gemini", + name: "CommentTagArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagFormat.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagFormat.ts new file mode 100644 index 0000000000..b182684a10 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_schema_gemini_CommentTagFormat = _test_llm_schema({ + model: "gemini", + name: "CommentTagFormat", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagLength.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagLength.ts new file mode 100644 index 0000000000..7c2e5fbdda --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_schema_gemini_CommentTagLength = _test_llm_schema({ + model: "gemini", + name: "CommentTagLength", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagPattern.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagPattern.ts new file mode 100644 index 0000000000..cddb78c150 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_schema_gemini_CommentTagPattern = _test_llm_schema({ + model: "gemini", + name: "CommentTagPattern", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagRange.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagRange.ts new file mode 100644 index 0000000000..1dd65d8ada --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_schema_gemini_CommentTagRange = _test_llm_schema({ + model: "gemini", + name: "CommentTagRange", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagType.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagType.ts new file mode 100644 index 0000000000..4a372315b1 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_schema_gemini_CommentTagType = _test_llm_schema({ + model: "gemini", + name: "CommentTagType", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..1083148841 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ConstantAtomicAbsorbed.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_schema_gemini_ConstantAtomicAbsorbed = _test_llm_schema({ + model: "gemini", + name: "ConstantAtomicAbsorbed", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicConstant.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicConstant.ts new file mode 100644 index 0000000000..01bcee7dfb --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_schema_gemini_DynamicConstant = _test_llm_schema({ + model: "gemini", + name: "DynamicConstant", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicEnumeration.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicEnumeration.ts new file mode 100644 index 0000000000..10748dfe91 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_schema_gemini_DynamicEnumeration = _test_llm_schema({ + model: "gemini", + name: "DynamicEnumeration", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicNever.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicNever.ts new file mode 100644 index 0000000000..0915199966 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_schema_gemini_DynamicNever = _test_llm_schema({ + model: "gemini", + name: "DynamicNever", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicUndefined.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicUndefined.ts new file mode 100644 index 0000000000..1a36956a12 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_schema_gemini_DynamicUndefined = _test_llm_schema({ + model: "gemini", + name: "DynamicUndefined", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectDate.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectDate.ts new file mode 100644 index 0000000000..8173586495 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_schema_gemini_ObjectDate = _test_llm_schema({ + model: "gemini", + name: "ObjectDate", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectDescription.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectDescription.ts new file mode 100644 index 0000000000..91ed6a0cfc --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_schema_gemini_ObjectDescription = _test_llm_schema({ + model: "gemini", + name: "ObjectDescription", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectGenericAlias.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectGenericAlias.ts new file mode 100644 index 0000000000..eb0e6fdd01 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_schema_gemini_ObjectGenericAlias = _test_llm_schema({ + model: "gemini", + name: "ObjectGenericAlias", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectGenericArray.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectGenericArray.ts new file mode 100644 index 0000000000..0d83d3e85a --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_schema_gemini_ObjectGenericArray = _test_llm_schema({ + model: "gemini", + name: "ObjectGenericArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectInternal.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectInternal.ts new file mode 100644 index 0000000000..7b86be72f7 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_schema_gemini_ObjectInternal = _test_llm_schema({ + model: "gemini", + name: "ObjectInternal", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectIntersection.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectIntersection.ts new file mode 100644 index 0000000000..ed255dfb31 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_schema_gemini_ObjectIntersection = _test_llm_schema({ + model: "gemini", + name: "ObjectIntersection", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectJsonTag.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectJsonTag.ts new file mode 100644 index 0000000000..3f3db7994b --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_schema_gemini_ObjectJsonTag = _test_llm_schema({ + model: "gemini", + name: "ObjectJsonTag", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectLiteralProperty.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..ac749b6c21 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_schema_gemini_ObjectLiteralProperty = _test_llm_schema({ + model: "gemini", + name: "ObjectLiteralProperty", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectLiteralType.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectLiteralType.ts new file mode 100644 index 0000000000..dc978a57a9 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_schema_gemini_ObjectLiteralType = _test_llm_schema({ + model: "gemini", + name: "ObjectLiteralType", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectOptional.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectOptional.ts new file mode 100644 index 0000000000..1020d25ccc --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_schema_gemini_ObjectOptional = _test_llm_schema({ + model: "gemini", + name: "ObjectOptional", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPartial.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPartial.ts new file mode 100644 index 0000000000..8c0e64605b --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_schema_gemini_ObjectPartial = _test_llm_schema({ + model: "gemini", + name: "ObjectPartial", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..90ad60e246 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPartialAndRequired.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_gemini_ObjectPartialAndRequired = _test_llm_schema( + { + model: "gemini", + name: "ObjectPartialAndRequired", + }, +)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPrimitive.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPrimitive.ts new file mode 100644 index 0000000000..75410d046f --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_schema_gemini_ObjectPrimitive = _test_llm_schema({ + model: "gemini", + name: "ObjectPrimitive", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectRecursive.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectRecursive.ts new file mode 100644 index 0000000000..9d236db42a --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_schema_gemini_ObjectRecursive = _test_llm_schema({ + model: "gemini", + name: "ObjectRecursive", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectRequired.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectRequired.ts new file mode 100644 index 0000000000..0e1b27e110 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_schema_gemini_ObjectRequired = _test_llm_schema({ + model: "gemini", + name: "ObjectRequired", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectSimple.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectSimple.ts new file mode 100644 index 0000000000..6782030689 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_schema_gemini_ObjectSimple = _test_llm_schema({ + model: "gemini", + name: "ObjectSimple", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TemplateAtomic.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TemplateAtomic.ts new file mode 100644 index 0000000000..02dc80b10d --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_schema_gemini_TemplateAtomic = _test_llm_schema({ + model: "gemini", + name: "TemplateAtomic", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TemplateConstant.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TemplateConstant.ts new file mode 100644 index 0000000000..d4d1ab104b --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_schema_gemini_TemplateConstant = _test_llm_schema({ + model: "gemini", + name: "TemplateConstant", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ToJsonDouble.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ToJsonDouble.ts new file mode 100644 index 0000000000..3bec5f40f9 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_schema_gemini_ToJsonDouble = _test_llm_schema({ + model: "gemini", + name: "ToJsonDouble", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ToJsonNull.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ToJsonNull.ts new file mode 100644 index 0000000000..0db314dfbb --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_schema_gemini_ToJsonNull = _test_llm_schema({ + model: "gemini", + name: "ToJsonNull", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagArray.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagArray.ts new file mode 100644 index 0000000000..ae3a36b5a6 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_schema_gemini_TypeTagArray = _test_llm_schema({ + model: "gemini", + name: "TypeTagArray", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagCustom.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagCustom.ts new file mode 100644 index 0000000000..9f25dfa8fc --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_schema_gemini_TypeTagCustom = _test_llm_schema({ + model: "gemini", + name: "TypeTagCustom", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagFormat.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagFormat.ts new file mode 100644 index 0000000000..845d607bb8 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_schema_gemini_TypeTagFormat = _test_llm_schema({ + model: "gemini", + name: "TypeTagFormat", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagLength.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagLength.ts new file mode 100644 index 0000000000..ce7b286d89 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_schema_gemini_TypeTagLength = _test_llm_schema({ + model: "gemini", + name: "TypeTagLength", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagMatrix.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagMatrix.ts new file mode 100644 index 0000000000..52627acda5 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_schema_gemini_TypeTagMatrix = _test_llm_schema({ + model: "gemini", + name: "TypeTagMatrix", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagPattern.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagPattern.ts new file mode 100644 index 0000000000..7f6da35d93 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_schema_gemini_TypeTagPattern = _test_llm_schema({ + model: "gemini", + name: "TypeTagPattern", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagRange.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagRange.ts new file mode 100644 index 0000000000..1e4a2a5f62 --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_schema_gemini_TypeTagRange = _test_llm_schema({ + model: "gemini", + name: "TypeTagRange", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagType.ts b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagType.ts new file mode 100644 index 0000000000..dc9af1674c --- /dev/null +++ b/test/src/features/llm.schema/gemini/test_llm_schema_gemini_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_schema_gemini_TypeTagType = _test_llm_schema({ + model: "gemini", + name: "TypeTagType", +})(typia.llm.schema()); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayAny.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayAny.ts new file mode 100644 index 0000000000..f4c2bd87a8 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayAny.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayAny } from "../../../structures/ArrayAny"; + +export const test_llm_schema_llama_ArrayAny = _test_llm_schema({ + model: "llama", + name: "ArrayAny", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayHierarchical.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayHierarchical.ts new file mode 100644 index 0000000000..d6661448ca --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayHierarchical.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchical } from "../../../structures/ArrayHierarchical"; + +export const test_llm_schema_llama_ArrayHierarchical = _test_llm_schema({ + model: "llama", + name: "ArrayHierarchical", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayHierarchicalPointer.ts new file mode 100644 index 0000000000..2e73e2b713 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayHierarchicalPointer.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayHierarchicalPointer } from "../../../structures/ArrayHierarchicalPointer"; + +export const test_llm_schema_llama_ArrayHierarchicalPointer = _test_llm_schema({ + model: "llama", + name: "ArrayHierarchicalPointer", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayMatrix.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayMatrix.ts new file mode 100644 index 0000000000..01339859ce --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayMatrix } from "../../../structures/ArrayMatrix"; + +export const test_llm_schema_llama_ArrayMatrix = _test_llm_schema({ + model: "llama", + name: "ArrayMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursive.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursive.ts new file mode 100644 index 0000000000..047e72dab1 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursive } from "../../../structures/ArrayRecursive"; + +export const test_llm_schema_llama_ArrayRecursive = _test_llm_schema({ + model: "llama", + name: "ArrayRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionExplicit.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionExplicit.ts new file mode 100644 index 0000000000..e93f51e81d --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionExplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicit } from "../../../structures/ArrayRecursiveUnionExplicit"; + +export const test_llm_schema_llama_ArrayRecursiveUnionExplicit = + _test_llm_schema({ + model: "llama", + name: "ArrayRecursiveUnionExplicit", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionExplicitPointer.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionExplicitPointer.ts new file mode 100644 index 0000000000..ed1d6bbb19 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionExplicitPointer } from "../../../structures/ArrayRecursiveUnionExplicitPointer"; + +export const test_llm_schema_llama_ArrayRecursiveUnionExplicitPointer = + _test_llm_schema({ + model: "llama", + name: "ArrayRecursiveUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionImplicit.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionImplicit.ts new file mode 100644 index 0000000000..d935f5a797 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRecursiveUnionImplicit.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRecursiveUnionImplicit } from "../../../structures/ArrayRecursiveUnionImplicit"; + +export const test_llm_schema_llama_ArrayRecursiveUnionImplicit = + _test_llm_schema({ + model: "llama", + name: "ArrayRecursiveUnionImplicit", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedNullable.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedNullable.ts new file mode 100644 index 0000000000..b471ae6757 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedNullable } from "../../../structures/ArrayRepeatedNullable"; + +export const test_llm_schema_llama_ArrayRepeatedNullable = _test_llm_schema({ + model: "llama", + name: "ArrayRepeatedNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedRequired.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedRequired.ts new file mode 100644 index 0000000000..1c9077dcf9 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedRequired } from "../../../structures/ArrayRepeatedRequired"; + +export const test_llm_schema_llama_ArrayRepeatedRequired = _test_llm_schema({ + model: "llama", + name: "ArrayRepeatedRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedUnion.ts new file mode 100644 index 0000000000..3743b4523a --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayRepeatedUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayRepeatedUnion } from "../../../structures/ArrayRepeatedUnion"; + +export const test_llm_schema_llama_ArrayRepeatedUnion = _test_llm_schema({ + model: "llama", + name: "ArrayRepeatedUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArraySimple.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArraySimple.ts new file mode 100644 index 0000000000..412fa7f6e7 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArraySimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArraySimple } from "../../../structures/ArraySimple"; + +export const test_llm_schema_llama_ArraySimple = _test_llm_schema({ + model: "llama", + name: "ArraySimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayUnion.ts new file mode 100644 index 0000000000..0ea79449a0 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ArrayUnion } from "../../../structures/ArrayUnion"; + +export const test_llm_schema_llama_ArrayUnion = _test_llm_schema({ + model: "llama", + name: "ArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_AtomicUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_AtomicUnion.ts new file mode 100644 index 0000000000..78a51e3ad9 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_AtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { AtomicUnion } from "../../../structures/AtomicUnion"; + +export const test_llm_schema_llama_AtomicUnion = _test_llm_schema({ + model: "llama", + name: "AtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassGetter.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassGetter.ts new file mode 100644 index 0000000000..8da66dd80e --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassGetter.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassGetter } from "../../../structures/ClassGetter"; + +export const test_llm_schema_llama_ClassGetter = _test_llm_schema({ + model: "llama", + name: "ClassGetter", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassMethod.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassMethod.ts new file mode 100644 index 0000000000..4573e76cef --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassMethod.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassMethod } from "../../../structures/ClassMethod"; + +export const test_llm_schema_llama_ClassMethod = _test_llm_schema({ + model: "llama", + name: "ClassMethod", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassPropertyAssignment.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassPropertyAssignment.ts new file mode 100644 index 0000000000..f9bbcda94a --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ClassPropertyAssignment.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ClassPropertyAssignment } from "../../../structures/ClassPropertyAssignment"; + +export const test_llm_schema_llama_ClassPropertyAssignment = _test_llm_schema({ + model: "llama", + name: "ClassPropertyAssignment", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagArray.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagArray.ts new file mode 100644 index 0000000000..be411a9a45 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArray } from "../../../structures/CommentTagArray"; + +export const test_llm_schema_llama_CommentTagArray = _test_llm_schema({ + model: "llama", + name: "CommentTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagArrayUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagArrayUnion.ts new file mode 100644 index 0000000000..b01ef20e26 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagArrayUnion } from "../../../structures/CommentTagArrayUnion"; + +export const test_llm_schema_llama_CommentTagArrayUnion = _test_llm_schema({ + model: "llama", + name: "CommentTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagAtomicUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagAtomicUnion.ts new file mode 100644 index 0000000000..35b934701c --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagAtomicUnion } from "../../../structures/CommentTagAtomicUnion"; + +export const test_llm_schema_llama_CommentTagAtomicUnion = _test_llm_schema({ + model: "llama", + name: "CommentTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagDefault.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagDefault.ts new file mode 100644 index 0000000000..fb4479afba --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagDefault } from "../../../structures/CommentTagDefault"; + +export const test_llm_schema_llama_CommentTagDefault = _test_llm_schema({ + model: "llama", + name: "CommentTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagFormat.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagFormat.ts new file mode 100644 index 0000000000..6fd9d63bc5 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagFormat } from "../../../structures/CommentTagFormat"; + +export const test_llm_schema_llama_CommentTagFormat = _test_llm_schema({ + model: "llama", + name: "CommentTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagLength.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagLength.ts new file mode 100644 index 0000000000..d4fca5c63d --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagLength } from "../../../structures/CommentTagLength"; + +export const test_llm_schema_llama_CommentTagLength = _test_llm_schema({ + model: "llama", + name: "CommentTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagObjectUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagObjectUnion.ts new file mode 100644 index 0000000000..3126fe1b71 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagObjectUnion } from "../../../structures/CommentTagObjectUnion"; + +export const test_llm_schema_llama_CommentTagObjectUnion = _test_llm_schema({ + model: "llama", + name: "CommentTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagPattern.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagPattern.ts new file mode 100644 index 0000000000..1d5558305d --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagPattern } from "../../../structures/CommentTagPattern"; + +export const test_llm_schema_llama_CommentTagPattern = _test_llm_schema({ + model: "llama", + name: "CommentTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagRange.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagRange.ts new file mode 100644 index 0000000000..e454c1c21d --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagRange } from "../../../structures/CommentTagRange"; + +export const test_llm_schema_llama_CommentTagRange = _test_llm_schema({ + model: "llama", + name: "CommentTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagType.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagType.ts new file mode 100644 index 0000000000..21bc3294b0 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_CommentTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { CommentTagType } from "../../../structures/CommentTagType"; + +export const test_llm_schema_llama_CommentTagType = _test_llm_schema({ + model: "llama", + name: "CommentTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicAbsorbed.ts new file mode 100644 index 0000000000..23e163e2c8 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicAbsorbed.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicAbsorbed } from "../../../structures/ConstantAtomicAbsorbed"; + +export const test_llm_schema_llama_ConstantAtomicAbsorbed = _test_llm_schema({ + model: "llama", + name: "ConstantAtomicAbsorbed", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicTagged.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicTagged.ts new file mode 100644 index 0000000000..8b900fe441 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicTagged.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicTagged } from "../../../structures/ConstantAtomicTagged"; + +export const test_llm_schema_llama_ConstantAtomicTagged = _test_llm_schema({ + model: "llama", + name: "ConstantAtomicTagged", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicUnion.ts new file mode 100644 index 0000000000..9ceedf5cde --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantAtomicUnion } from "../../../structures/ConstantAtomicUnion"; + +export const test_llm_schema_llama_ConstantAtomicUnion = _test_llm_schema({ + model: "llama", + name: "ConstantAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantConstEnumeration.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantConstEnumeration.ts new file mode 100644 index 0000000000..6136b3f172 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantConstEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantConstEnumeration } from "../../../structures/ConstantConstEnumeration"; + +export const test_llm_schema_llama_ConstantConstEnumeration = _test_llm_schema({ + model: "llama", + name: "ConstantConstEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantEnumeration.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantEnumeration.ts new file mode 100644 index 0000000000..f01b00535e --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ConstantEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ConstantEnumeration } from "../../../structures/ConstantEnumeration"; + +export const test_llm_schema_llama_ConstantEnumeration = _test_llm_schema({ + model: "llama", + name: "ConstantEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicArray.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicArray.ts new file mode 100644 index 0000000000..64a8ef169c --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicArray } from "../../../structures/DynamicArray"; + +export const test_llm_schema_llama_DynamicArray = _test_llm_schema({ + model: "llama", + name: "DynamicArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicComposite.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicComposite.ts new file mode 100644 index 0000000000..434468d1d0 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicComposite } from "../../../structures/DynamicComposite"; + +export const test_llm_schema_llama_DynamicComposite = _test_llm_schema({ + model: "llama", + name: "DynamicComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicConstant.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicConstant.ts new file mode 100644 index 0000000000..861162404c --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicConstant } from "../../../structures/DynamicConstant"; + +export const test_llm_schema_llama_DynamicConstant = _test_llm_schema({ + model: "llama", + name: "DynamicConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicEnumeration.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicEnumeration.ts new file mode 100644 index 0000000000..e50737f9e0 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicEnumeration.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicEnumeration } from "../../../structures/DynamicEnumeration"; + +export const test_llm_schema_llama_DynamicEnumeration = _test_llm_schema({ + model: "llama", + name: "DynamicEnumeration", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicNever.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicNever.ts new file mode 100644 index 0000000000..d879561137 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicNever.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicNever } from "../../../structures/DynamicNever"; + +export const test_llm_schema_llama_DynamicNever = _test_llm_schema({ + model: "llama", + name: "DynamicNever", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicSimple.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicSimple.ts new file mode 100644 index 0000000000..b179d215a6 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicSimple } from "../../../structures/DynamicSimple"; + +export const test_llm_schema_llama_DynamicSimple = _test_llm_schema({ + model: "llama", + name: "DynamicSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicTemplate.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicTemplate.ts new file mode 100644 index 0000000000..b9e5f18555 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicTemplate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTemplate } from "../../../structures/DynamicTemplate"; + +export const test_llm_schema_llama_DynamicTemplate = _test_llm_schema({ + model: "llama", + name: "DynamicTemplate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicTree.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicTree.ts new file mode 100644 index 0000000000..3b59f1b501 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicTree.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicTree } from "../../../structures/DynamicTree"; + +export const test_llm_schema_llama_DynamicTree = _test_llm_schema({ + model: "llama", + name: "DynamicTree", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicUndefined.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicUndefined.ts new file mode 100644 index 0000000000..ebf3021873 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUndefined } from "../../../structures/DynamicUndefined"; + +export const test_llm_schema_llama_DynamicUndefined = _test_llm_schema({ + model: "llama", + name: "DynamicUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicUnion.ts new file mode 100644 index 0000000000..bea401d3d9 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_DynamicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { DynamicUnion } from "../../../structures/DynamicUnion"; + +export const test_llm_schema_llama_DynamicUnion = _test_llm_schema({ + model: "llama", + name: "DynamicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectAlias.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectAlias.ts new file mode 100644 index 0000000000..e4e479e806 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectAlias } from "../../../structures/ObjectAlias"; + +export const test_llm_schema_llama_ObjectAlias = _test_llm_schema({ + model: "llama", + name: "ObjectAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDate.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDate.ts new file mode 100644 index 0000000000..574bbfa390 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDate.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDate } from "../../../structures/ObjectDate"; + +export const test_llm_schema_llama_ObjectDate = _test_llm_schema({ + model: "llama", + name: "ObjectDate", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDescription.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDescription.ts new file mode 100644 index 0000000000..f7c0bf15ad --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDescription.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDescription } from "../../../structures/ObjectDescription"; + +export const test_llm_schema_llama_ObjectDescription = _test_llm_schema({ + model: "llama", + name: "ObjectDescription", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDynamic.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDynamic.ts new file mode 100644 index 0000000000..aa7add7fbb --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectDynamic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectDynamic } from "../../../structures/ObjectDynamic"; + +export const test_llm_schema_llama_ObjectDynamic = _test_llm_schema({ + model: "llama", + name: "ObjectDynamic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericAlias.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericAlias.ts new file mode 100644 index 0000000000..ff15f001b3 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericAlias.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericAlias } from "../../../structures/ObjectGenericAlias"; + +export const test_llm_schema_llama_ObjectGenericAlias = _test_llm_schema({ + model: "llama", + name: "ObjectGenericAlias", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericArray.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericArray.ts new file mode 100644 index 0000000000..9ae7303e31 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericArray } from "../../../structures/ObjectGenericArray"; + +export const test_llm_schema_llama_ObjectGenericArray = _test_llm_schema({ + model: "llama", + name: "ObjectGenericArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericUnion.ts new file mode 100644 index 0000000000..db4d8acfc6 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectGenericUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectGenericUnion } from "../../../structures/ObjectGenericUnion"; + +export const test_llm_schema_llama_ObjectGenericUnion = _test_llm_schema({ + model: "llama", + name: "ObjectGenericUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectInternal.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectInternal.ts new file mode 100644 index 0000000000..14e5b7bdc6 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectInternal.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectInternal } from "../../../structures/ObjectInternal"; + +export const test_llm_schema_llama_ObjectInternal = _test_llm_schema({ + model: "llama", + name: "ObjectInternal", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectIntersection.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectIntersection.ts new file mode 100644 index 0000000000..578b01ebfd --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectIntersection.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectIntersection } from "../../../structures/ObjectIntersection"; + +export const test_llm_schema_llama_ObjectIntersection = _test_llm_schema({ + model: "llama", + name: "ObjectIntersection", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectJsonTag.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectJsonTag.ts new file mode 100644 index 0000000000..06c83f90d2 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectJsonTag.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectJsonTag } from "../../../structures/ObjectJsonTag"; + +export const test_llm_schema_llama_ObjectJsonTag = _test_llm_schema({ + model: "llama", + name: "ObjectJsonTag", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectLiteralProperty.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectLiteralProperty.ts new file mode 100644 index 0000000000..dd0368c7c3 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectLiteralProperty.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralProperty } from "../../../structures/ObjectLiteralProperty"; + +export const test_llm_schema_llama_ObjectLiteralProperty = _test_llm_schema({ + model: "llama", + name: "ObjectLiteralProperty", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectLiteralType.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectLiteralType.ts new file mode 100644 index 0000000000..535ae57a18 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectLiteralType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectLiteralType } from "../../../structures/ObjectLiteralType"; + +export const test_llm_schema_llama_ObjectLiteralType = _test_llm_schema({ + model: "llama", + name: "ObjectLiteralType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectNullable.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectNullable.ts new file mode 100644 index 0000000000..5638c0cf23 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectNullable.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectNullable } from "../../../structures/ObjectNullable"; + +export const test_llm_schema_llama_ObjectNullable = _test_llm_schema({ + model: "llama", + name: "ObjectNullable", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectOptional.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectOptional.ts new file mode 100644 index 0000000000..2fff6d14f1 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectOptional.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectOptional } from "../../../structures/ObjectOptional"; + +export const test_llm_schema_llama_ObjectOptional = _test_llm_schema({ + model: "llama", + name: "ObjectOptional", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPartial.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPartial.ts new file mode 100644 index 0000000000..77101aff7b --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPartial.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartial } from "../../../structures/ObjectPartial"; + +export const test_llm_schema_llama_ObjectPartial = _test_llm_schema({ + model: "llama", + name: "ObjectPartial", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPartialAndRequired.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPartialAndRequired.ts new file mode 100644 index 0000000000..d900b5fc69 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPartialAndRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPartialAndRequired } from "../../../structures/ObjectPartialAndRequired"; + +export const test_llm_schema_llama_ObjectPartialAndRequired = _test_llm_schema({ + model: "llama", + name: "ObjectPartialAndRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPrimitive.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPrimitive.ts new file mode 100644 index 0000000000..1f0da933f1 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectPrimitive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectPrimitive } from "../../../structures/ObjectPrimitive"; + +export const test_llm_schema_llama_ObjectPrimitive = _test_llm_schema({ + model: "llama", + name: "ObjectPrimitive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectRecursive.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectRecursive.ts new file mode 100644 index 0000000000..a87545cc89 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectRecursive.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRecursive } from "../../../structures/ObjectRecursive"; + +export const test_llm_schema_llama_ObjectRecursive = _test_llm_schema({ + model: "llama", + name: "ObjectRecursive", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectRequired.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectRequired.ts new file mode 100644 index 0000000000..2fee589661 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectRequired.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectRequired } from "../../../structures/ObjectRequired"; + +export const test_llm_schema_llama_ObjectRequired = _test_llm_schema({ + model: "llama", + name: "ObjectRequired", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectSimple.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectSimple.ts new file mode 100644 index 0000000000..6b098da7f9 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectSimple.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectSimple } from "../../../structures/ObjectSimple"; + +export const test_llm_schema_llama_ObjectSimple = _test_llm_schema({ + model: "llama", + name: "ObjectSimple", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUndefined.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUndefined.ts new file mode 100644 index 0000000000..3a9aa0d06e --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUndefined.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUndefined } from "../../../structures/ObjectUndefined"; + +export const test_llm_schema_llama_ObjectUndefined = _test_llm_schema({ + model: "llama", + name: "ObjectUndefined", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionComposite.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionComposite.ts new file mode 100644 index 0000000000..621b81c598 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionComposite.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionComposite } from "../../../structures/ObjectUnionComposite"; + +export const test_llm_schema_llama_ObjectUnionComposite = _test_llm_schema({ + model: "llama", + name: "ObjectUnionComposite", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionCompositePointer.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionCompositePointer.ts new file mode 100644 index 0000000000..1135175795 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionCompositePointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionCompositePointer } from "../../../structures/ObjectUnionCompositePointer"; + +export const test_llm_schema_llama_ObjectUnionCompositePointer = + _test_llm_schema({ + model: "llama", + name: "ObjectUnionCompositePointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionDouble.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionDouble.ts new file mode 100644 index 0000000000..6547250b0e --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionDouble } from "../../../structures/ObjectUnionDouble"; + +export const test_llm_schema_llama_ObjectUnionDouble = _test_llm_schema({ + model: "llama", + name: "ObjectUnionDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionExplicit.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionExplicit.ts new file mode 100644 index 0000000000..5bcd46d30a --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionExplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicit } from "../../../structures/ObjectUnionExplicit"; + +export const test_llm_schema_llama_ObjectUnionExplicit = _test_llm_schema({ + model: "llama", + name: "ObjectUnionExplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionExplicitPointer.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionExplicitPointer.ts new file mode 100644 index 0000000000..cf65e78361 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionExplicitPointer.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionExplicitPointer } from "../../../structures/ObjectUnionExplicitPointer"; + +export const test_llm_schema_llama_ObjectUnionExplicitPointer = + _test_llm_schema({ + model: "llama", + name: "ObjectUnionExplicitPointer", + })(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionImplicit.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionImplicit.ts new file mode 100644 index 0000000000..edb4641b07 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionImplicit.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionImplicit } from "../../../structures/ObjectUnionImplicit"; + +export const test_llm_schema_llama_ObjectUnionImplicit = _test_llm_schema({ + model: "llama", + name: "ObjectUnionImplicit", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionNonPredictable.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionNonPredictable.ts new file mode 100644 index 0000000000..c6a6fbe4f5 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ObjectUnionNonPredictable.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ObjectUnionNonPredictable } from "../../../structures/ObjectUnionNonPredictable"; + +export const test_llm_schema_llama_ObjectUnionNonPredictable = _test_llm_schema( + { + model: "llama", + name: "ObjectUnionNonPredictable", + }, +)(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateAtomic.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateAtomic.ts new file mode 100644 index 0000000000..e2fd3cb2bc --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateAtomic.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateAtomic } from "../../../structures/TemplateAtomic"; + +export const test_llm_schema_llama_TemplateAtomic = _test_llm_schema({ + model: "llama", + name: "TemplateAtomic", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateConstant.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateConstant.ts new file mode 100644 index 0000000000..38832c5022 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateConstant.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateConstant } from "../../../structures/TemplateConstant"; + +export const test_llm_schema_llama_TemplateConstant = _test_llm_schema({ + model: "llama", + name: "TemplateConstant", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateUnion.ts new file mode 100644 index 0000000000..7be8adc9d2 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TemplateUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TemplateUnion } from "../../../structures/TemplateUnion"; + +export const test_llm_schema_llama_TemplateUnion = _test_llm_schema({ + model: "llama", + name: "TemplateUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonAtomicUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonAtomicUnion.ts new file mode 100644 index 0000000000..c5defcacaf --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonAtomicUnion } from "../../../structures/ToJsonAtomicUnion"; + +export const test_llm_schema_llama_ToJsonAtomicUnion = _test_llm_schema({ + model: "llama", + name: "ToJsonAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonDouble.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonDouble.ts new file mode 100644 index 0000000000..b70f6d7204 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonDouble.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonDouble } from "../../../structures/ToJsonDouble"; + +export const test_llm_schema_llama_ToJsonDouble = _test_llm_schema({ + model: "llama", + name: "ToJsonDouble", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonNull.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonNull.ts new file mode 100644 index 0000000000..afacd0113e --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonNull.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonNull } from "../../../structures/ToJsonNull"; + +export const test_llm_schema_llama_ToJsonNull = _test_llm_schema({ + model: "llama", + name: "ToJsonNull", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonUnion.ts new file mode 100644 index 0000000000..36bff4d0bb --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_ToJsonUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { ToJsonUnion } from "../../../structures/ToJsonUnion"; + +export const test_llm_schema_llama_ToJsonUnion = _test_llm_schema({ + model: "llama", + name: "ToJsonUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagArray.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagArray.ts new file mode 100644 index 0000000000..d12bbcb551 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagArray.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArray } from "../../../structures/TypeTagArray"; + +export const test_llm_schema_llama_TypeTagArray = _test_llm_schema({ + model: "llama", + name: "TypeTagArray", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagArrayUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagArrayUnion.ts new file mode 100644 index 0000000000..6e65fbed6c --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagArrayUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagArrayUnion } from "../../../structures/TypeTagArrayUnion"; + +export const test_llm_schema_llama_TypeTagArrayUnion = _test_llm_schema({ + model: "llama", + name: "TypeTagArrayUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagAtomicUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagAtomicUnion.ts new file mode 100644 index 0000000000..9145907379 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagAtomicUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagAtomicUnion } from "../../../structures/TypeTagAtomicUnion"; + +export const test_llm_schema_llama_TypeTagAtomicUnion = _test_llm_schema({ + model: "llama", + name: "TypeTagAtomicUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagCustom.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagCustom.ts new file mode 100644 index 0000000000..c7fee4e7b4 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagCustom.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagCustom } from "../../../structures/TypeTagCustom"; + +export const test_llm_schema_llama_TypeTagCustom = _test_llm_schema({ + model: "llama", + name: "TypeTagCustom", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagDefault.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagDefault.ts new file mode 100644 index 0000000000..767aadafe7 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagDefault.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagDefault } from "../../../structures/TypeTagDefault"; + +export const test_llm_schema_llama_TypeTagDefault = _test_llm_schema({ + model: "llama", + name: "TypeTagDefault", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagFormat.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagFormat.ts new file mode 100644 index 0000000000..8a90db3b8c --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagFormat.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagFormat } from "../../../structures/TypeTagFormat"; + +export const test_llm_schema_llama_TypeTagFormat = _test_llm_schema({ + model: "llama", + name: "TypeTagFormat", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagLength.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagLength.ts new file mode 100644 index 0000000000..49f88be014 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagLength.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagLength } from "../../../structures/TypeTagLength"; + +export const test_llm_schema_llama_TypeTagLength = _test_llm_schema({ + model: "llama", + name: "TypeTagLength", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagMatrix.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagMatrix.ts new file mode 100644 index 0000000000..b88affe448 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagMatrix.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagMatrix } from "../../../structures/TypeTagMatrix"; + +export const test_llm_schema_llama_TypeTagMatrix = _test_llm_schema({ + model: "llama", + name: "TypeTagMatrix", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagObjectUnion.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagObjectUnion.ts new file mode 100644 index 0000000000..2dd31f7849 --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagObjectUnion.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagObjectUnion } from "../../../structures/TypeTagObjectUnion"; + +export const test_llm_schema_llama_TypeTagObjectUnion = _test_llm_schema({ + model: "llama", + name: "TypeTagObjectUnion", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagPattern.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagPattern.ts new file mode 100644 index 0000000000..b531f4afad --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagPattern.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagPattern } from "../../../structures/TypeTagPattern"; + +export const test_llm_schema_llama_TypeTagPattern = _test_llm_schema({ + model: "llama", + name: "TypeTagPattern", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagRange.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagRange.ts new file mode 100644 index 0000000000..e977a29e6d --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagRange.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagRange } from "../../../structures/TypeTagRange"; + +export const test_llm_schema_llama_TypeTagRange = _test_llm_schema({ + model: "llama", + name: "TypeTagRange", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagType.ts b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagType.ts new file mode 100644 index 0000000000..3408a33f8a --- /dev/null +++ b/test/src/features/llm.schema/llama/test_llm_schema_llama_TypeTagType.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_llm_schema } from "../../../internal/_test_llm_schema"; +import { TypeTagType } from "../../../structures/TypeTagType"; + +export const test_llm_schema_llama_TypeTagType = _test_llm_schema({ + model: "llama", + name: "TypeTagType", +})(typia.llm.schema({})); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayAny.ts b/test/src/features/llm.schema/test_llm_schema_ArrayAny.ts deleted file mode 100644 index a904bd1152..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayAny.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayAny } from "../../structures/ArrayAny"; - -export const test_llm_schema_ArrayAny = _test_llm_schema("ArrayAny")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayAtomicAlias.ts b/test/src/features/llm.schema/test_llm_schema_ArrayAtomicAlias.ts deleted file mode 100644 index dcd41f135f..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayAtomicAlias.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayAtomicAlias } from "../../structures/ArrayAtomicAlias"; - -export const test_llm_schema_ArrayAtomicAlias = _test_llm_schema( - "ArrayAtomicAlias", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayAtomicSimple.ts b/test/src/features/llm.schema/test_llm_schema_ArrayAtomicSimple.ts deleted file mode 100644 index bac8cdf2ca..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayAtomicSimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayAtomicSimple } from "../../structures/ArrayAtomicSimple"; - -export const test_llm_schema_ArrayAtomicSimple = _test_llm_schema( - "ArrayAtomicSimple", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayHierarchical.ts b/test/src/features/llm.schema/test_llm_schema_ArrayHierarchical.ts deleted file mode 100644 index 269606153f..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayHierarchical.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayHierarchical } from "../../structures/ArrayHierarchical"; - -export const test_llm_schema_ArrayHierarchical = _test_llm_schema( - "ArrayHierarchical", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayHierarchicalPointer.ts b/test/src/features/llm.schema/test_llm_schema_ArrayHierarchicalPointer.ts deleted file mode 100644 index bc7cbd62ec..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayHierarchicalPointer.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayHierarchicalPointer } from "../../structures/ArrayHierarchicalPointer"; - -export const test_llm_schema_ArrayHierarchicalPointer = _test_llm_schema( - "ArrayHierarchicalPointer", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayMatrix.ts b/test/src/features/llm.schema/test_llm_schema_ArrayMatrix.ts deleted file mode 100644 index 463998f627..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayMatrix.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayMatrix } from "../../structures/ArrayMatrix"; - -export const test_llm_schema_ArrayMatrix = _test_llm_schema("ArrayMatrix")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayRecursive.ts b/test/src/features/llm.schema/test_llm_schema_ArrayRecursive.ts deleted file mode 100644 index 91cba57fdd..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRecursive.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 13f79fb099..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicit.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index dc43854316..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionExplicitPointer.ts +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 0abd77a4f1..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRecursiveUnionImplicit.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 6f5d0cd4cd..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedNullable.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 9ef3739629..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedRequired.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 709c75ca17..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 7c265944b4..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayRepeatedUnionWithTuple.ts +++ /dev/null @@ -1,8 +0,0 @@ -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_ArraySimple.ts b/test/src/features/llm.schema/test_llm_schema_ArraySimple.ts deleted file mode 100644 index 03f5da4d36..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArraySimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArraySimple } from "../../structures/ArraySimple"; - -export const test_llm_schema_ArraySimple = _test_llm_schema("ArraySimple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ArrayUnion.ts b/test/src/features/llm.schema/test_llm_schema_ArrayUnion.ts deleted file mode 100644 index ff4482e315..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ArrayUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ArrayUnion } from "../../structures/ArrayUnion"; - -export const test_llm_schema_ArrayUnion = _test_llm_schema("ArrayUnion")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_AtomicAlias.ts b/test/src/features/llm.schema/test_llm_schema_AtomicAlias.ts deleted file mode 100644 index 611950de34..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_AtomicAlias.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { AtomicAlias } from "../../structures/AtomicAlias"; - -export const test_llm_schema_AtomicAlias = _test_llm_schema("AtomicAlias")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_AtomicClass.ts b/test/src/features/llm.schema/test_llm_schema_AtomicClass.ts deleted file mode 100644 index 9dc662d8ed..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_AtomicClass.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { AtomicClass } from "../../structures/AtomicClass"; - -export const test_llm_schema_AtomicClass = _test_llm_schema("AtomicClass")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_AtomicIntersection.ts b/test/src/features/llm.schema/test_llm_schema_AtomicIntersection.ts deleted file mode 100644 index 47e6577483..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_AtomicIntersection.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { AtomicIntersection } from "../../structures/AtomicIntersection"; - -export const test_llm_schema_AtomicIntersection = _test_llm_schema( - "AtomicIntersection", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_AtomicSimple.ts b/test/src/features/llm.schema/test_llm_schema_AtomicSimple.ts deleted file mode 100644 index 2053c72f45..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_AtomicSimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { AtomicSimple } from "../../structures/AtomicSimple"; - -export const test_llm_schema_AtomicSimple = _test_llm_schema("AtomicSimple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_AtomicUnion.ts b/test/src/features/llm.schema/test_llm_schema_AtomicUnion.ts deleted file mode 100644 index 26e29cfbdb..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_AtomicUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { AtomicUnion } from "../../structures/AtomicUnion"; - -export const test_llm_schema_AtomicUnion = _test_llm_schema("AtomicUnion")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ClassGetter.ts b/test/src/features/llm.schema/test_llm_schema_ClassGetter.ts deleted file mode 100644 index b0b2446be3..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ClassGetter.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ClassGetter } from "../../structures/ClassGetter"; - -export const test_llm_schema_ClassGetter = _test_llm_schema("ClassGetter")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ClassMethod.ts b/test/src/features/llm.schema/test_llm_schema_ClassMethod.ts deleted file mode 100644 index db82f44c38..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ClassMethod.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ClassMethod } from "../../structures/ClassMethod"; - -export const test_llm_schema_ClassMethod = _test_llm_schema("ClassMethod")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ClassPropertyAssignment.ts b/test/src/features/llm.schema/test_llm_schema_ClassPropertyAssignment.ts deleted file mode 100644 index bc15f18035..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ClassPropertyAssignment.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ClassPropertyAssignment } from "../../structures/ClassPropertyAssignment"; - -export const test_llm_schema_ClassPropertyAssignment = _test_llm_schema( - "ClassPropertyAssignment", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagArray.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagArray.ts deleted file mode 100644 index 0ae698de24..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagArray } from "../../structures/CommentTagArray"; - -export const test_llm_schema_CommentTagArray = _test_llm_schema( - "CommentTagArray", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagArrayUnion.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagArrayUnion.ts deleted file mode 100644 index 146f898ed9..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagArrayUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagArrayUnion } from "../../structures/CommentTagArrayUnion"; - -export const test_llm_schema_CommentTagArrayUnion = _test_llm_schema( - "CommentTagArrayUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagAtomicUnion.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagAtomicUnion.ts deleted file mode 100644 index 2a3cd565d3..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagAtomicUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagAtomicUnion } from "../../structures/CommentTagAtomicUnion"; - -export const test_llm_schema_CommentTagAtomicUnion = _test_llm_schema( - "CommentTagAtomicUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagDefault.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagDefault.ts deleted file mode 100644 index dd7541881f..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagDefault.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagDefault } from "../../structures/CommentTagDefault"; - -export const test_llm_schema_CommentTagDefault = _test_llm_schema( - "CommentTagDefault", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagFormat.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagFormat.ts deleted file mode 100644 index 655159b1ca..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagFormat.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagFormat } from "../../structures/CommentTagFormat"; - -export const test_llm_schema_CommentTagFormat = _test_llm_schema( - "CommentTagFormat", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagLength.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagLength.ts deleted file mode 100644 index 02a7048d60..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagLength.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagLength } from "../../structures/CommentTagLength"; - -export const test_llm_schema_CommentTagLength = _test_llm_schema( - "CommentTagLength", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagObjectUnion.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagObjectUnion.ts deleted file mode 100644 index 9f22cdce50..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagObjectUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagObjectUnion } from "../../structures/CommentTagObjectUnion"; - -export const test_llm_schema_CommentTagObjectUnion = _test_llm_schema( - "CommentTagObjectUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagPattern.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagPattern.ts deleted file mode 100644 index 8b4c2da902..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagPattern.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagPattern } from "../../structures/CommentTagPattern"; - -export const test_llm_schema_CommentTagPattern = _test_llm_schema( - "CommentTagPattern", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagRange.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagRange.ts deleted file mode 100644 index 392703d652..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagRange.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagRange } from "../../structures/CommentTagRange"; - -export const test_llm_schema_CommentTagRange = _test_llm_schema( - "CommentTagRange", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_CommentTagType.ts b/test/src/features/llm.schema/test_llm_schema_CommentTagType.ts deleted file mode 100644 index 0259aa953c..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_CommentTagType.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { CommentTagType } from "../../structures/CommentTagType"; - -export const test_llm_schema_CommentTagType = _test_llm_schema( - "CommentTagType", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicAbsorbed.ts b/test/src/features/llm.schema/test_llm_schema_ConstantAtomicAbsorbed.ts deleted file mode 100644 index 12679944d2..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicAbsorbed.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantAtomicAbsorbed } from "../../structures/ConstantAtomicAbsorbed"; - -export const test_llm_schema_ConstantAtomicAbsorbed = _test_llm_schema( - "ConstantAtomicAbsorbed", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicSimple.ts b/test/src/features/llm.schema/test_llm_schema_ConstantAtomicSimple.ts deleted file mode 100644 index 0f6a3eeeb3..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicSimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantAtomicSimple } from "../../structures/ConstantAtomicSimple"; - -export const test_llm_schema_ConstantAtomicSimple = _test_llm_schema( - "ConstantAtomicSimple", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicTagged.ts b/test/src/features/llm.schema/test_llm_schema_ConstantAtomicTagged.ts deleted file mode 100644 index 3d4ba71e6c..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicTagged.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantAtomicTagged } from "../../structures/ConstantAtomicTagged"; - -export const test_llm_schema_ConstantAtomicTagged = _test_llm_schema( - "ConstantAtomicTagged", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicUnion.ts b/test/src/features/llm.schema/test_llm_schema_ConstantAtomicUnion.ts deleted file mode 100644 index 64130e4ad0..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantAtomicUnion } from "../../structures/ConstantAtomicUnion"; - -export const test_llm_schema_ConstantAtomicUnion = _test_llm_schema( - "ConstantAtomicUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicWrapper.ts b/test/src/features/llm.schema/test_llm_schema_ConstantAtomicWrapper.ts deleted file mode 100644 index 4b984fb9ea..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantAtomicWrapper.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantAtomicWrapper } from "../../structures/ConstantAtomicWrapper"; - -export const test_llm_schema_ConstantAtomicWrapper = _test_llm_schema( - "ConstantAtomicWrapper", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantConstEnumeration.ts b/test/src/features/llm.schema/test_llm_schema_ConstantConstEnumeration.ts deleted file mode 100644 index 4afd55f92d..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantConstEnumeration.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantConstEnumeration } from "../../structures/ConstantConstEnumeration"; - -export const test_llm_schema_ConstantConstEnumeration = _test_llm_schema( - "ConstantConstEnumeration", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantEnumeration.ts b/test/src/features/llm.schema/test_llm_schema_ConstantEnumeration.ts deleted file mode 100644 index 8b5de65645..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantEnumeration.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantEnumeration } from "../../structures/ConstantEnumeration"; - -export const test_llm_schema_ConstantEnumeration = _test_llm_schema( - "ConstantEnumeration", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ConstantIntersection.ts b/test/src/features/llm.schema/test_llm_schema_ConstantIntersection.ts deleted file mode 100644 index a03a82d0ee..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ConstantIntersection.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ConstantIntersection } from "../../structures/ConstantIntersection"; - -export const test_llm_schema_ConstantIntersection = _test_llm_schema( - "ConstantIntersection", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicArray.ts b/test/src/features/llm.schema/test_llm_schema_DynamicArray.ts deleted file mode 100644 index e94a4d67ad..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicArray } from "../../structures/DynamicArray"; - -export const test_llm_schema_DynamicArray = _test_llm_schema("DynamicArray")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicComposite.ts b/test/src/features/llm.schema/test_llm_schema_DynamicComposite.ts deleted file mode 100644 index 1e233acd94..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicComposite.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicComposite } from "../../structures/DynamicComposite"; - -export const test_llm_schema_DynamicComposite = _test_llm_schema( - "DynamicComposite", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicConstant.ts b/test/src/features/llm.schema/test_llm_schema_DynamicConstant.ts deleted file mode 100644 index 0ed4341574..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicConstant.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicConstant } from "../../structures/DynamicConstant"; - -export const test_llm_schema_DynamicConstant = _test_llm_schema( - "DynamicConstant", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicEnumeration.ts b/test/src/features/llm.schema/test_llm_schema_DynamicEnumeration.ts deleted file mode 100644 index ae0746504b..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicEnumeration.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicEnumeration } from "../../structures/DynamicEnumeration"; - -export const test_llm_schema_DynamicEnumeration = _test_llm_schema( - "DynamicEnumeration", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicNever.ts b/test/src/features/llm.schema/test_llm_schema_DynamicNever.ts deleted file mode 100644 index a8aeea93fb..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicNever.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicNever } from "../../structures/DynamicNever"; - -export const test_llm_schema_DynamicNever = _test_llm_schema("DynamicNever")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicSimple.ts b/test/src/features/llm.schema/test_llm_schema_DynamicSimple.ts deleted file mode 100644 index 61e2e29e90..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicSimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicSimple } from "../../structures/DynamicSimple"; - -export const test_llm_schema_DynamicSimple = _test_llm_schema("DynamicSimple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicTemplate.ts b/test/src/features/llm.schema/test_llm_schema_DynamicTemplate.ts deleted file mode 100644 index 4fe621d1ca..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicTemplate.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicTemplate } from "../../structures/DynamicTemplate"; - -export const test_llm_schema_DynamicTemplate = _test_llm_schema( - "DynamicTemplate", -)(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 deleted file mode 100644 index e5aef02a8a..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicTree.ts +++ /dev/null @@ -1,8 +0,0 @@ -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_DynamicUndefined.ts b/test/src/features/llm.schema/test_llm_schema_DynamicUndefined.ts deleted file mode 100644 index e959c5e401..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicUndefined.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicUndefined } from "../../structures/DynamicUndefined"; - -export const test_llm_schema_DynamicUndefined = _test_llm_schema( - "DynamicUndefined", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_DynamicUnion.ts b/test/src/features/llm.schema/test_llm_schema_DynamicUnion.ts deleted file mode 100644 index 19c71f9c35..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_DynamicUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { DynamicUnion } from "../../structures/DynamicUnion"; - -export const test_llm_schema_DynamicUnion = _test_llm_schema("DynamicUnion")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectAlias.ts b/test/src/features/llm.schema/test_llm_schema_ObjectAlias.ts deleted file mode 100644 index 205c82de72..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectAlias.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectAlias } from "../../structures/ObjectAlias"; - -export const test_llm_schema_ObjectAlias = _test_llm_schema("ObjectAlias")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectDate.ts b/test/src/features/llm.schema/test_llm_schema_ObjectDate.ts deleted file mode 100644 index 75dbe54dc6..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectDate.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectDate } from "../../structures/ObjectDate"; - -export const test_llm_schema_ObjectDate = _test_llm_schema("ObjectDate")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectDescription.ts b/test/src/features/llm.schema/test_llm_schema_ObjectDescription.ts deleted file mode 100644 index c898d096b5..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectDescription.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectDescription } from "../../structures/ObjectDescription"; - -export const test_llm_schema_ObjectDescription = _test_llm_schema( - "ObjectDescription", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectDynamic.ts b/test/src/features/llm.schema/test_llm_schema_ObjectDynamic.ts deleted file mode 100644 index 9340768a4a..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectDynamic.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectDynamic } from "../../structures/ObjectDynamic"; - -export const test_llm_schema_ObjectDynamic = _test_llm_schema("ObjectDynamic")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectGeneric.ts b/test/src/features/llm.schema/test_llm_schema_ObjectGeneric.ts deleted file mode 100644 index 3fc191c257..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectGeneric.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectGeneric } from "../../structures/ObjectGeneric"; - -export const test_llm_schema_ObjectGeneric = _test_llm_schema("ObjectGeneric")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectGenericAlias.ts b/test/src/features/llm.schema/test_llm_schema_ObjectGenericAlias.ts deleted file mode 100644 index 276389d697..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectGenericAlias.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectGenericAlias } from "../../structures/ObjectGenericAlias"; - -export const test_llm_schema_ObjectGenericAlias = _test_llm_schema( - "ObjectGenericAlias", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectGenericArray.ts b/test/src/features/llm.schema/test_llm_schema_ObjectGenericArray.ts deleted file mode 100644 index d993a03da3..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectGenericArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectGenericArray } from "../../structures/ObjectGenericArray"; - -export const test_llm_schema_ObjectGenericArray = _test_llm_schema( - "ObjectGenericArray", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectGenericUnion.ts b/test/src/features/llm.schema/test_llm_schema_ObjectGenericUnion.ts deleted file mode 100644 index dfdd28861f..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectGenericUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectGenericUnion } from "../../structures/ObjectGenericUnion"; - -export const test_llm_schema_ObjectGenericUnion = _test_llm_schema( - "ObjectGenericUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectHierarchical.ts b/test/src/features/llm.schema/test_llm_schema_ObjectHierarchical.ts deleted file mode 100644 index 12bea708c0..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectHierarchical.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectHierarchical } from "../../structures/ObjectHierarchical"; - -export const test_llm_schema_ObjectHierarchical = _test_llm_schema( - "ObjectHierarchical", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectInternal.ts b/test/src/features/llm.schema/test_llm_schema_ObjectInternal.ts deleted file mode 100644 index 636b92cdcd..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectInternal.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectInternal } from "../../structures/ObjectInternal"; - -export const test_llm_schema_ObjectInternal = _test_llm_schema( - "ObjectInternal", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectIntersection.ts b/test/src/features/llm.schema/test_llm_schema_ObjectIntersection.ts deleted file mode 100644 index fc132e8172..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectIntersection.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectIntersection } from "../../structures/ObjectIntersection"; - -export const test_llm_schema_ObjectIntersection = _test_llm_schema( - "ObjectIntersection", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectJsonTag.ts b/test/src/features/llm.schema/test_llm_schema_ObjectJsonTag.ts deleted file mode 100644 index 8d79e2ae22..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectJsonTag.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectJsonTag } from "../../structures/ObjectJsonTag"; - -export const test_llm_schema_ObjectJsonTag = _test_llm_schema("ObjectJsonTag")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectLiteralProperty.ts b/test/src/features/llm.schema/test_llm_schema_ObjectLiteralProperty.ts deleted file mode 100644 index db74429636..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectLiteralProperty.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectLiteralProperty } from "../../structures/ObjectLiteralProperty"; - -export const test_llm_schema_ObjectLiteralProperty = _test_llm_schema( - "ObjectLiteralProperty", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectLiteralType.ts b/test/src/features/llm.schema/test_llm_schema_ObjectLiteralType.ts deleted file mode 100644 index 7a98bf9887..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectLiteralType.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectLiteralType } from "../../structures/ObjectLiteralType"; - -export const test_llm_schema_ObjectLiteralType = _test_llm_schema( - "ObjectLiteralType", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectNullable.ts b/test/src/features/llm.schema/test_llm_schema_ObjectNullable.ts deleted file mode 100644 index 39af55c3fc..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectNullable.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectNullable } from "../../structures/ObjectNullable"; - -export const test_llm_schema_ObjectNullable = _test_llm_schema( - "ObjectNullable", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectOptional.ts b/test/src/features/llm.schema/test_llm_schema_ObjectOptional.ts deleted file mode 100644 index f897bc4c8d..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectOptional.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectOptional } from "../../structures/ObjectOptional"; - -export const test_llm_schema_ObjectOptional = _test_llm_schema( - "ObjectOptional", -)(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 deleted file mode 100644 index c627c1ed48..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectPartial.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index de85867971..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectPartialAndRequired.ts +++ /dev/null @@ -1,8 +0,0 @@ -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_ObjectPrimitive.ts b/test/src/features/llm.schema/test_llm_schema_ObjectPrimitive.ts deleted file mode 100644 index 3f7e4489d6..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectPrimitive.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectPrimitive } from "../../structures/ObjectPrimitive"; - -export const test_llm_schema_ObjectPrimitive = _test_llm_schema( - "ObjectPrimitive", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectPropertyNullable.ts b/test/src/features/llm.schema/test_llm_schema_ObjectPropertyNullable.ts deleted file mode 100644 index 38953c03c0..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectPropertyNullable.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectPropertyNullable } from "../../structures/ObjectPropertyNullable"; - -export const test_llm_schema_ObjectPropertyNullable = _test_llm_schema( - "ObjectPropertyNullable", -)(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 deleted file mode 100644 index 30972d8b46..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectRecursive.ts +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 11233633cf..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectRequired.ts +++ /dev/null @@ -1,8 +0,0 @@ -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/test/src/features/llm.schema/test_llm_schema_ObjectSimple.ts b/test/src/features/llm.schema/test_llm_schema_ObjectSimple.ts deleted file mode 100644 index 13449e9ba7..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectSimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectSimple } from "../../structures/ObjectSimple"; - -export const test_llm_schema_ObjectSimple = _test_llm_schema("ObjectSimple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectTuple.ts b/test/src/features/llm.schema/test_llm_schema_ObjectTuple.ts deleted file mode 100644 index f0a3685e35..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectTuple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectTuple } from "../../structures/ObjectTuple"; - -export const test_llm_schema_ObjectTuple = _test_llm_schema("ObjectTuple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUndefined.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUndefined.ts deleted file mode 100644 index 6aa8908a4f..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUndefined.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUndefined } from "../../structures/ObjectUndefined"; - -export const test_llm_schema_ObjectUndefined = _test_llm_schema( - "ObjectUndefined", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionComposite.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionComposite.ts deleted file mode 100644 index 07ec62c6ce..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionComposite.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionComposite } from "../../structures/ObjectUnionComposite"; - -export const test_llm_schema_ObjectUnionComposite = _test_llm_schema( - "ObjectUnionComposite", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionCompositePointer.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionCompositePointer.ts deleted file mode 100644 index b8805dc304..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionCompositePointer.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionCompositePointer } from "../../structures/ObjectUnionCompositePointer"; - -export const test_llm_schema_ObjectUnionCompositePointer = _test_llm_schema( - "ObjectUnionCompositePointer", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionDouble.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionDouble.ts deleted file mode 100644 index 8f0c340a46..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionDouble.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionDouble } from "../../structures/ObjectUnionDouble"; - -export const test_llm_schema_ObjectUnionDouble = _test_llm_schema( - "ObjectUnionDouble", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionExplicit.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionExplicit.ts deleted file mode 100644 index fc65826006..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionExplicit.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionExplicit } from "../../structures/ObjectUnionExplicit"; - -export const test_llm_schema_ObjectUnionExplicit = _test_llm_schema( - "ObjectUnionExplicit", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionExplicitPointer.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionExplicitPointer.ts deleted file mode 100644 index debdac1ab2..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionExplicitPointer.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionExplicitPointer } from "../../structures/ObjectUnionExplicitPointer"; - -export const test_llm_schema_ObjectUnionExplicitPointer = _test_llm_schema( - "ObjectUnionExplicitPointer", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionImplicit.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionImplicit.ts deleted file mode 100644 index ec7afa0e21..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionImplicit.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionImplicit } from "../../structures/ObjectUnionImplicit"; - -export const test_llm_schema_ObjectUnionImplicit = _test_llm_schema( - "ObjectUnionImplicit", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ObjectUnionNonPredictable.ts b/test/src/features/llm.schema/test_llm_schema_ObjectUnionNonPredictable.ts deleted file mode 100644 index b42b5fff51..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ObjectUnionNonPredictable.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ObjectUnionNonPredictable } from "../../structures/ObjectUnionNonPredictable"; - -export const test_llm_schema_ObjectUnionNonPredictable = _test_llm_schema( - "ObjectUnionNonPredictable", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TemplateAtomic.ts b/test/src/features/llm.schema/test_llm_schema_TemplateAtomic.ts deleted file mode 100644 index bb1015d44f..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TemplateAtomic.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TemplateAtomic } from "../../structures/TemplateAtomic"; - -export const test_llm_schema_TemplateAtomic = _test_llm_schema( - "TemplateAtomic", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TemplateConstant.ts b/test/src/features/llm.schema/test_llm_schema_TemplateConstant.ts deleted file mode 100644 index 5e44a3bb24..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TemplateConstant.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TemplateConstant } from "../../structures/TemplateConstant"; - -export const test_llm_schema_TemplateConstant = _test_llm_schema( - "TemplateConstant", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TemplateUnion.ts b/test/src/features/llm.schema/test_llm_schema_TemplateUnion.ts deleted file mode 100644 index 2e21b1fbf6..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TemplateUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TemplateUnion } from "../../structures/TemplateUnion"; - -export const test_llm_schema_TemplateUnion = _test_llm_schema("TemplateUnion")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonArray.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonArray.ts deleted file mode 100644 index d4b44bd12e..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonArray } from "../../structures/ToJsonArray"; - -export const test_llm_schema_ToJsonArray = _test_llm_schema("ToJsonArray")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonAtomicSimple.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonAtomicSimple.ts deleted file mode 100644 index cae4764af0..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonAtomicSimple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonAtomicSimple } from "../../structures/ToJsonAtomicSimple"; - -export const test_llm_schema_ToJsonAtomicSimple = _test_llm_schema( - "ToJsonAtomicSimple", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonAtomicUnion.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonAtomicUnion.ts deleted file mode 100644 index c30568a82c..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonAtomicUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonAtomicUnion } from "../../structures/ToJsonAtomicUnion"; - -export const test_llm_schema_ToJsonAtomicUnion = _test_llm_schema( - "ToJsonAtomicUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonDouble.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonDouble.ts deleted file mode 100644 index 4bea2d320b..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonDouble.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonDouble } from "../../structures/ToJsonDouble"; - -export const test_llm_schema_ToJsonDouble = _test_llm_schema("ToJsonDouble")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonNull.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonNull.ts deleted file mode 100644 index 5d058cd379..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonNull.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonNull } from "../../structures/ToJsonNull"; - -export const test_llm_schema_ToJsonNull = _test_llm_schema("ToJsonNull")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonTuple.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonTuple.ts deleted file mode 100644 index e3616eda27..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonTuple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonTuple } from "../../structures/ToJsonTuple"; - -export const test_llm_schema_ToJsonTuple = _test_llm_schema("ToJsonTuple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_ToJsonUnion.ts b/test/src/features/llm.schema/test_llm_schema_ToJsonUnion.ts deleted file mode 100644 index 61f32dd5f4..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_ToJsonUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { ToJsonUnion } from "../../structures/ToJsonUnion"; - -export const test_llm_schema_ToJsonUnion = _test_llm_schema("ToJsonUnion")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TupleHierarchical.ts b/test/src/features/llm.schema/test_llm_schema_TupleHierarchical.ts deleted file mode 100644 index aff57f6fa8..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TupleHierarchical.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TupleHierarchical } from "../../structures/TupleHierarchical"; - -export const test_llm_schema_TupleHierarchical = _test_llm_schema( - "TupleHierarchical", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TupleRestArray.ts b/test/src/features/llm.schema/test_llm_schema_TupleRestArray.ts deleted file mode 100644 index b6c5622836..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TupleRestArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TupleRestArray } from "../../structures/TupleRestArray"; - -export const test_llm_schema_TupleRestArray = _test_llm_schema( - "TupleRestArray", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TupleRestAtomic.ts b/test/src/features/llm.schema/test_llm_schema_TupleRestAtomic.ts deleted file mode 100644 index b72e4f0285..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TupleRestAtomic.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TupleRestAtomic } from "../../structures/TupleRestAtomic"; - -export const test_llm_schema_TupleRestAtomic = _test_llm_schema( - "TupleRestAtomic", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TupleRestObject.ts b/test/src/features/llm.schema/test_llm_schema_TupleRestObject.ts deleted file mode 100644 index f7ea113a4d..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TupleRestObject.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TupleRestObject } from "../../structures/TupleRestObject"; - -export const test_llm_schema_TupleRestObject = _test_llm_schema( - "TupleRestObject", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagArray.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagArray.ts deleted file mode 100644 index dfe1663ce3..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagArray } from "../../structures/TypeTagArray"; - -export const test_llm_schema_TypeTagArray = _test_llm_schema("TypeTagArray")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagArrayUnion.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagArrayUnion.ts deleted file mode 100644 index 1453494e1c..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagArrayUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagArrayUnion } from "../../structures/TypeTagArrayUnion"; - -export const test_llm_schema_TypeTagArrayUnion = _test_llm_schema( - "TypeTagArrayUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagAtomicUnion.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagAtomicUnion.ts deleted file mode 100644 index ebb7251e12..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagAtomicUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagAtomicUnion } from "../../structures/TypeTagAtomicUnion"; - -export const test_llm_schema_TypeTagAtomicUnion = _test_llm_schema( - "TypeTagAtomicUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagCustom.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagCustom.ts deleted file mode 100644 index c5ff33a23a..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagCustom.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagCustom } from "../../structures/TypeTagCustom"; - -export const test_llm_schema_TypeTagCustom = _test_llm_schema("TypeTagCustom")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagDefault.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagDefault.ts deleted file mode 100644 index 3b760ef241..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagDefault.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagDefault } from "../../structures/TypeTagDefault"; - -export const test_llm_schema_TypeTagDefault = _test_llm_schema( - "TypeTagDefault", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagFormat.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagFormat.ts deleted file mode 100644 index 1cc503fd34..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagFormat.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagFormat } from "../../structures/TypeTagFormat"; - -export const test_llm_schema_TypeTagFormat = _test_llm_schema("TypeTagFormat")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagLength.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagLength.ts deleted file mode 100644 index 8a91a27ead..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagLength.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagLength } from "../../structures/TypeTagLength"; - -export const test_llm_schema_TypeTagLength = _test_llm_schema("TypeTagLength")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagMatrix.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagMatrix.ts deleted file mode 100644 index f1c8307cc5..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagMatrix.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagMatrix } from "../../structures/TypeTagMatrix"; - -export const test_llm_schema_TypeTagMatrix = _test_llm_schema("TypeTagMatrix")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagObjectUnion.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagObjectUnion.ts deleted file mode 100644 index 896a977c05..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagObjectUnion.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagObjectUnion } from "../../structures/TypeTagObjectUnion"; - -export const test_llm_schema_TypeTagObjectUnion = _test_llm_schema( - "TypeTagObjectUnion", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagPattern.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagPattern.ts deleted file mode 100644 index be6156686c..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagPattern.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagPattern } from "../../structures/TypeTagPattern"; - -export const test_llm_schema_TypeTagPattern = _test_llm_schema( - "TypeTagPattern", -)(typia.llm.schema()); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagRange.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagRange.ts deleted file mode 100644 index 757e1e01c5..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagRange.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagRange } from "../../structures/TypeTagRange"; - -export const test_llm_schema_TypeTagRange = _test_llm_schema("TypeTagRange")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagTuple.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagTuple.ts deleted file mode 100644 index 0dc0a05f44..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagTuple.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagTuple } from "../../structures/TypeTagTuple"; - -export const test_llm_schema_TypeTagTuple = _test_llm_schema("TypeTagTuple")( - typia.llm.schema(), -); diff --git a/test/src/features/llm.schema/test_llm_schema_TypeTagType.ts b/test/src/features/llm.schema/test_llm_schema_TypeTagType.ts deleted file mode 100644 index dd5b692998..0000000000 --- a/test/src/features/llm.schema/test_llm_schema_TypeTagType.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import { _test_llm_schema } from "../../internal/_test_llm_schema"; -import { TypeTagType } from "../../structures/TypeTagType"; - -export const test_llm_schema_TypeTagType = _test_llm_schema("TypeTagType")( - typia.llm.schema(), -); diff --git a/test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts b/test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..7910bac8d1 --- /dev/null +++ b/test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_validateCamel_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.CamelCase + >({ + convert: (input) => + typia.notations.validateCamel(input), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts b/test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3af3db9188 --- /dev/null +++ b/test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_createValidateCamel_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.CamelCase + >({ + convert: typia.notations.createValidateCamel(), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts b/test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..11b76e4ab0 --- /dev/null +++ b/test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_createValidatePascal_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.PascalCase + >({ + convert: typia.notations.createValidatePascal(), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts b/test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f0728206da --- /dev/null +++ b/test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_createValidateSnake_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.SnakeCase + >({ + convert: typia.notations.createValidateSnake(), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts b/test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..499c89e9fd --- /dev/null +++ b/test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_validatePascal_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.PascalCase + >({ + convert: (input) => + typia.notations.validatePascal(input), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts b/test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f7640a66c4 --- /dev/null +++ b/test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_validateSnake_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.SnakeCase + >({ + convert: (input) => + typia.notations.validateSnake(input), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..6b92bf2a8e --- /dev/null +++ b/test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertDecode_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: (input) => + typia.protobuf.assertDecode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e9373264bf --- /dev/null +++ b/test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: (input) => + typia.protobuf.assertDecode( + input, + (p) => new CustomGuardError(p), + ), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..895bf06802 --- /dev/null +++ b/test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertEncode_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: (input) => + typia.protobuf.assertEncode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..1fdcb9ba72 --- /dev/null +++ b/test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: (input) => + typia.protobuf.assertEncode( + input, + (p) => new CustomGuardError(p), + ), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..c13f61a386 --- /dev/null +++ b/test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertDecode_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: typia.protobuf.createAssertDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d3a3ac3018 --- /dev/null +++ b/test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: typia.protobuf.createAssertDecode( + (p) => new CustomGuardError(p), + ), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f3263822de --- /dev/null +++ b/test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertEncode_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: typia.protobuf.createAssertEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..67f73fe9a1 --- /dev/null +++ b/test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,16 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: typia.protobuf.createAssertEncode( + (p) => new CustomGuardError(p), + ), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..16f9201732 --- /dev/null +++ b/test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_decode } from "../../internal/_test_protobuf_decode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createDecode_ObjectSequenceProtobuf = + _test_protobuf_decode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: typia.protobuf.createDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..ad23001806 --- /dev/null +++ b/test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_encode } from "../../internal/_test_protobuf_encode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createEncode_ObjectSequenceProtobuf = + _test_protobuf_encode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: typia.protobuf.createEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..ce63ab688a --- /dev/null +++ b/test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_isDecode } from "../../internal/_test_protobuf_isDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createIsDecode_ObjectSequenceProtobuf = + _test_protobuf_isDecode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: typia.protobuf.createIsDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..02731d6528 --- /dev/null +++ b/test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_isEncode } from "../../internal/_test_protobuf_isEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createIsEncode_ObjectSequenceProtobuf = + _test_protobuf_isEncode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: typia.protobuf.createIsEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f08281fbcc --- /dev/null +++ b/test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_validateDecode } from "../../internal/_test_protobuf_validateDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createValidateDecode_ObjectSequenceProtobuf = + _test_protobuf_validateDecode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: typia.protobuf.createValidateDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..625670ffae --- /dev/null +++ b/test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_validateEncode } from "../../internal/_test_protobuf_validateEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createValidateEncode_ObjectSequenceProtobuf = + _test_protobuf_validateEncode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: typia.protobuf.createValidateEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..c5694bffc3 --- /dev/null +++ b/test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_decode } from "../../internal/_test_protobuf_decode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_decode_ObjectSequenceProtobuf = + _test_protobuf_decode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: (input) => typia.protobuf.decode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..96eea5de9e --- /dev/null +++ b/test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_encode } from "../../internal/_test_protobuf_encode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_encode_ObjectSequenceProtobuf = + _test_protobuf_encode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: (input) => typia.protobuf.encode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..833d002481 --- /dev/null +++ b/test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_isDecode } from "../../internal/_test_protobuf_isDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_isDecode_ObjectSequenceProtobuf = + _test_protobuf_isDecode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: (input) => typia.protobuf.isDecode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..09244a547f --- /dev/null +++ b/test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_isEncode } from "../../internal/_test_protobuf_isEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_isEncode_ObjectSequenceProtobuf = + _test_protobuf_isEncode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: (input) => typia.protobuf.isEncode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..a7dc620cf2 --- /dev/null +++ b/test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_protobuf_message } from "../../internal/_test_protobuf_message"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_message_ObjectSequenceProtobuf = + _test_protobuf_message("ObjectSequenceProtobuf")( + typia.protobuf.message(), + ); diff --git a/test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d57809afa4 --- /dev/null +++ b/test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_validateDecode } from "../../internal/_test_protobuf_validateDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_validateDecode_ObjectSequenceProtobuf = + _test_protobuf_validateDecode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: (input) => + typia.protobuf.validateDecode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f158739e6b --- /dev/null +++ b/test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_protobuf_validateEncode } from "../../internal/_test_protobuf_validateEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_validateEncode_ObjectSequenceProtobuf = + _test_protobuf_validateEncode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: (input) => + typia.protobuf.validateEncode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/random/test_random_ObjectSequenceProtobuf.ts b/test/src/features/random/test_random_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..1988ccae0b --- /dev/null +++ b/test/src/features/random/test_random_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_random } from "../../internal/_test_random"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_random_ObjectSequenceProtobuf = _test_random( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)({ + random: () => + typia.random( + (ObjectSequenceProtobuf as any).RANDOM, + ), + assert: typia.createAssert(), +}); diff --git a/test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts b/test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d6f825e7f4 --- /dev/null +++ b/test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_reflect_metadata } from "../../internal/_test_reflect_metadata"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_reflect_metadata_ObjectSequenceProtobuf = + _test_reflect_metadata("ObjectSequenceProtobuf")( + typia.reflect.metadata<[ObjectSequenceProtobuf]>(), + ); diff --git a/test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts b/test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..bc65f82d4d --- /dev/null +++ b/test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_validate } from "../../internal/_test_validate"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_validate_ObjectSequenceProtobuf = _test_validate( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)((input) => + typia.validate(input), +); diff --git a/test/src/helpers/TestRandomGenerator.ts b/test/src/helpers/TestRandomGenerator.ts index fb2a015cdf..26bf7d2fec 100644 --- a/test/src/helpers/TestRandomGenerator.ts +++ b/test/src/helpers/TestRandomGenerator.ts @@ -1,18 +1,94 @@ +import RandExp from "randexp"; import { back_inserter, ranges } from "tstl"; -import { RandomGenerator } from "typia/lib/utils/RandomGenerator"; +import { _randomFormatDuration } from "typia/lib/internal/_randomFormatDuration"; -export const TestRandomGenerator = { - ...RandomGenerator, - array: (closure: (index: number) => T, count?: number): T[] => - new Array(count ?? RandomGenerator.integer(3, 10)) +export namespace TestRandomGenerator { + const ALPHABETS = "abcdefghijklmnopqrstuvwxyz"; + + export const array = ( + closure: (index: number) => T, + count?: number, + ): T[] => + new Array(count ?? TestRandomGenerator.integer(3, 10)) .fill(0) - .map((_e, index) => closure(index)), + .map((_e, index) => closure(index)); - sample: + export const sample = (array: T[]) => (count: number): T[] => { const ret: T[] = []; ranges.sample(array, back_inserter(ret), count); return ret; - }, -}; + }; + + /* ----------------------------------------------------------- + REGULAR + ----------------------------------------------------------- */ + export const boolean = () => Math.random() < 0.5; + + export const integer = (min?: number, max?: number) => { + min ??= 0; + max ??= 100; + return Math.floor(Math.random() * (max - min + 1)) + min; + }; + + export const bigint = (min?: bigint, max?: bigint) => { + min ??= BigInt(0); + max ??= BigInt(100); + return BigInt(integer(Number(min), Number(max))); + }; + + export const number = (min?: number, max?: number) => { + min ??= 0; + max ??= 100; + return Math.random() * (max - min) + min; + }; + + export const string = (length?: number): string => + new Array(length ?? integer(5, 10)) + .fill(0) + .map(() => ALPHABETS[integer(0, ALPHABETS.length - 1)]) + .join(""); + + export const pick = (array: T[]): T => + array[integer(0, array.length - 1)]!; + + export const length = () => integer(0, 3); + + /* ----------------------------------------------------------- + SECIAL FORMATS + ----------------------------------------------------------- */ + export const uuid = () => + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { + const r = (Math.random() * 16) | 0; + const v = c === "x" ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); + + export const email = () => `${string(10)}@${string(10)}.${string(3)}`; + + export const url = () => `https://${string(10)}.${string(3)}`; + + export const ipv4 = () => array(() => integer(0, 255), 4).join("."); + + export const ipv6 = (): string => + array(() => integer(0, 65535).toString(16), 8).join(":"); + + export const pattern = (regex: RegExp): string => new RandExp(regex).gen(); + + export const date = (min?: number, max?: number) => { + min ??= 0; + max ??= Date.now() * 2; + return new Date(number(min, max)).toISOString().substring(0, 10); + }; + + export const datetime = (min?: number, max?: number) => { + min ??= Date.now() - 30 * DAY; + max ??= Date.now() + 7 * DAY; + return new Date(number(min, max)).toISOString(); + }; + + export const duration = () => _randomFormatDuration(); +} + +const DAY = 1000 * 60 * 60 * 24; diff --git a/test/src/helpers/TestStructure.ts b/test/src/helpers/TestStructure.ts index 55764a6138..4afed7314f 100644 --- a/test/src/helpers/TestStructure.ts +++ b/test/src/helpers/TestStructure.ts @@ -12,5 +12,5 @@ export interface TestStructure { BINARABLE?: boolean; JSONABLE?: boolean; PRIMITIVE?: boolean; - RANDOM?: false | IRandomGenerator; + RANDOM?: false | Partial; } diff --git a/test/src/internal/_test_assertEquals.ts b/test/src/internal/_test_assertEquals.ts index f6480ded8e..02951657f7 100644 --- a/test/src/internal/_test_assertEquals.ts +++ b/test/src/internal/_test_assertEquals.ts @@ -51,7 +51,8 @@ export const _test_assertEquals = if ( (exp as Function).constructor?.name === ErrorClass.name && typia.is(exp) && - exp.method === "typia.assertEquals" && + (exp.method === "typia.assertEquals" || + exp.method === "typia.createAssertEquals") && exp.path === fullPath && exp.expected === "undefined" && exp.value === key diff --git a/test/src/internal/_test_assertGuardEquals.ts b/test/src/internal/_test_assertGuardEquals.ts index a805d36e3f..fccc44a7f2 100644 --- a/test/src/internal/_test_assertGuardEquals.ts +++ b/test/src/internal/_test_assertGuardEquals.ts @@ -50,7 +50,8 @@ export const _test_assertGuardEquals = if ( (exp as Function).constructor?.name === ErrorClass.name && typia.is(exp) && - exp.method === "typia.assertGuardEquals" && + (exp.method === "typia.assertGuardEquals" || + exp.method === "typia.createAssertGuardEquals") && exp.path === fullPath && exp.expected === "undefined" && exp.value === key diff --git a/test/src/internal/_test_functional_validateEqualsFunction.ts b/test/src/internal/_test_functional_validateEqualsFunction.ts index 2571e67443..2af8312f48 100644 --- a/test/src/internal/_test_functional_validateEqualsFunction.ts +++ b/test/src/internal/_test_functional_validateEqualsFunction.ts @@ -29,9 +29,10 @@ export const _test_functional_validateEqualsFunction = if (expected.length === 0) return; const [x, y] = callback(input); - const actual: string[] = validate(() => y)(x) - .errors.map((err) => err.path) - .sort(); + const result: IValidation = validate(() => y)(x); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); if ( expected.length !== actual.length || expected.every((str, i) => str === actual[i]) === false diff --git a/test/src/internal/_test_functional_validateEqualsFunctionAsync.ts b/test/src/internal/_test_functional_validateEqualsFunctionAsync.ts index 3a5853e757..d59847dfdd 100644 --- a/test/src/internal/_test_functional_validateEqualsFunctionAsync.ts +++ b/test/src/internal/_test_functional_validateEqualsFunctionAsync.ts @@ -34,9 +34,10 @@ export const _test_functional_validateEqualsFunctionAsync = if (expected.length === 0) return; const [x, y] = callback(input); - const actual: string[] = (await validate(async () => y)(x)).errors - .map((err) => err.path) - .sort(); + const result: IValidation = await validate(async () => y)(x); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); if ( expected.length !== actual.length || expected.every((str, i) => str === actual[i]) === false diff --git a/test/src/internal/_test_functional_validateEqualsParameters.ts b/test/src/internal/_test_functional_validateEqualsParameters.ts index a1871e4b18..76a6466d6c 100644 --- a/test/src/internal/_test_functional_validateEqualsParameters.ts +++ b/test/src/internal/_test_functional_validateEqualsParameters.ts @@ -29,9 +29,10 @@ export const _test_functional_validateEqualsParameters = if (expected.length === 0) return; const [x, y] = callback(input); - const actual: string[] = validate(() => y)(x) - .errors.map((err) => err.path) - .sort(); + const result: IValidation = validate(() => y)(x); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); if ( expected.length !== actual.length || expected.every((str, i) => str === actual[i]) === false diff --git a/test/src/internal/_test_functional_validateEqualsParametersAsync.ts b/test/src/internal/_test_functional_validateEqualsParametersAsync.ts index 80fe3d6b3f..f9f321b939 100644 --- a/test/src/internal/_test_functional_validateEqualsParametersAsync.ts +++ b/test/src/internal/_test_functional_validateEqualsParametersAsync.ts @@ -34,9 +34,10 @@ export const _test_functional_validateEqualsParametersAsync = if (expected.length === 0) return; const [x, y] = callback(input); - const actual: string[] = (await validate(async () => y)(x)).errors - .map((err) => err.path) - .sort(); + const result: IValidation = await validate(async () => y)(x); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); if ( expected.length !== actual.length || expected.every((str, i) => str === actual[i]) === false diff --git a/test/src/internal/_test_functional_validateEqualsReturn.ts b/test/src/internal/_test_functional_validateEqualsReturn.ts index 592167a485..b1003cd0dc 100644 --- a/test/src/internal/_test_functional_validateEqualsReturn.ts +++ b/test/src/internal/_test_functional_validateEqualsReturn.ts @@ -29,9 +29,10 @@ export const _test_functional_validateEqualsReturn = if (expected.length === 0) return; const [x, y] = callback(input); - const actual: string[] = validate(() => y)(x) - .errors.map((err) => err.path) - .sort(); + const result: IValidation = validate(() => y)(x); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); if ( expected.length !== actual.length || expected.every((str, i) => str === actual[i]) === false diff --git a/test/src/internal/_test_functional_validateEqualsReturnAsync.ts b/test/src/internal/_test_functional_validateEqualsReturnAsync.ts index d8674ebea3..2b475e5808 100644 --- a/test/src/internal/_test_functional_validateEqualsReturnAsync.ts +++ b/test/src/internal/_test_functional_validateEqualsReturnAsync.ts @@ -34,9 +34,10 @@ export const _test_functional_validateEqualsReturnAsync = if (expected.length === 0) return; const [x, y] = callback(input); - const actual: string[] = (await validate(async () => y)(x)).errors - .map((err) => err.path) - .sort(); + const result: IValidation = await validate(async () => y)(x); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); if ( expected.length !== actual.length || expected.every((str, i) => str === actual[i]) === false diff --git a/test/src/internal/_test_json_application.ts b/test/src/internal/_test_json_application.ts index ea7c990b89..28219748c9 100644 --- a/test/src/internal/_test_json_application.ts +++ b/test/src/internal/_test_json_application.ts @@ -1,42 +1,42 @@ -import fs from "fs"; -import { IJsonApplication } from "typia"; +// import fs from "fs"; +// import { IJsonApplication } from "typia"; -import { primitive_equal_to } from "../helpers/primitive_equal_to"; +// import { primitive_equal_to } from "../helpers/primitive_equal_to"; -export const _test_json_application = - (props: { version: string; name: string }) => - >(app: App) => { - const actual: IJsonApplication = JSON.parse( - fs.readFileSync( - `${__dirname}/../../schemas/json/v${props.version.replace(".", "_")}/${props.name}.json`, - "utf8", - ), - ); - sort(app); - sort(actual); +// export const _test_json_application = +// (props: { version: string; name: string }) => +// >(app: App) => { +// const actual: IJsonApplication = JSON.parse( +// fs.readFileSync( +// `${__dirname}/../../schemas/json.application/v${props.version.replace(".", "_")}/${props.name}.json`, +// "utf8", +// ), +// ); +// sort(app); +// sort(actual); - if (primitive_equal_to(app, actual) === false) - throw new Error( - `Bug on typia.json.application<[${props.name}], "${props.version}">(): failed to understand the ${props.name} type.`, - ); - }; +// if (primitive_equal_to(app, actual) === false) +// throw new Error( +// `Bug on typia.json.application<[${props.name}], "${props.version}">(): failed to understand the ${props.name} type.`, +// ); +// }; -function sort(app: IJsonApplication): void { - function object(elem: object) { - for (const value of Object.values(elem)) iterate(value); - } - function array(elem: Array) { - for (const v of elem) iterate(v); - elem.sort((x, y) => { - const alpha = JSON.stringify(x); - const beta = JSON.stringify(y); - return alpha < beta ? -1 : alpha === beta ? 0 : 1; - }); - } - function iterate(elem: any) { - if (elem === null || elem === undefined) return; - else if (Array.isArray(elem)) array(elem); - else if (typeof elem === "object") object(elem); - } - iterate(app); -} +// function sort(app: IJsonApplication): void { +// function object(elem: object) { +// for (const value of Object.values(elem)) iterate(value); +// } +// function array(elem: Array) { +// for (const v of elem) iterate(v); +// elem.sort((x, y) => { +// const alpha = JSON.stringify(x); +// const beta = JSON.stringify(y); +// return alpha < beta ? -1 : alpha === beta ? 0 : 1; +// }); +// } +// function iterate(elem: any) { +// if (elem === null || elem === undefined) return; +// else if (Array.isArray(elem)) array(elem); +// else if (typeof elem === "object") object(elem); +// } +// iterate(app); +// } diff --git a/test/src/internal/_test_json_schemas.ts b/test/src/internal/_test_json_schemas.ts new file mode 100644 index 0000000000..b35393fe32 --- /dev/null +++ b/test/src/internal/_test_json_schemas.ts @@ -0,0 +1,42 @@ +import fs from "fs"; +import { IJsonSchemaCollection } from "typia"; + +import { primitive_equal_to } from "../helpers/primitive_equal_to"; + +export const _test_json_schemas = + (props: { version: string; name: string }) => + >(app: App) => { + const actual: IJsonSchemaCollection = JSON.parse( + fs.readFileSync( + `${__dirname}/../../schemas/json.schemas/v${props.version.replace(".", "_")}/${props.name}.json`, + "utf8", + ), + ); + sort(app); + sort(actual); + + if (primitive_equal_to(app, actual) === false) + throw new Error( + `Bug on typia.json.schemas<[${props.name}], "${props.version}">(): failed to understand the ${props.name} type.`, + ); + }; + +function sort(app: IJsonSchemaCollection): void { + function object(elem: object) { + for (const value of Object.values(elem)) iterate(value); + } + function array(elem: Array) { + for (const v of elem) iterate(v); + elem.sort((x, y) => { + const alpha = JSON.stringify(x); + const beta = JSON.stringify(y); + return alpha < beta ? -1 : alpha === beta ? 0 : 1; + }); + } + function iterate(elem: any) { + if (elem === null || elem === undefined) return; + else if (Array.isArray(elem)) array(elem); + else if (typeof elem === "object") object(elem); + } + iterate(app); +} diff --git a/test/src/internal/_test_llm_application.ts b/test/src/internal/_test_llm_application.ts new file mode 100644 index 0000000000..c45678aaf3 --- /dev/null +++ b/test/src/internal/_test_llm_application.ts @@ -0,0 +1,37 @@ +import { ILlmApplication, ILlmSchema } from "@samchon/openapi"; +import fs from "fs"; + +export const _test_llm_application = + (props: { model: Model; name: string }) => + (expected: ILlmApplication): void => { + const actual: ILlmApplication = JSON.parse( + fs.readFileSync( + `${__dirname}/../../schemas/llm.application/${props.model}/${props.name}.json`, + "utf8", + ), + ); + sort(expected); + sort(actual); + }; + +function sort( + app: ILlmApplication, +): void { + function object(elem: object) { + for (const value of Object.values(elem)) iterate(value); + } + function array(elem: Array) { + for (const v of elem) iterate(v); + elem.sort((x, y) => { + const alpha = JSON.stringify(x); + const beta = JSON.stringify(y); + return alpha < beta ? -1 : alpha === beta ? 0 : 1; + }); + } + function iterate(elem: any) { + if (elem === null || elem === undefined) return; + else if (Array.isArray(elem)) array(elem); + else if (typeof elem === "object") object(elem); + } + iterate(app); +} diff --git a/test/src/internal/_test_llm_parameters.ts b/test/src/internal/_test_llm_parameters.ts new file mode 100644 index 0000000000..ad97d952f8 --- /dev/null +++ b/test/src/internal/_test_llm_parameters.ts @@ -0,0 +1,37 @@ +import { ILlmSchema } from "@samchon/openapi"; +import fs from "fs"; + +export const _test_llm_parameters = + (props: { model: Model; name: string }) => + (expected: ILlmSchema.ModelParameters[Model]): void => { + const actual: ILlmSchema.ModelParameters[Model] = JSON.parse( + fs.readFileSync( + `${__dirname}/../../schemas/llm.parameters/${props.model}/${props.name}.json`, + "utf8", + ), + ); + sort(expected); + sort(actual); + }; + +function sort( + params: ILlmSchema.ModelParameters[Model], +): void { + function object(elem: object) { + for (const value of Object.values(elem)) iterate(value); + } + function array(elem: Array) { + for (const v of elem) iterate(v); + elem.sort((x, y) => { + const alpha = JSON.stringify(x); + const beta = JSON.stringify(y); + return alpha < beta ? -1 : alpha === beta ? 0 : 1; + }); + } + function iterate(elem: any) { + if (elem === null || elem === undefined) return; + else if (Array.isArray(elem)) array(elem); + else if (typeof elem === "object") object(elem); + } + iterate(params); +} diff --git a/test/src/internal/_test_llm_schema.ts b/test/src/internal/_test_llm_schema.ts index 580bf08758..2f024aee72 100644 --- a/test/src/internal/_test_llm_schema.ts +++ b/test/src/internal/_test_llm_schema.ts @@ -2,11 +2,11 @@ import { ILlmSchema } from "@samchon/openapi"; import fs from "fs"; export const _test_llm_schema = - (name: string) => - (expected: ILlmSchema): void => { - const actual: ILlmSchema = JSON.parse( + (props: { model: Model; name: string }) => + (expected: ILlmSchema.ModelSchema[Model]): void => { + const actual: ILlmSchema.ModelSchema[Model] = JSON.parse( fs.readFileSync( - `${__dirname}/../../schemas/llm/type/${name}.json`, + `${__dirname}/../../schemas/llm.schema/${props.model}/${props.name}.json`, "utf8", ), ); @@ -14,7 +14,9 @@ export const _test_llm_schema = sort(actual); }; -function sort(app: ILlmSchema): void { +function sort( + app: ILlmSchema.ModelSchema[Model], +): void { function object(elem: object) { for (const value of Object.values(elem)) iterate(value); } diff --git a/test/src/internal/_test_misc_assertClone.ts b/test/src/internal/_test_misc_assertClone.ts index 258d4217b5..ff982232e4 100644 --- a/test/src/internal/_test_misc_assertClone.ts +++ b/test/src/internal/_test_misc_assertClone.ts @@ -14,7 +14,7 @@ export const _test_misc_assertClone = if (resolved_equal_to(name)(input, cloned) === false) { throw new Error( - `Bug on TSON.assertClone(): failed to understand the ${name} type.`, + `Bug on typia.misc.assertClone(): failed to understand the ${name} type.`, ); } @@ -36,7 +36,7 @@ export const _test_misc_assertClone = }); } throw new Error( - `Bug on TSON.assertClone(): failed to detect error on the ${name} type.`, + `Bug on typia.misc.assertClone(): failed to detect error on the ${name} type.`, ); } }; diff --git a/test/src/internal/_test_misc_isClone.ts b/test/src/internal/_test_misc_isClone.ts index b850c87881..b872ac7676 100644 --- a/test/src/internal/_test_misc_isClone.ts +++ b/test/src/internal/_test_misc_isClone.ts @@ -13,7 +13,7 @@ export const _test_misc_isClone = if (resolved_equal_to(name)(data, cloned!) === false) { throw new Error( - `Bug on typia.isClone(): failed to understand the ${name} type.`, + `Bug on typia.misc.isClone(): failed to understand the ${name} type.`, ); } @@ -23,7 +23,7 @@ export const _test_misc_isClone = if (clone(elem) !== null) throw new Error( - `Bug on typia.isClone(): failed to detect error on the ${name} type.`, + `Bug on typia.misc.isClone(): failed to detect error on the ${name} type.`, ); } }; diff --git a/test/src/internal/_test_misc_validateClone.ts b/test/src/internal/_test_misc_validateClone.ts index 89b96379ac..635b18211f 100644 --- a/test/src/internal/_test_misc_validateClone.ts +++ b/test/src/internal/_test_misc_validateClone.ts @@ -12,12 +12,12 @@ export const _test_misc_validateClone = const valid: typia.IValidation> = clone(input); if (valid.success === false) throw new Error( - `Bug on typia.validateClone(): failed to understand the ${name} type.`, + `Bug on typia.misc.validateClone(): failed to understand the ${name} type.`, ); if (resolved_equal_to(name)(input, valid.data) === false) { throw new Error( - `Bug on typia.assertStringify(): failed to understand the ${name} type.`, + `Bug on typia.misc.validateClone(): failed to understand the ${name} type.`, ); } @@ -29,7 +29,7 @@ export const _test_misc_validateClone = if (valid.success === true) throw new Error( - `Bug on typia.validateClone(): failed to detect error on the ${name} type.`, + `Bug on typia.misc.validateClone(): failed to detect error on the ${name} type.`, ); typia.assert(valid); @@ -47,7 +47,7 @@ export const _test_misc_validateClone = } if (wrong.length !== 0) throw new Error( - `Bug on typia.validateClone(): failed to detect error on the ${name} type.`, + `Bug on typia.misc.validateClone(): failed to detect error on the ${name} type.`, ); }; diff --git a/test/src/internal/_test_protobuf_message.ts b/test/src/internal/_test_protobuf_message.ts index f07f8c38c4..45d2838e6d 100644 --- a/test/src/internal/_test_protobuf_message.ts +++ b/test/src/internal/_test_protobuf_message.ts @@ -1,7 +1,5 @@ import fs from "fs"; -// import pjs from "protobufjs"; - export const _test_protobuf_message = (name: string) => (expected: string) => () => { // COMPARE SCHEMA WITH EXPECTED @@ -16,38 +14,4 @@ export const _test_protobuf_message = throw new Error( `Bug on typia.protobuf.message(): failed to understand the ${name} type.`, ); - - // const messages: string[] = expected - // .split("message ") - // .slice(1) - // .map((str) => str.split(" {")[0]) - // .map((str, i, array) => (i === 0 ? str : `${array[0]}.${str}`)); - - // // VALIDATE THE SCHEMA - // const root: pjs.Root = pjs.parse(expected).root; - // const types: pjs.Type[] = messages - // .map((msg) => { - // try { - // return root.lookupType(msg); - // } catch { - // return null!; - // } - // }) - // .filter((type) => type !== null); - - // fs.writeFileSync( - // `${__dirname}/../../../test/schemas/protobuf/${messages[0]}.js`, - // [ - // "//--------------------------------------------------", - // "// DEODERS", - // "//--------------------------------------------------", - // ...types.map((t) => pjs.decoder(t).toString()), - // "", - // "//--------------------------------------------------", - // "// ENCODERS", - // "//--------------------------------------------------", - // ...types.map((t) => pjs.encoder(t).toString()), - // ].join("\n"), - // "utf8", - // ); }; diff --git a/test/src/internal/_test_validateEquals.ts b/test/src/internal/_test_validateEquals.ts index ca089f56b1..f15a30ccf1 100644 --- a/test/src/internal/_test_validateEquals.ts +++ b/test/src/internal/_test_validateEquals.ts @@ -33,9 +33,10 @@ export const _test_validateEquals = if (expected.length === 0) return; // SOLUTION - const actual: string[] = validateEquals(input) - .errors.map((err) => err.path) - .sort(); + const result: IValidation = validateEquals(input); + const actual: string[] = result.success + ? [] + : result.errors.map((err) => err.path).sort(); // COMPARE if ( diff --git a/test/src/structures/ObjectHttpTypeTag.ts b/test/src/structures/ObjectHttpTypeTag.ts index 6d3a34dc88..c1f3e38a76 100644 --- a/test/src/structures/ObjectHttpTypeTag.ts +++ b/test/src/structures/ObjectHttpTypeTag.ts @@ -8,7 +8,6 @@ export interface ObjectHttpTypeTag { int32: number & tags.Type<"int32">; uint64: bigint & tags.Type<"uint64">; uuid: string & tags.Format<"uuid">; - range: Array & tags.Maximum<7>> & tags.MinItems<10> & tags.MaxItems<100>; diff --git a/test/src/structures/ObjectSequenceProtobuf.ts b/test/src/structures/ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..7d145caeec --- /dev/null +++ b/test/src/structures/ObjectSequenceProtobuf.ts @@ -0,0 +1,82 @@ +import { IPointer, randint } from "tstl"; +import { tags } from "typia"; +import { v4 } from "uuid"; + +import { Spoiler } from "../helpers/Spoiler"; +import { TestRandomGenerator } from "../helpers/TestRandomGenerator"; + +export type ObjectSequenceProtobuf = IPointer; +export namespace ObjectSequenceProtobuf { + export interface IMember { + id: + | (string & tags.Sequence<11>) + | (number & tags.Type<"uint64"> & tags.Sequence<12>) + | (Uint8Array & tags.Sequence<13>); + name: (string & tags.Sequence<20>) | null; + children: Array & tags.Sequence<30>; + keywords: Map & tags.Sequence<40>; + thumbnail: + | (string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">) + | Uint8Array; + email: string & tags.Format<"email">; + hobbies: Array; + } + export interface IHobby { + id: string & tags.Format<"uuid">; + name: string; + valid: boolean; + } + + export const ADDABLE = false; + export const JSONABLE = false; + export const PRIMITIVE = false; + + export function generate(level: number = 0): ObjectSequenceProtobuf { + const members: IMember[] = []; + for (const id of [v4(), randint(0, 1_000_000), new Uint8Array()]) + for (const thumbnail of ["https://typia.io/logo.png", new Uint8Array()]) + members.push({ + id, + name: TestRandomGenerator.string(10), + children: level < 2 ? generate(level + 1).value : [], + keywords: new Map( + new Array(randint(1, 4)) + .fill(null) + .map(() => [ + TestRandomGenerator.string(10), + TestRandomGenerator.string(10), + ]), + ), + thumbnail, + email: TestRandomGenerator.email(), + hobbies: new Array(randint(1, 4)).fill(null).map(() => ({ + id: v4(), + name: TestRandomGenerator.string(10), + valid: TestRandomGenerator.boolean(), + })), + }); + return { + value: members, + }; + } + + export const SPOILERS: Spoiler[] = [ + (input) => { + input.value[0]!.id = 3.141592; + return ["$input.value[0].id"]; + }, + (input) => { + input.value[1]!.name = undefined!; + return ["$input.value[1].name"]; + }, + (input) => { + input.value[2]!.children[3]!.thumbnail = "thumbnail URL"; + return ["$input.value[2].children[3].thumbnail"]; + }, + (input) => { + const map = input.value[0]!.keywords; + map.set("key", 3 as any); + return [`$input.value[0].keywords[${map.size - 1}][1]`]; + }, + ]; +} diff --git a/test/src/structures/TypeTagCustom.ts b/test/src/structures/TypeTagCustom.ts index 90610d3d24..97b51197a0 100644 --- a/test/src/structures/TypeTagCustom.ts +++ b/test/src/structures/TypeTagCustom.ts @@ -1,4 +1,6 @@ -import typia from "typia"; +import typia, { IRandomGenerator } from "typia"; +import { _randomNumber } from "typia/lib/internal/_randomNumber"; +import { _randomString } from "typia/lib/internal/_randomString"; import { v4 } from "uuid"; import { Spoiler } from "../helpers/Spoiler"; @@ -39,29 +41,22 @@ export namespace TypeTagCustom { }, ]; - export const RANDOM: typia.IRandomGenerator = { - ...TestRandomGenerator, - customs: { - string: (tags) => { - if ( - tags.find((t) => t.kind === "monetary" && t.value === "dollar") !== - undefined - ) - return "$" + TestRandomGenerator.integer(); - const postfix = tags.find((t) => t.kind === "postfix"); - if (postfix !== undefined) - return TestRandomGenerator.string() + postfix.value; - return undefined; - }, - number: (tags) => { - const powerOf = tags.find((t) => t.kind === "powerOf"); - if (powerOf !== undefined) - return Math.pow( - Number(powerOf.value), - TestRandomGenerator.integer(1, 10), - ); - return undefined; - }, + export const RANDOM: Partial = { + string: (schema) => { + if ((schema as any)["x-typia-monetary"] === "dollar") + return "$" + TestRandomGenerator.integer(); + else if ((schema as any)["x-typia-postfix"] !== undefined) + return ( + TestRandomGenerator.string() + (schema as any)["x-typia-postfix"] + ); + return _randomString(schema); + }, + number: (schema) => { + if ((schema as any)["x-typia-powerOf"] !== undefined) { + const powerOf = (schema as any)["x-typia-powerOf"]; + return Math.pow(powerOf, TestRandomGenerator.integer(1, 10)); + } + return _randomNumber(schema); }, }; } diff --git a/test/src/structures/TypeTagFormat.ts b/test/src/structures/TypeTagFormat.ts index 779516bdaf..0f03ed65ae 100644 --- a/test/src/structures/TypeTagFormat.ts +++ b/test/src/structures/TypeTagFormat.ts @@ -1,6 +1,7 @@ import crypto from "crypto"; import { tags } from "typia"; -import { RandomGenerator } from "typia/lib/utils/RandomGenerator"; +import { _randomFormatIpv4 } from "typia/lib/internal/_randomFormatIpv4"; +import { _randomFormatIpv6 } from "typia/lib/internal/_randomFormatIpv6"; import { v4 } from "uuid"; import { Spoiler } from "../helpers/Spoiler"; @@ -111,14 +112,14 @@ export namespace TypeTagFormat { input.iriReference = "/네스티아"; return ["$input.iriReference"]; }, - ...[RandomGenerator.ipv6(), "127.0.0.1234", "github.com"].map( + ...[_randomFormatIpv6(), "127.0.0.1234", "github.com"].map( (ipv4) => (input: TypeTagFormat) => { input.ipv4 = ipv4; return ["$input.ipv4"]; }, ), (input) => { - input.ipv6 = RandomGenerator.ipv4(); + input.ipv6 = _randomFormatIpv4(); return ["$input.ipv6"]; }, ...["github.com", "http://깃허브.com", "/abc"].map( diff --git a/test/src/structures/UltimateUnion.ts b/test/src/structures/UltimateUnion.ts index 8c51e9fdfc..a349290831 100644 --- a/test/src/structures/UltimateUnion.ts +++ b/test/src/structures/UltimateUnion.ts @@ -5,15 +5,15 @@ import { ArrayRecursiveUnionExplicit } from "./ArrayRecursiveUnionExplicit"; import { ObjectUnionExplicit } from "./ObjectUnionExplicit"; import { ObjectUnionImplicit } from "./ObjectUnionImplicit"; -export type UltimateUnion = typia.IJsonApplication[]; +export type UltimateUnion = typia.IJsonSchemaCollection[]; export namespace UltimateUnion { export const RECURSIVE = true; - export function generate(): typia.IJsonApplication[] { + export function generate(): typia.IJsonSchemaCollection[] { const output = [ - typia.json.application<[ObjectUnionExplicit]>(), - typia.json.application<[ObjectUnionImplicit]>(), - typia.json.application<[ArrayRecursiveUnionExplicit]>(), + typia.json.schemas<[ObjectUnionExplicit]>(), + typia.json.schemas<[ObjectUnionImplicit]>(), + typia.json.schemas<[ArrayRecursiveUnionExplicit]>(), ]; output[0]!.schemas[0] = { type: "number", @@ -21,13 +21,13 @@ export namespace UltimateUnion { return output; } - export function trail(): typia.IJsonApplication[] { - const input: typia.IJsonApplication[] = generate(); + export function trail(): typia.IJsonSchemaCollection[] { + const input: typia.IJsonSchemaCollection[] = generate(); SPOILERS[0]!(input); return input; } - export const SPOILERS: Spoiler[] = [ + export const SPOILERS: Spoiler[] = [ (input) => { const [key, schema] = (() => { const entries = Object.entries( diff --git a/test/tsconfig.generate.json b/test/tsconfig.generate.json new file mode 100644 index 0000000000..6a4aebad07 --- /dev/null +++ b/test/tsconfig.generate.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true, + }, + "include": ["generate"], +} \ No newline at end of file diff --git a/test/tsconfig.generated.json b/test/tsconfig.generated.json deleted file mode 100644 index 70887c3256..0000000000 --- a/test/tsconfig.generated.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./bin-generated", - }, - "include": ["generated"], -} \ No newline at end of file diff --git a/tsconfig.errors.json b/tsconfig.errors.json new file mode 100644 index 0000000000..836307ebac --- /dev/null +++ b/tsconfig.errors.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./errors/node_modules/typia/lib", + }, +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index f3914ece9a..1d4b4395e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": [ "DOM", "ES2020" diff --git a/website/pages/docs/__templates/import.txt b/website/pages/docs/__templates/import.txt deleted file mode 100644 index 8e0560f476..0000000000 --- a/website/pages/docs/__templates/import.txt +++ /dev/null @@ -1,3 +0,0 @@ -import { Tabs, Tab } from 'nextra-theme-docs' -import Alert from '@mui/material/Alert'; -import AlertTitle from '@mui/material/AlertTitle'; \ No newline at end of file diff --git a/website/pages/docs/__templates/tab-aot.txt b/website/pages/docs/__templates/tab-aot.txt deleted file mode 100644 index 659e6642ef..0000000000 --- a/website/pages/docs/__templates/tab-aot.txt +++ /dev/null @@ -1,10 +0,0 @@ - - -```typescript copy filename="examples/src/.ts" showLineNumbers -``` - - -```javascript filename="examples/bin/.js" showLineNumbers -``` - - \ No newline at end of file diff --git a/website/pages/docs/__templates/tab-module.txt b/website/pages/docs/__templates/tab-module.txt deleted file mode 100644 index b60d4ae42f..0000000000 --- a/website/pages/docs/__templates/tab-module.txt +++ /dev/null @@ -1,40 +0,0 @@ -typia, - TypeGuardError.ts, - IValidation.ts -]}> - -```typescript copy -``` - - -```typescript copy -export class TypeGuardError extends Error { - public readonly method: string; - public readonly path: string | undefined; - public readonly expected: string; - public readonly value: any; -} -``` - - -```typescript copy -export type IValidation = IValidation.ISuccess | IValidation.IFailure; -export namespace IValidation { - export interface ISuccess { - success: true; - data: T; - } - export interface IFailure { - success: false; - errors: IError[]; - } - export interface IError { - path: string; - expected: string; - value: any; - } -} -``` - - \ No newline at end of file diff --git a/website/pages/docs/index.mdx b/website/pages/docs/index.mdx index 86e695aae7..c73433617c 100644 --- a/website/pages/docs/index.mdx +++ b/website/pages/docs/index.mdx @@ -53,6 +53,15 @@ export namespace json { export function assertStringify(input: T): string; // safe and faster } +// LLM FUNCTION CALLING SCHEMA +export namespace llm { + // application schema from a class or interface type + export function application(): ILlmApplication; + // structured output + export function parameters(): ILlmSchema.IParameters; + export function schema(): ILlmSchema; // type schema +} + // PROTOCOL BUFFER export namespace protobuf { export function message(): string; // Protocol Buffer message @@ -68,6 +77,7 @@ Typia is a transformer library supporting below features: - Super-fast Runtime Validators - Enhanced JSON functions + - LLM function calling application schema - Protocol Buffer encoder and decoder - Random data generator diff --git a/website/pages/docs/json/parse.mdx b/website/pages/docs/json/parse.mdx index 0710461bd7..cdd67818db 100644 --- a/website/pages/docs/json/parse.mdx +++ b/website/pages/docs/json/parse.mdx @@ -221,83 +221,68 @@ interface IMember { ```javascript filename="examples/bin/assertParse.js" showLineNumbers +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomFormatEmail from "typia/lib/internal/_randomFormatEmail.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; const json = JSON.stringify( - ((generator) => { - const $generator = typia.random.generator; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"uuid">', - kind: "format", - value: "uuid", - }, - ]) ?? (generator?.uuid ?? $generator.uuid)(), - email: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"email">', - kind: "format", - value: "email", - }, - ]) ?? (generator?.email ?? $generator.email)(), - age: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"uint32">', - kind: "type", - value: "uint32", - }, - { - name: "ExclusiveMinimum<19>", - kind: "exclusiveMinimum", - value: 19, - }, - { - name: "Maximum<100>", - kind: "maximum", - value: 100, - }, - ]) ?? (generator?.integer ?? $generator.integer)(19, 100), + (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.uuid ?? + __typia_transform__randomFormatUuid._randomFormatUuid + )(), + email: ( + _generator?.email ?? + __typia_transform__randomFormatEmail._randomFormatEmail + )(), + age: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + }), }); - return $ro0(); - })(), + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; + })()(), ); const parsed = (() => { - const $guard = typia.json.assertParse.guard; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -305,21 +290,21 @@ const parsed = (() => { _errorFactory, )) && (("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || - $guard( + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".email", expected: 'string & Format<"email">', value: input.email, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".email", expected: '(string & Format<"email">)', value: input.email, @@ -327,12 +312,11 @@ const parsed = (() => { _errorFactory, )) && (("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || - $guard( + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".age", expected: 'number & Type<"uint32">', value: input.age, @@ -340,9 +324,10 @@ const parsed = (() => { _errorFactory, )) && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -350,18 +335,20 @@ const parsed = (() => { _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.assertParse", path: _path + ".age", expected: '(number & Type<"uint32"> & ExclusiveMinimum<19> & Maximum<100>)', @@ -370,26 +357,28 @@ const parsed = (() => { _errorFactory, )); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; const __assert = (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.json.assertParse", path: _path + "", expected: "IMember", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.json.assertParse", path: _path + "", expected: "IMember", value: input, @@ -623,25 +612,22 @@ interface IMember { ```javascript filename="examples/bin/createIsParse.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; import typia from "typia"; export const parseMember = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); return (input) => { input = JSON.parse(input); return __is(input) ? input : null; diff --git a/website/pages/docs/json/schema.mdx b/website/pages/docs/json/schema.mdx index eb51719840..5373713198 100644 --- a/website/pages/docs/json/schema.mdx +++ b/website/pages/docs/json/schema.mdx @@ -1,17 +1,17 @@ import { Tabs, Tab } from 'nextra-theme-docs' -## `application()` function +## `schemas()` function typia, - IJsonApplication.ts, + IJsonCollection.ts, ]}> ```typescript copy export namespace json { - export function application< + export function schemas< Schemas extends unknown[], Version extends "3.0" | "3.1" = "3.1", - >(): IJsonApplication; + >(): IJsonCollection; } ``` @@ -19,9 +19,9 @@ export namespace json { ```typescript copy import type { OpenApi, OpenApiV3 } from "@samchon/openapi"; -export type IJsonApplication = - Version extends "3.0" ? IJsonApplication.IV3_0 : IJsonApplication.IV3_1; -export namespace IJsonApplication { +export type IJsonCollection = + Version extends "3.0" ? IJsonCollection.IV3_0 : IJsonCollection.IV3_1; +export namespace IJsonCollection { export interface IV3_0 { version: "3.0"; schemas: OpenApiV3.IJsonSchema[]; @@ -40,13 +40,13 @@ export namespace IJsonApplication { JSON schema generator. - Definitions: - - [`IJsonApplication`](https://github.com/samchon/typia/blob/master/src/schemas/json/IJsonApplication.ts) + - [`IJsonCollection`](https://github.com/samchon/typia/blob/master/src/schemas/json/IJsonCollection.ts) - [OpenAPI v3.0](https://github.com/samchon/openapi/blob/master/src/OpenApiV3.ts) - [OpenAPI v3.1](https://github.com/samchon/openapi/blob/master/src/OpenApi.ts) -When you need JSON schema, do not write it by yourself, but just call `typia.json.application()` function. +When you need JSON schema, do not write it by yourself, but just call `typia.json.schemas()` function. -If you call the `typia.json.application()` with specialization of target `Schemas`, `typia` will analyze your `Schemas` and generate JSON schema definition in the compilation level. However, note that, JSON schema definitions of "OpenAPI v3.0" and "OpenAPI v3.1" are a little bit different. Therefore, you have to consider which value to assign in the `Version` argument. +If you call the `typia.json.schemas()` with specialization of target `Schemas`, `typia` will analyze your `Schemas` and generate JSON schema definition in the compilation level. However, note that, JSON schema definitions of "OpenAPI v3.0" and "OpenAPI v3.1" are a little bit different. Therefore, you have to consider which value to assign in the `Version` argument. - Swagger can't express tuple type - Swagger can't express pattern property @@ -56,7 +56,7 @@ If you call the `typia.json.application()` with specialization of target `Schema ```typescript copy filename="examples/src/application.ts" showLineNumbers import typia, { tags } from "typia"; -export const MemberSchema = typia.json.application<[IMember], "3.0">(); +export const MemberSchema = typia.json.schemas<[IMember], "3.0">(); interface IMember { /** @@ -113,7 +113,6 @@ export const MemberSchema = { "Age of the member.\n\nFor reference, only adult can be a member.", }, }, - nullable: false, required: ["id", "email", "age"], }, }, @@ -150,7 +149,7 @@ Let's see how those [type tags](../validators/tags/#type-tags), comment tags and ```typescript copy filename="examples/src/application-comment-tags.ts" showLineNumbers import typia, { tags } from "typia"; -export const SpecialTagSchema = typia.json.application<[Special], "3.1">(); +export const SpecialTagSchema = typia.json.schemas<[Special], "3.1">(); interface Special { /** @@ -336,7 +335,7 @@ interface IAccount { balance: number & Monetary<"dollar">; }; -typia.json.application<[IAccount]>(); +typia.json.schemas<[IAccount]>(); ``` @@ -383,7 +382,7 @@ So if you use `bigint` type in one of your onetarget schemas, `typia` will make -```typescript filename="json.application.ts" copy showLineNumbers +```typescript filename="json.schemas.ts" copy showLineNumbers import typia, { tags } from "typia"; interface Something { @@ -395,12 +394,12 @@ interface Nested { uint64: bigint & tags.Type<"uint64">; } -typia.json.application<[Something]>(); +typia.json.schemas<[Something]>(); ``` ```bash -main.ts:12:1 - error TS(typia.json.application): unsupported type detected +main.ts:12:1 - error TS(typia.json.schemas): unsupported type detected - Something.bigint: bigint - JSON does not support bigint type. @@ -418,17 +417,17 @@ Also, if you put any type of native classes like `Map` or `Uint8Array`, it would -```typescript filename="json.application.native.ts" showLineNumbers copy +```typescript filename="json.schemas.native.ts" showLineNumbers copy import typia from "typia"; interface Native { date: Date; } -typia.json.application<[Native]>(); +typia.json.schemas<[Native]>(); ``` -```typescript filename="json.application.native.js" showLineNumbers +```typescript filename="json.schemas.native.js" showLineNumbers import typia from "typia"; ({ version: "3.1", diff --git a/website/pages/docs/json/stringify.mdx b/website/pages/docs/json/stringify.mdx index 9f6a59a55e..083e9f0a76 100644 --- a/website/pages/docs/json/stringify.mdx +++ b/website/pages/docs/json/stringify.mdx @@ -99,114 +99,98 @@ interface IClerk { ```javascript filename="examples/bin/isStringify.js" showLineNumbers +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber.js"; +import * as __typia_transform__randomFormatDate from "typia/lib/internal/_randomFormatDate.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeInt32 from "typia/lib/internal/_isTypeInt32.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__isFormatDate from "typia/lib/internal/_isFormatDate.js"; +import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString.js"; +import * as __typia_transform__jsonStringifyNumber from "typia/lib/internal/_jsonStringifyNumber.js"; import typia from "typia"; -const department = ((generator) => { - const $generator = typia.random.generator; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"uuid">', - kind: "format", - value: "uuid", - }, - ]) ?? (generator?.uuid ?? $generator.uuid)(), - name: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: "MinLength<3>", - kind: "minLength", - value: 3, - }, - ]) ?? - (generator?.string ?? $generator.string)( - (generator?.integer ?? $generator.integer)(3, 25), - ), - limit: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"int32">', - kind: "type", - value: "int32", - }, - ]) ?? (generator?.integer ?? $generator.integer)(0, 100), - clerks: (generator?.array ?? $generator.array)(() => - $ro1(_recursive, _recursive ? 1 + _depth : _depth), +const department = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid + )(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + minLength: 3, + }, ), + limit: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + }), + clerks: (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => _ro1(_recursive, _recursive ? 1 + _depth : _depth), + }), }); - const $ro1 = (_recursive = false, _depth = 0) => ({ - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - age: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"uint32">', - kind: "type", - value: "uint32", - }, - { - name: "ExclusiveMinimum<19>", - kind: "exclusiveMinimum", - value: 19, - }, - { - name: "Maximum<100>", - kind: "maximum", - value: 100, - }, - ]) ?? (generator?.integer ?? $generator.integer)(19, 100), - authority: - (generator?.customs ?? $generator.customs)?.number?.([]) ?? - (generator?.number ?? $generator.number)(0, 100), - joined_at: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"date">', - kind: "format", - value: "date", - }, - ]) ?? (generator?.date ?? $generator.date)(), + const _ro1 = (_recursive = false, _depth = 0) => ({ + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + age: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + }), + authority: ( + _generator?.number ?? __typia_transform__randomNumber._randomNumber + )({ + type: "number", + }), + joined_at: ( + _generator?.date ?? __typia_transform__randomFormatDate._randomFormatDate + )(), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); const json = (() => { - const $string = typia.json.isStringify.string; - const $number = typia.json.isStringify.number; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.name && 3 <= input.name.length && "number" === typeof input.limit && - Math.floor(input.limit) === input.limit && - -2147483648 <= input.limit && - input.limit <= 2147483647 && + __typia_transform__isTypeInt32._isTypeInt32(input.limit) && Array.isArray(input.clerks) && input.clerks.every( - (elem) => "object" === typeof elem && null !== elem && $io1(elem), + (elem) => "object" === typeof elem && null !== elem && _io1(elem), ); - const $io1 = (input) => + const _io1 = (input) => "string" === typeof input.name && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100 && "number" === typeof input.authority && !Number.isNaN(input.authority) && "string" === typeof input.joined_at && - /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test(input.joined_at); - const $so0 = (input) => - `{"id":${$string(input.id)},"name":${$string(input.name)},"limit":${$number(input.limit)},"clerks":${`[${input.clerks.map((elem) => $so1(elem)).join(",")}]`}}`; - const $so1 = (input) => - `{"name":${$string(input.name)},"age":${$number(input.age)},"authority":${$number(input.authority)},"joined_at":${$string(input.joined_at)}}`; + __typia_transform__isFormatDate._isFormatDate(input.joined_at); + const _so0 = (input) => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"limit":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.limit)},"clerks":${`[${input.clerks.map((elem) => _so1(elem)).join(",")}]`}}`; + const _so1 = (input) => + `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"authority":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.authority)},"joined_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.joined_at)}}`; const __is = (input) => - "object" === typeof input && null !== input && $io0(input); - const __stringify = (input) => $so0(input); + "object" === typeof input && null !== input && _io0(input); + const __stringify = (input) => _so0(input); return (input) => (__is(input) ? __stringify(input) : null); })()(department); console.log(json); // not null, but string @@ -299,54 +283,52 @@ interface IClerk { ```javascript filename="examples/bin/createAssertStringify.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeInt32 from "typia/lib/internal/_isTypeInt32.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__isFormatDate from "typia/lib/internal/_isFormatDate.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString.js"; import typia from "typia"; export const assertDepartment = (() => { - const $guard = typia.json.createAssertStringify.guard; - const $string = typia.json.createAssertStringify.string; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.name && 3 <= input.name.length && "number" === typeof input.limit && - Math.floor(input.limit) === input.limit && - -2147483648 <= input.limit && - input.limit <= 2147483647 && + __typia_transform__isTypeInt32._isTypeInt32(input.limit) && Array.isArray(input.clerks) && input.clerks.every( - (elem) => "object" === typeof elem && null !== elem && $io1(elem), + (elem) => "object" === typeof elem && null !== elem && _io1(elem), ); - const $io1 = (input) => + const _io1 = (input) => "string" === typeof input.name && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100 && "number" === typeof input.authority && !Number.isNaN(input.authority) && "string" === typeof input.joined_at && - /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test(input.joined_at); - const $ao0 = (input, _path, _exceptionable = true) => + __typia_transform__isFormatDate._isFormatDate(input.joined_at); + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -355,18 +337,20 @@ export const assertDepartment = (() => { )) && (("string" === typeof input.name && (3 <= input.name.length || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".name", expected: "string & MinLength<3>", value: input.name, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".name", expected: "(string & MinLength<3>)", value: input.name, @@ -374,21 +358,21 @@ export const assertDepartment = (() => { _errorFactory, )) && (("number" === typeof input.limit && - ((Math.floor(input.limit) === input.limit && - -2147483648 <= input.limit && - input.limit <= 2147483647) || - $guard( + (__typia_transform__isTypeInt32._isTypeInt32(input.limit) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".limit", expected: 'number & Type<"int32">', value: input.limit, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".limit", expected: '(number & Type<"int32">)', value: input.limit, @@ -396,9 +380,10 @@ export const assertDepartment = (() => { _errorFactory, )) && (((Array.isArray(input.clerks) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".clerks", expected: "Array", value: input.clerks, @@ -408,23 +393,25 @@ export const assertDepartment = (() => { input.clerks.every( (elem, _index2) => ((("object" === typeof elem && null !== elem) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".clerks[" + _index2 + "]", expected: "IClerk", value: elem, }, _errorFactory, )) && - $ao1( + _ao1( elem, _path + ".clerks[" + _index2 + "]", true && _exceptionable, )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".clerks[" + _index2 + "]", expected: "IClerk", value: elem, @@ -432,20 +419,22 @@ export const assertDepartment = (() => { _errorFactory, ), )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".clerks", expected: "Array", value: input.clerks, }, _errorFactory, )); - const $ao1 = (input, _path, _exceptionable = true) => + const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".name", expected: "string", value: input.name, @@ -453,12 +442,11 @@ export const assertDepartment = (() => { _errorFactory, )) && (("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || - $guard( + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".age", expected: 'number & Type<"uint32">', value: input.age, @@ -466,9 +454,10 @@ export const assertDepartment = (() => { _errorFactory, )) && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -476,18 +465,20 @@ export const assertDepartment = (() => { _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".age", expected: '(number & Type<"uint32"> & ExclusiveMinimum<19> & Maximum<100>)', @@ -496,9 +487,10 @@ export const assertDepartment = (() => { _errorFactory, )) && (("number" === typeof input.authority && !Number.isNaN(input.authority)) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".authority", expected: "number", value: input.authority, @@ -506,52 +498,54 @@ export const assertDepartment = (() => { _errorFactory, )) && (("string" === typeof input.joined_at && - (/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test( - input.joined_at, - ) || - $guard( + (__typia_transform__isFormatDate._isFormatDate(input.joined_at) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".joined_at", expected: 'string & Format<"date">', value: input.joined_at, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.json.createAssertStringify", path: _path + ".joined_at", expected: '(string & Format<"date">)', value: input.joined_at, }, _errorFactory, )); - const $so0 = (input) => - `{"id":${$string(input.id)},"name":${$string(input.name)},"limit":${input.limit},"clerks":${`[${input.clerks.map((elem) => $so1(elem)).join(",")}]`}}`; - const $so1 = (input) => - `{"name":${$string(input.name)},"age":${input.age},"authority":${input.authority},"joined_at":${$string(input.joined_at)}}`; + const _so0 = (input) => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"limit":${input.limit},"clerks":${`[${input.clerks.map((elem) => _so1(elem)).join(",")}]`}}`; + const _so1 = (input) => + `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"age":${input.age},"authority":${input.authority},"joined_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.joined_at)}}`; const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; const __assert = (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.json.createAssertStringify", path: _path + "", expected: "IDepartment", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.json.createAssertStringify", path: _path + "", expected: "IDepartment", value: input, @@ -561,7 +555,7 @@ export const assertDepartment = (() => { } return input; }; - const __stringify = (input) => $so0(input); + const __stringify = (input) => _so0(input); return (input, errorFactory) => { __assert(input, errorFactory); return __stringify(input); diff --git a/website/pages/docs/llm/_meta.json b/website/pages/docs/llm/_meta.json index dce6675ccf..9f3147b162 100644 --- a/website/pages/docs/llm/_meta.json +++ b/website/pages/docs/llm/_meta.json @@ -1,4 +1,5 @@ { "application": "application() function", + "parameters": "parameters() function", "schema": "schema() function" } diff --git a/website/pages/docs/llm/application.mdx b/website/pages/docs/llm/application.mdx index dfaf3e6fd7..e11e2a0ebd 100644 --- a/website/pages/docs/llm/application.mdx +++ b/website/pages/docs/llm/application.mdx @@ -8,31 +8,54 @@ import { Callout, Tabs, Tab } from 'nextra-theme-docs' ILlmSchema, ]}> -```typescript filename="typia" +```typescript filename="typia" showLineNumbers {2-9} export namespace llm { - export function application( - options?: ILlmApplication.IOptions - ): ILlmApplication; + // LLM FUNCTION CALLING APPLICATION SCHEMA + export function application< + App extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >( + options?: Partial, "separate">>, + ): ILlmApplication; + + // STRUCTURED OUTPUT + export function parameters< + Parameters extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >(): ILlmSchema.ModelParameters[Model]; + + // TYPE SCHEMA + export function schema< + T, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >( + ...$defs: Extract< + ILlmSchema.ModelSchema[Model], + { $ref: string } + > extends never + ? [] + : [Record] + ): ILlmSchema.ModelSchema[Model]; } ``` ```typescript filename="@samchon/openapi" showLineNumbers +import { IGeminiSchema } from "./IGeminiSchema"; +import { ILlmFunction } from "./ILlmFunction"; +import { ILlmSchema } from "./ILlmSchema"; + /** * Application of LLM function calling. * * `ILlmApplication` is a data structure representing a collection of * {@link ILlmFunction LLM function calling schemas}, composed from a native - * TypeScript class (or interface) type by the `typia.llm.application()` + * TypeScript class (or interface) type by the `typia.llm.application()` * function. * - * By the way, the LLM function calling application composition, converting - * `ILlmApplication` instance from TypeScript interface (or class) type is not always - * successful. As LLM provider like OpenAI cannot understand the recursive reference - * type that is embodied by {@link OpenApi.IJsonSchema.IReference}, if there're some - * recursive types in the TypeScript interface (or class) type, the conversion would - * be failed. - * * Also, there can be some parameters (or their nested properties) which must be * composed by Human, not by LLM. File uploading feature or some sensitive information * like secrety key (password) are the examples. In that case, you can separate the @@ -48,29 +71,38 @@ export namespace llm { * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -export interface ILlmApplication { +export interface ILlmApplication { + /** + * Model of the LLM. + */ + model: Model; + /** * List of function metadata. * * List of function metadata that can be used for the LLM function call. */ - functions: ILlmFunction[]; + functions: ILlmFunction[]; /** - * Options for the document. + * Configuration for the application. */ - options: ILlmApplication.IOptions; + options: ILlmApplication.IOptions; } export namespace ILlmApplication { - export interface IOptions { + /** + * Options for application composition. + */ + export type IOptions = { /** * Separator function for the parameters. * * When composing parameter arguments through LLM function call, * there can be a case that some parameters must be composed by human, - * or LLM cannot understand the parameter. For example, if the - * parameter type has configured - * {@link ILlmSchema.IString.contentMediaType} which indicates file + * or LLM cannot understand the parameter. + * + * For example, if the parameter type has configured + * {@link IGeminiSchema.IString.contentMediaType} which indicates file * uploading, it must be composed by human, not by LLM * (Large Language Model). * @@ -84,19 +116,21 @@ export namespace ILlmApplication { * When writing the function, note that returning value `true` means * to be a human composing the value, and `false` means to LLM * composing the value. Also, when predicating the schema, it would - * better to utilize the {@link LlmTypeChecker} features. + * better to utilize the {@link GeminiTypeChecker} like features. * * @param schema Schema to be separated. * @returns Whether the schema value must be composed by human or not. * @default null */ - separate: null | ((schema: Schema) => boolean); - } + separate: null | ((schema: ILlmSchema.ModelSchema[Model]) => boolean); + } & ILlmSchema.ModelConfig[Model]; } ``` ```typescript filename="@samchon/openapi" showLineNumbers +import { ILlmSchema } from "./ILlmSchema"; + /** * LLM function metadata. * @@ -119,7 +153,7 @@ export namespace ILlmApplication { * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -export interface ILlmFunction { +export interface ILlmFunction { /** * Representative name of the function. */ @@ -128,12 +162,12 @@ export interface ILlmFunction { /** * List of parameter types. */ - parameters: Schema[]; + parameters: ILlmSchema.ModelParameters[Model]; /** * Collection of separated parameters. */ - separated?: ILlmFunction.ISeparated; + separated?: ILlmFunction.ISeparated; /** * Expected return type. @@ -141,7 +175,16 @@ export interface ILlmFunction { * If the function returns nothing (`void`), the `output` value would * be `undefined`. */ - output?: Schema | undefined; + output?: ILlmSchema.ModelSchema[Model]; + + /** + * Whether the function schema types are strict or not. + * + * Newly added specification to "OpenAI" at 2024-08-07. + * + * @reference https://openai.com/index/introducing-structured-outputs-in-the-api/ + */ + strict: true; /** * Description of the function. @@ -155,492 +198,198 @@ export interface ILlmFunction { * property has the highest priroity, and you have to consider it. */ description?: string | undefined; + + /** + * Whether the function is deprecated or not. + * + * If the `deprecated` is `true`, the function is not recommended to use. + * + * LLM (Large Language Model) may not use the deprecated function. + */ + deprecated?: boolean | undefined; + + /** + * Category tags for the function. + * + * You can fill this property by the `@tag ${name}` comment tag. + */ + tags?: string[]; } export namespace ILlmFunction { /** * Collection of separated parameters. */ - export interface ISeparated { + export interface ISeparated { /** * Parameters that would be composed by the LLM. */ - llm: ISeparatedParameter[]; + llm: ILlmSchema.ModelParameters[Model] | null; /** * Parameters that would be composed by the human. */ - human: ISeparatedParameter[]; - } - - /** - * Separated parameter. - */ - export interface ISeparatedParameter { - /** - * Index of the parameter. - * - * @type uint - */ - index: number; - - /** - * Type schema info of the parameter. - */ - schema: Schema; + human: ILlmSchema.ModelParameters[Model] | null; } } ``` ```typescript filename="@samchon/openapi" showLineNumbers +import { ILlmSchema } from "./ILlmSchema"; + /** - * Type schema info of LLM function call. + * LLM function metadata. * - * `ILlmSchema` is a type metadata of LLM (Large Language Model) - * function calling. + * `ILlmFunction` is an interface representing a function metadata, + * which has been used for the LLM (Language Large Model) function + * calling. Also, it's a function structure containing the function + * {@link name}, {@link parameters} and {@link output return type}. * - * `ILlmSchema` basically follows the JSON schema definition of OpenAPI - * v3.0 specification; {@link OpenApiV3.IJsonSchema}. However, `ILlmSchema` - * does not have the reference type; {@link OpenApiV3.IJsonSchema.IReference}. - * It's because the LLM cannot compose the reference typed arguments. + * If you provide this `ILlmFunction` data to the LLM provider like "OpenAI", + * the "OpenAI" will compose a function arguments by analyzing conversations + * with the user. With the LLM composed arguments, you can execute the function + * and get the result. * - * For reference, the OpenAPI v3.0 based JSON schema definition can't - * express the tuple array type. It has been supported since OpenAPI v3.1; - * {@link OpenApi.IJsonSchema.ITuple}. Therefore, it would better to avoid - * using the tuple array type in the LLM function calling. + * By the way, do not ensure that LLM will always provide the correct + * arguments. The LLM of present age is not perfect, so that you would + * better to validate the arguments before executing the function. + * I recommend you to validate the arguments before execution by using + * [`typia`](https://github.com/samchon/typia) library. * * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -export type ILlmSchema = - | ILlmSchema.IBoolean - | ILlmSchema.IInteger - | ILlmSchema.INumber - | ILlmSchema.IString - | ILlmSchema.IArray - | ILlmSchema.IObject - | ILlmSchema.IUnknown - | ILlmSchema.INullOnly - | ILlmSchema.IOneOf; -export namespace ILlmSchema { - /** - * Boolean type schema info. - */ - export interface IBoolean extends __ISignificant<"boolean"> { - /** - * Default value. - */ - default?: boolean | null; - - /** - * Enumeration values. - */ - enum?: Array; - } - - /** - * Integer type schema info. - */ - export interface IInteger extends __ISignificant<"integer"> { - /** - * Default value. - * - * @type int64 - */ - default?: number | null; - - /** - * Enumeration values. - * - * @type int64 - */ - enum?: Array; - - /** - * Minimum value restriction. - * - * @type int64 - */ - minimum?: number; - - /** - * Maximum value restriction. - * - * @type int64 - */ - maximum?: number; - - /** - * Exclusive minimum value restriction. - * - * For reference, even though your Swagger document has defined the - * `exclusiveMinimum` value as `number`, it has been forcibly converted - * to `boolean` type, and assigns the numeric value to the - * {@link minimum} property in the {@link OpenApi} conversion. - */ - exclusiveMinimum?: boolean; - - /** - * Exclusive maximum value restriction. - * - * For reference, even though your Swagger document has defined the - * `exclusiveMaximum` value as `number`, it has been forcibly converted - * to `boolean` type, and assigns the numeric value to the - * {@link maximum} property in the {@link OpenApi} conversion. - */ - exclusiveMaximum?: boolean; - - /** - * Multiple of value restriction. - * - * @type uint64 - * @exclusiveMinimum 0 - */ - multipleOf?: number; - } - +export interface ILlmFunction { /** - * Number type schema info. + * Representative name of the function. */ - export interface INumber extends __ISignificant<"number"> { - /** - * Default value. - */ - default?: number | null; - - /** - * Enumeration values. - */ - enum?: Array; - - /** - * Minimum value restriction. - */ - minimum?: number; - - /** - * Maximum value restriction. - */ - maximum?: number; - - /** - * Exclusive minimum value restriction. - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer} - * forcibly converts it to `boolean` type, and assign the numeric value to - * the {@link minimum} property. - */ - exclusiveMinimum?: boolean; - - /** - * Exclusive maximum value restriction. - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer} - * forcibly converts it to `boolean` type, and assign the numeric value to - * the {@link maximum} property. - */ - exclusiveMaximum?: boolean; - - /** - * Multiple of value restriction. - * - * @exclusiveMinimum 0 - */ - multipleOf?: number; - } + name: string; /** - * String type schema info. + * List of parameter types. */ - export interface IString extends __ISignificant<"string"> { - /** - * Default value. - */ - default?: string | null; - - /** - * Enumeration values. - */ - enum?: Array; - - /** - * Format restriction. - */ - format?: - | "binary" - | "byte" - | "password" - | "regex" - | "uuid" - | "email" - | "hostname" - | "idn-email" - | "idn-hostname" - | "iri" - | "iri-reference" - | "ipv4" - | "ipv6" - | "uri" - | "uri-reference" - | "uri-template" - | "url" - | "date-time" - | "date" - | "time" - | "duration" - | "json-pointer" - | "relative-json-pointer" - | (string & {}); - - /** - * Pattern restriction. - */ - pattern?: string; - - /** - * Minimum length restriction. - * - * @type uint64 - */ - minLength?: number; - - /** - * Maximum length restriction. - * - * @type uint64 - */ - maxLength?: number; - - /** - * Content media type restriction. - */ - contentMediaType?: string; - } + parameters: ILlmSchema.ModelParameters[Model]; /** - * Array type schema info. + * Collection of separated parameters. */ - export interface IArray - extends __ISignificant<"array"> { - /** - * Items type schema info. - * - * The `items` means the type of the array elements. In other words, it is - * the type schema info of the `T` in the TypeScript array type `Array`. - */ - items: Schema; - - /** - * Unique items restriction. - * - * If this property value is `true`, target array must have unique items. - */ - uniqueItems?: boolean; - - /** - * Minimum items restriction. - * - * Restriction of minumum number of items in the array. - * - * @type uint64 - */ - minItems?: number; - - /** - * Maximum items restriction. - * - * Restriction of maximum number of items in the array. - * - * @type uint64 - */ - maxItems?: number; - } + separated?: ILlmFunction.ISeparated; /** - * Object type schema info. + * Expected return type. + * + * If the function returns nothing (`void`), the `output` value would + * be `undefined`. */ - export interface IObject - extends __ISignificant<"object"> { - /** - * Properties of the object. - * - * The `properties` means a list of key-value pairs of the object's - * regular properties. The key is the name of the regular property, - * and the value is the type schema info. - * - * If you need additional properties that is represented by dynamic key, - * you can use the {@link additionalProperties} instead. - */ - properties?: Record; - - /** - * List of key values of the required properties. - * - * The `required` means a list of the key values of the required - * {@link properties}. If some property key is not listed in the `required` - * list, it means that property is optional. Otherwise some property key - * exists in the `required` list, it means that the property must be filled. - * - * Below is an example of the {@link properties} and `required`. - * - * ```typescript - * interface SomeObject { - * id: string; - * email: string; - * name?: string; - * } - * ``` - * - * As you can see, `id` and `email` {@link properties} are {@link required}, - * so that they are listed in the `required` list. - * - * ```json - * { - * "type": "object", - * "properties": { - * "id": { "type": "string" }, - * "email": { "type": "string" }, - * "name": { "type": "string" } - * }, - * "required": ["id", "email"] - * } - * ``` - */ - required?: string[]; - - /** - * Additional properties' info. - * - * The `additionalProperties` means the type schema info of the additional - * properties that are not listed in the {@link properties}. - * - * If the value is `true`, it means that the additional properties are not - * restricted. They can be any type. Otherwise, if the value is - * {@link ILlmSchema} type, it means that the additional properties must - * follow the type schema info. - * - * - `true`: `Record` - * - `ILlmSchema`: `Record` - */ - additionalProperties?: boolean | Schema; - } + output?: ILlmSchema.ModelSchema[Model]; /** - * Unknown type schema info. + * Whether the function schema types are strict or not. + * + * Newly added specification to "OpenAI" at 2024-08-07. * - * It means the type of the value is `any`. + * @reference https://openai.com/index/introducing-structured-outputs-in-the-api/ */ - export interface IUnknown extends __IAttribute { - /** - * Type is never be defined. - */ - type?: undefined; - } + strict: true; /** - * Null only type schema info. + * Description of the function. + * + * For reference, the `description` is very important property to teach + * the purpose of the function to the LLM (Language Large Model), and + * LLM actually determines which function to call by the description. + * + * Also, when the LLM conversates with the user, the `description` is + * used to explain the function to the user. Therefore, the `description` + * property has the highest priroity, and you have to consider it. */ - export interface INullOnly extends __IAttribute { - /** - * Type is always `null`. - */ - type: "null"; - - /** - * Default value. - */ - default?: null; - } + description?: string | undefined; /** - * One of type schema info. + * Whether the function is deprecated or not. * - * `IOneOf` represents an union type of the TypeScript (`A | B | C`). + * If the `deprecated` is `true`, the function is not recommended to use. * - * For reference, even though your Swagger (or OpenAPI) document has - * defined `anyOf` instead of the `oneOf`, it has been forcibly converted - * to `oneOf` type by {@link OpenApi.convert OpenAPI conversion}. + * LLM (Large Language Model) may not use the deprecated function. */ - export interface IOneOf - extends __IAttribute { - /** - * List of the union types. - */ - oneOf: Exclude>[]; - } + deprecated?: boolean | undefined; /** - * Significant attributes that can be applied to the most types. + * Category tags for the function. + * + * You can fill this property by the `@tag ${name}` comment tag. */ - export interface __ISignificant extends __IAttribute { - /** - * Discriminator value of the type. - */ - type: Type; - - /** - * Whether to allow `null` value or not. - */ - nullable?: boolean; - } - + tags?: string[]; +} +export namespace ILlmFunction { /** - * Common attributes that can be applied to all types. + * Collection of separated parameters. */ - export interface __IAttribute { - /** - * Title of the schema. - */ - title?: string; - + export interface ISeparated { /** - * Detailed description of the schema. + * Parameters that would be composed by the LLM. */ - description?: string; + llm: Parameters | null; /** - * Whether the type is deprecated or not. + * Parameters that would be composed by the human. */ - deprecated?: boolean; + human: Parameters | null; } } ``` -LLM function calling application from a native TypeScript class or interface type. +LLM function calling application schema from a native TypeScript class or interface type. -`typia.llm.application()` is a function composing LLM (Large Language Model) calling application from a native TypeScript class or interface type. The function returns an `ILlmApplication` instance, which is a data structure representing a collection of LLM function calling schemas. +`typia.llm.application()` is a function composing LLM (Large Language Model) calling application schema from a native TypeScript class or interface type. The function returns an `ILlmApplication` instance, which is a data structure representing a collection of LLM function calling schemas. -If you put LLM function schema instances registered in the `ILlmApplication.functions` to the LLM provider like `OpenAI`, the LLM will select a proper function to call with parameter values of the target function in the conversations with the user. This is the "LLM Function Calling". +If you put LLM function schema instances registered in the `ILlmApplication.functions` to the LLM provider like `OpenAI ChatGPT`, the LLM will select a proper function to call with parameter values of the target function in the conversations with the user. This is the "LLM Function Calling". -Let's make A.I. Chatbot super-easily with `typia.llm.application()` function. +You can specify the LLM provide model by the second `Model` template argument. It's because detailed specification of the function schema is different by the LLM provider model. Here is the list of LLM schema definitions of each model. Determine one of them carefully reading the LLM schema definitions. + +If you've determined, let's make A.I. Chatbot super-easily with `typia.llm.application()` function. + + - Supported schemas + - [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts): OpenAI ChatGPT + - [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts): Anthropic Claude + - [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts): Google Gemini + - [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts): Meta Llama + - Midldle layer schemas + - [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts): middle layer based on OpenAPI v3.0 specification + - [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts): middle layer based on OpenAPI v3.1 specification -**LLM Function Calling** +**LLM Function Calling** and **Structured Output** LLM selects proper function and fill arguments. In nowadays, most LLM (Large Language Model) like OpenAI are supporting "function calling" feature. The "LLM function calling" means that LLM automatically selects a proper function and fills parameter values from conversation with the user (may by chatting text). -https://platform.openai.com/docs/guides/function-calling +Structured output is another feature of LLM. The "structured output" means that LLM automatically transforms the output conversation into a structured data format like JSON. + +- https://platform.openai.com/docs/guides/function-calling +- https://platform.openai.com/docs/guides/structured-outputs + ## Description Comment ```typescript filename="example/src/llm.application.simple.ts" showLineNumbers {4} import { ILlmApplication } from "@samchon/openapi"; import typia, { tags } from "typia"; -const app: ILlmApplication = typia.llm.application(); +const app: ILlmApplication<"chatgpt"> = typia.llm.application< + BbsArticleController, + "chatgpt" +>(); console.log(app); @@ -650,32 +399,49 @@ interface BbsArticleController { * * Writes a new article and archives it into the DB. * - * @param input Information of the article to create + * @param props Properties of create function * @returns Newly created article */ - create(input: IBbsArticle.ICreate): Promise; + create(props: { + /** + * Information of the article to create + */ + input: IBbsArticle.ICreate; + }): Promise; /** * Update an article. * * Updates an article with new content. * - * @param id Target article's {@link IBbsArticle.id} + * @param props Properties of update function * @param input New content to update */ - update( - id: string & tags.Format<"uuid">, - input: IBbsArticle.IUpdate, - ): Promise; + update(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + + /** + * New content to update. + */ + input: IBbsArticle.IUpdate; + }): Promise; /** * Erase an article. * * Erases an article from the DB. * - * @param id Target article's {@link IBbsArticle.id} + * @param props Properties of erase function */ - erase(id: string & tags.Format<"uuid">): Promise; + erase(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + }): Promise; } /** @@ -740,158 +506,138 @@ namespace IBbsArticle { ``` -```json filename="example/schemas/llm.application.simple.json" showLineNumbers -{ - "functions": [ +```javascript filename="example/bin/llm.application.simple.js" showLineNumbers +import typia from "typia"; + +const app = { + model: "chatgpt", + options: { + reference: false, + separate: null, + }, + functions: [ { - "name": "create", - "parameters": [ - { - "type": "object", - "properties": { - "title": { - "type": "string", - "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." - }, - "body": { - "type": "string", - "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." + name: "create", + parameters: { + type: "object", + properties: { + input: { + description: + "Information of the article to create.\n\n------------------------------\n\nDescription of the current {@link IBbsArticle.ICreate} type:\n\n> Information of the article to create.\n\n------------------------------\n\nDescription of the parent {@link IBbsArticle} type:\n\n> Article entity.\n> \n> `IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + type: "object", + properties: { + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, - "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." - } + required: ["title", "body", "thumbnail"], + additionalProperties: false, }, - "nullable": false, - "required": [ - "title", - "body", - "thumbnail" - ], - "description": "Information of the article to create" - } - ], - "output": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." + }, + required: ["input"], + additionalProperties: false, + $defs: {}, + }, + output: { + description: + "Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + type: "object", + properties: { + id: { + title: "Primary Key", + description: "Primary Key.\n\n\n@format uuid", + type: "string", }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." + created_at: { + title: "Creation time of the article", + description: "Creation time of the article.\n\n\n@format date-time", + type: "string", }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Last updated time of the article", - "description": "Last updated time of the article." + updated_at: { + title: "Last updated time of the article", + description: + "Last updated time of the article.\n\n\n@format date-time", + type: "string", }, - "title": { - "type": "string", - "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", }, - "body": { - "type": "string", - "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, - "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." - } }, - "nullable": false, - "required": [ + required: [ "id", "created_at", "updated_at", "title", "body", - "thumbnail" + "thumbnail", ], - "description": "Newly created article" + additionalProperties: false, }, - "description": "Create a new article.\n\nWrites a new article and archives it into the DB." - }, - { - "name": "update", - "parameters": [ - { - "type": "string", - "format": "uuid", - "description": "Target article's " - }, - { - "type": "object", - "properties": { - "title": { - "type": "string", - "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." - }, - "body": { - "type": "string", - "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." - }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, - "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." - } - }, - "nullable": false, - "description": "New content to update" - } - ], - "description": "Update an article.\n\nUpdates an article with new content." + description: + "Create a new article.\n\nWrites a new article and archives it into the DB.", + strict: true, }, - { - "name": "erase", - "parameters": [ - { - "type": "string", - "format": "uuid", - "description": "Target article's " - } - ], - "description": "Erase an article.\n\nErases an article from the DB." - } ], - "options": { - "separate": null - } -} +}; +console.log(app); ``` -Here is the example code utilizing the `typia.llm.application()` function. +Here is the example code utilizing the `typia.llm.application()` function. As you can see, above example code is writing detailed descriptions for every functions and their parameter/return types. Such detailed descriptions are very important to teach the purpose of the function to the LLM (Language Large Model), and LLM actually determines which function to call by the description. Therefore, don't forget to writing detailed descriptions. It's very import feature for the LLM function calling. +Also, the reason every functions defined in the `BbsArticleController` type have only one object typed parameter is, it is the rule of LLM function calling. Such only one object parameter defining with static key-value pairs is called the keyword arguments. If you violate the LLM function calling's keyworded arguments rule, `typia.llm.application` will throw a compilation error. + @@ -910,12 +656,15 @@ Here is the example separating the parameter schemas. ]}> ```typescript filename="example/src/llm.application.separate.ts" showLineNumbers {4-7} -import { ILlmApplication, ILlmSchema, LlmTypeChecker } from "@samchon/openapi"; +import { ILlmApplication } from "@samchon/openapi"; import typia, { tags } from "typia"; -const app: ILlmApplication = typia.llm.application({ - separate: (schema: ILlmSchema) => - LlmTypeChecker.isString(schema) && schema.contentMediaType !== undefined, +const app: ILlmApplication<"claude"> = typia.llm.application< + BbsArticleController, + "claude" +>({ + separate: (schema: ILlmSchema<"claude">) => + ClaudeTypeChecker.isString(schema) && schema.contentMediaType !== undefined, }); console.log(app); @@ -926,114 +675,154 @@ interface BbsArticleController { * * Writes a new article and archives it into the DB. * - * @param input Information of the article to create + * @param props Properties of create function * @returns Newly created article */ - create(input: IBbsArticle.ICreate): Promise; + create(props: { + /** + * Information of the article to create + */ + input: IBbsArticle.ICreate; + }): Promise; /** * Update an article. * * Updates an article with new content. * - * @param id Target article's {@link IBbsArticle.id} + * @param props Properties of update function * @param input New content to update */ - update( - id: string & tags.Format<"uuid">, - input: IBbsArticle.IUpdate, - ): Promise; + update(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + + /** + * New content to update. + */ + input: IBbsArticle.IUpdate; + }): Promise; /** * Erase an article. * * Erases an article from the DB. * - * @param id Target article's {@link IBbsArticle.id} + * @param props Properties of erase function */ - erase(id: string & tags.Format<"uuid">): Promise; + erase(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + }): Promise; } ``` ```json filename="example/schemas/llm.application.separate.json" showLineNumbers {41-91} { + "model": "claude", + "options": { + "reference": false + }, "functions": [ { "name": "create", - "parameters": [ - { - "type": "object", - "properties": { - "title": { - "type": "string", - "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." - }, - "body": { - "type": "string", - "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." + "parameters": { + "type": "object", + "properties": { + "input": { + "description": "Information of the article to create.\n\n------------------------------\n\nDescription of the current {@link IBbsArticle.ICreate} type:\n\n> Information of the article to create.\n\n------------------------------\n\nDescription of the parent {@link IBbsArticle} type:\n\n> Article entity.\n> \n> `IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + "type": "object", + "properties": { + "title": { + "title": "Title of the article", + "description": "Title of the article.\n\nRepresentative title of the article.", + "type": "string" + }, + "body": { + "title": "Content body", + "description": "Content body.\n\nContent body of the article writtn in the markdown format.", + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail image URI", + "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "uri", + "contentMediaType": "image/*" + } + ] + } }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, - "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." - } - }, - "nullable": false, - "required": [ - "title", - "body", - "thumbnail" - ], - "description": "Information of the article to create" - } - ], + "required": [ + "title", + "body", + "thumbnail" + ] + } + }, + "required": [ + "input" + ], + "additionalProperties": false, + "$defs": {} + }, "output": { + "description": "Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", "type": "object", "properties": { "id": { - "type": "string", - "format": "uuid", "title": "Primary Key", - "description": "Primary Key." + "description": "Primary Key.", + "type": "string", + "format": "uuid" }, "created_at": { - "type": "string", - "format": "date-time", "title": "Creation time of the article", - "description": "Creation time of the article." + "description": "Creation time of the article.", + "type": "string", + "format": "date-time" }, "updated_at": { - "type": "string", - "format": "date-time", "title": "Last updated time of the article", - "description": "Last updated time of the article." + "description": "Last updated time of the article.", + "type": "string", + "format": "date-time" }, "title": { - "type": "string", "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." + "description": "Title of the article.\n\nRepresentative title of the article.", + "type": "string" }, "body": { - "type": "string", "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." + "description": "Content body.\n\nContent body of the article writtn in the markdown format.", + "type": "string" }, "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." + "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "uri", + "contentMediaType": "image/*" + } + ] } }, - "nullable": false, "required": [ "id", "created_at", @@ -1041,176 +830,212 @@ interface BbsArticleController { "title", "body", "thumbnail" - ], - "description": "Newly created article" + ] }, "description": "Create a new article.\n\nWrites a new article and archives it into the DB.", + "strict": true, "separated": { - "llm": [ - { - "index": 0, - "schema": { + "llm": { + "type": "object", + "properties": { + "input": { + "description": "Information of the article to create.\n\n------------------------------\n\nDescription of the current {@link IBbsArticle.ICreate} type:\n\n> Information of the article to create.\n\n------------------------------\n\nDescription of the parent {@link IBbsArticle} type:\n\n> Article entity.\n> \n> `IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", "type": "object", "properties": { "title": { - "type": "string", "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." + "description": "Title of the article.\n\nRepresentative title of the article.", + "type": "string" }, "body": { - "type": "string", "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." - } - }, - "nullable": false, - "required": [ - "title", - "body" - ], - "description": "Information of the article to create" - } - } - ], - "human": [ - { - "index": 0, - "schema": { - "type": "object", - "properties": { + "description": "Content body.\n\nContent body of the article writtn in the markdown format.", + "type": "string" + }, "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." + "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "uri", + "contentMediaType": "image/*" + } + ] } }, - "nullable": false, "required": [ + "title", + "body", "thumbnail" - ], - "description": "Information of the article to create" + ] } - } - ] + }, + "required": [ + "input" + ], + "additionalProperties": false, + "$defs": {} + }, + "human": null } }, { "name": "update", - "parameters": [ - { - "type": "string", - "format": "uuid", - "description": "Target article's " + "parameters": { + "type": "object", + "properties": { + "id": { + "title": "Target article's {@link IBbsArticle.id}", + "description": "Target article's {@link IBbsArticle.id}.", + "type": "string", + "format": "uuid" + }, + "input": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialIBbsArticle.ICreate} type:\n\n> Make all properties in T optional", + "type": "object", + "properties": { + "title": { + "title": "Title of the article", + "description": "Title of the article.\n\nRepresentative title of the article.", + "type": "string" + }, + "body": { + "title": "Content body", + "description": "Content body.\n\nContent body of the article writtn in the markdown format.", + "type": "string" + }, + "thumbnail": { + "title": "Thumbnail image URI", + "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "uri", + "contentMediaType": "image/*" + } + ] + } + }, + "required": [ + "title", + "body", + "thumbnail" + ] + } }, - { + "required": [ + "id", + "input" + ], + "additionalProperties": false, + "$defs": {} + }, + "description": "Update an article.\n\nUpdates an article with new content.", + "strict": true, + "separated": { + "llm": { "type": "object", "properties": { - "title": { - "type": "string", - "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." - }, - "body": { + "id": { + "title": "Target article's {@link IBbsArticle.id}", + "description": "Target article's {@link IBbsArticle.id}.", "type": "string", - "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." + "format": "uuid" }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, - "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." - } - }, - "nullable": false, - "description": "New content to update" - } - ], - "description": "Update an article.\n\nUpdates an article with new content.", - "separated": { - "llm": [ - { - "index": 0, - "schema": { - "type": "string", - "format": "uuid", - "description": "Target article's " - } - }, - { - "index": 1, - "schema": { + "input": { + "description": "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialIBbsArticle.ICreate} type:\n\n> Make all properties in T optional", "type": "object", "properties": { "title": { - "type": "string", "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." + "description": "Title of the article.\n\nRepresentative title of the article.", + "type": "string" }, "body": { - "type": "string", "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." - } - }, - "nullable": false, - "description": "New content to update" - } - } - ], - "human": [ - { - "index": 1, - "schema": { - "type": "object", - "properties": { + "description": "Content body.\n\nContent body of the article writtn in the markdown format.", + "type": "string" + }, "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." + "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "uri", + "contentMediaType": "image/*" + } + ] } }, - "nullable": false, - "description": "New content to update" + "required": [ + "title", + "body", + "thumbnail" + ] } - } - ] + }, + "required": [ + "id", + "input" + ], + "additionalProperties": false, + "$defs": {} + }, + "human": null } }, { "name": "erase", - "parameters": [ - { - "type": "string", - "format": "uuid", - "description": "Target article's " - } - ], + "parameters": { + "type": "object", + "properties": { + "id": { + "title": "Target article's {@link IBbsArticle.id}", + "description": "Target article's {@link IBbsArticle.id}.", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "$defs": {} + }, "description": "Erase an article.\n\nErases an article from the DB.", + "strict": true, "separated": { - "llm": [ - { - "index": 0, - "schema": { + "llm": { + "type": "object", + "properties": { + "id": { + "title": "Target article's {@link IBbsArticle.id}", + "description": "Target article's {@link IBbsArticle.id}.", "type": "string", - "format": "uuid", - "description": "Target article's " + "format": "uuid" } - } - ], - "human": [] + }, + "required": [ + "id" + ], + "additionalProperties": false, + "$defs": {} + }, + "human": null } } - ], - "options": {} + ] } ``` @@ -1228,14 +1053,21 @@ It's a good feature to hide some internal functions, so that avoiding the LLM fu ```typescript filename="example/src/llm.application.hideden.ts" showLineNumbers {25, 38} -import { ILlmApplication } from "@samchon/openapi"; +import { + ClaudeTypeChecker, + ILlmApplication, + ILlmSchema, +} from "@samchon/openapi"; import typia, { tags } from "typia"; -const app: ILlmApplication = typia.llm.application(); +const app: ILlmApplication<"chatgpt"> = typia.llm.application< + BbsArticleController, + "chatgpt" +>(); console.log(app); @@ -1245,85 +1077,228 @@ interface BbsArticleController { * * Writes a new article and archives it into the DB. * - * @param input Information of the article to create + * @param props Properties of create function * @returns Newly created article */ - create(input: IBbsArticle.ICreate): Promise; + create(props: { + /** + * Information of the article to create + */ + input: IBbsArticle.ICreate; + }): Promise; /** * Update an article. * * Updates an article with new content. * - * @param id Target article's {@link IBbsArticle.id} + * @param props Properties of update function * @param input New content to update * @hidden */ - update( - id: string & tags.Format<"uuid">, - input: IBbsArticle.IUpdate, - ): Promise; + update(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + + /** + * New content to update. + */ + input: IBbsArticle.IUpdate; + }): Promise; /** * Erase an article. * * Erases an article from the DB. * - * @param id Target article's {@link IBbsArticle.id} + * @param props Properties of erase function * @internal */ - erase(id: string & tags.Format<"uuid">): Promise; + erase(props: { + /** + * Target article's {@link IBbsArticle.id}. + */ + id: string & tags.Format<"uuid">; + }): Promise; } ``` -```json filename="example/schemas/llm.application.hideden.json" showLineNumbers -{ - "functions": [ +```javascript filename="example/bin/llm.application.hideden.js" showLineNumbers +import typia from "typia"; +const app = { + model: "chatgpt", + options: { + reference: false, + separate: null, + }, + functions: [ { - "name": "create", - "parameters": [ - { - "type": "object", - "properties": { - "title": { - "type": "string", - "title": "Title of the article", - "description": "Title of the article.\n\nRepresentative title of the article." + name: "create", + parameters: { + type: "object", + properties: { + input: { + description: + "Information of the article to create.\n\n------------------------------\n\nDescription of the current {@link IBbsArticle.ICreate} type:\n\n> Information of the article to create.\n\n------------------------------\n\nDescription of the parent {@link IBbsArticle} type:\n\n> Article entity.\n> \n> `IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + type: "object", + properties: { + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, }, - "body": { - "type": "string", - "title": "Content body", - "description": "Content body.\n\nContent body of the article writtn in the markdown format." + required: ["title", "body", "thumbnail"], + additionalProperties: false, + }, + }, + required: ["input"], + additionalProperties: false, + $defs: {}, + }, + output: { + description: + "Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).", + type: "object", + properties: { + id: { + title: "Primary Key", + description: "Primary Key.\n\n\n@format uuid", + type: "string", + }, + created_at: { + title: "Creation time of the article", + description: "Creation time of the article.\n\n\n@format date-time", + type: "string", + }, + updated_at: { + title: "Last updated time of the article", + description: + "Last updated time of the article.\n\n\n@format date-time", + type: "string", + }, + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, + }, + required: [ + "id", + "created_at", + "updated_at", + "title", + "body", + "thumbnail", + ], + additionalProperties: false, + }, + description: + "Create a new article.\n\nWrites a new article and archives it into the DB.", + strict: true, + }, + { + name: "update", + parameters: { + type: "object", + properties: { + id: { + title: "Target article's {@link IBbsArticle.id}", + description: + "Target article's {@link IBbsArticle.id}.\n\n\n@format uuid", + type: "string", + }, + input: { + description: + "Make all properties in T optional\n\n------------------------------\n\nDescription of the current {@link PartialIBbsArticle.ICreate} type:\n\n> Make all properties in T optional", + type: "object", + properties: { + title: { + title: "Title of the article", + description: + "Title of the article.\n\nRepresentative title of the article.", + type: "string", + }, + body: { + title: "Content body", + description: + "Content body.\n\nContent body of the article writtn in the markdown format.", + type: "string", + }, + thumbnail: { + title: "Thumbnail image URI", + description: + "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article.", + anyOf: [ + { + type: "null", + }, + { + type: "string", + description: "@format uri\n@contentMediaType image/*", + }, + ], + }, }, - "thumbnail": { - "type": "string", - "format": "uri", - "contentMediaType": "image/*", - "nullable": true, - "title": "Thumbnail image URI", - "description": "Thumbnail image URI.\n\nThumbnail image URI which can represent the article.\n\nIf configured as `null`, it means that no thumbnail image in the article." - } + required: ["title", "body", "thumbnail"], + additionalProperties: false, }, - "nullable": false, - "required": [ - "title", - "body", - "thumbnail" - ], - "description": "Information of the article to create" - } - ], - "output": { - "description": "Newly created article" + }, + required: ["id", "input"], + additionalProperties: false, + $defs: {}, }, - "description": "Create a new article.\n\nWrites a new article and archives it into the DB." - } + description: "Update an article.\n\nUpdates an article with new content.", + strict: true, + }, ], - "options": { - "separate": null - } -} +}; +console.log(app); ``` @@ -1331,121 +1306,292 @@ interface BbsArticleController { -## Restrictions -LLM schema does not support `bigint` type, and recursive type either. +## Specialization +You can utilize [type tags](../validators/tags/#type-tags) (or [validator's comment tags](../validators/tags/#comment-tags)) to constructing special fields of JSON schema. -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. +If you write any comment on a property, it would fill the `IJsonSchema.description` value. Also, there're special comment tags only for JSON schema definition that are different with [validator's comment tags](../validators/tags/#comment-tags) like below. - - -```typescript filename="example/src/llm.application.bigint.ts" showLineNumbers -import typia from "typia"; + - `@deprecated` + - `@hidden` + - `@internal` + - `@title {string}` + - `@default {value}` -typia.llm.application(); +Let's see how those [type tags](../validators/tags/#type-tags), comment tags and description comments are working with example code. -interface Controller { - plus(X: bigint, y: bigint): bigint; -} -``` - + -```bash -src/llm.application.error.ts:3:1 - error TS(typia.llm.application): unsupported type detected - -- Controller.plus: bigint(parameter: "X") - - LLM schema does not support bigint type. +```typescript copy filename="examples/src/llm-schema.ts" showLineNumbers +import { IChatGptSchema } from "@samchon/openapi"; +import typia, { tags } from "typia"; -- Controller.plus: bigint(parameter: "y") - - LLM schema does not support bigint type. +export const schema: IChatGptSchema = typia.llm.schema(); -- Controller.plus: bigint(return type) - - LLM schema does not support bigint type. +interface Special { + /** + * Deprecated tags are just used for marking. + * + * @title Unsigned integer + * @deprecated + */ + type: number & tags.Type<"int32">; -3 typia.llm.application() - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + /** + * Internal tagged property never be shown in JSON schema. + * + * It even doesn't be shown in other `typia` functions like `assert()`. + * + * @internal + */ + internal: number[]; -Found 1 error in src/llm.application.error.ts:3 -``` - - + /** + * Hidden tagged property never be shown in JSON schema. + * + * However, it would be shown in other `typia` functions like `stringify()`. + * + * @hidden + */ + hidden: boolean; -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. + /** + * You can limit the range of number. + * + * @exclusiveMinimum 19 + * @maximum 100 + * @default 30 + */ + number?: number; - - -```typescript filename="example/src/llm.application.bigint.ts" showLineNumbers -import typia from "typia"; + /** + * You can limit the length of string. + * + * Also, multiple range conditions are also possible. + */ + string: string & + ( + | (tags.MinLength<3> & tags.MaxLength<24>) + | (tags.MinLength<40> & tags.MaxLength<100>) + ); -typia.llm.application(); + /** + * You can limit the pattern of string. + * + * @pattern ^[a-z]+$ + */ + pattern: string; -interface Controller { - plus(item: Recursive): Recursive; -} + /** + * You can limit the format of string. + * + * @format date-time + */ + format: string | null; -interface Recursive { - id: number; - children: Recursive[]; + /** + * In the Array case, possible to restrict its elements. + */ + array: Array> & tags.MinItems<3>; } ``` -```bash -src/llm.application.recursive.ts:3:1 - error TS(typia.llm.application): unsupported type detected +```javascript filename="examples/bin/llm-schema.js" showLineNumbers +import typia from "typia"; +export const schema = { + type: "object", + properties: { + type: { + type: "integer", + deprecated: true, + title: "Unsigned integer", + description: "Deprecated tags are just used for marking.", + }, + number: { + type: "number", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + title: "You can limit the range of number", + description: "You can limit the range of number.", + }, + string: { + oneOf: [ + { + type: "string", + minLength: 3, + maxLength: 24, + }, + { + type: "string", + minLength: 40, + maxLength: 100, + }, + ], + title: "You can limit the length of string", + description: + "You can limit the length of string.\n\nAlso, multiple range conditions are also possible.", + }, + pattern: { + type: "string", + pattern: "^[a-z]+$", + title: "You can limit the pattern of string", + description: "You can limit the pattern of string.", + }, + format: { + oneOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "You can limit the format of string", + description: "You can limit the format of string.", + }, + array: { + type: "array", + items: { + type: "string", + format: "uuid", + }, + minItems: 3, + title: "In the Array case, possible to restrict its elements", + description: "In the Array case, possible to restrict its elements.", + }, + }, + required: ["type", "string", "pattern", "format", "array"], + additionalProperties: false, +}; +``` + + -- Controller.plus: Recursive(parameter: "item") - - 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. -- Controller.plus: Recursive(return type) - - LLM schema does not support recursive type. +## Customziation +If what you want is not just filling regular properties of LLM schema specification, but to adding custom properties into the JSON schema definition, you can do it through the `tags.TagBase.schema` property type or `tags.JsonSchemaPlugin` type. -3 typia.llm.application(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For reference, the custom property must be started with `x-` prefix. It's a rule of LLM schema. -Found 1 error in src/llm.application.recursive.ts:3 + + +```typescript copy filename="examples/src/llm-schema-custom.ts" copy showLineNumbers {7-9, 13, 17-18} +import typia, { tags } from "typia"; + +type Monetary = tags.TagBase<{ + target: "number"; + kind: "monetary"; + value: Value; + schema: { + "x-monetary": Value; + }; +}>; + +type Placeholder = tags.JsonSchemaPlugin<{ + "x-placeholder": Value; +}>; + +interface IAccount { + code: string & Placeholder<"Write you account code please">; + balance: number & Monetary<"dollar">; +}; + +typia.llm.schema(); +``` + + +```javascript copy filename="examples/bin/llm-schema-custom.js" showLineNumbers {7, 11} +import typia from "typia"; +({ + type: "object", + properties: { + code: { + type: "string", + "x-placeholder": "Write you account code please", + }, + balance: { + type: "number", + "x-monetary": "dollar", + }, + }, + required: ["code", "balance"], + 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. + + + +## Restrictions +`typia.llm.application()` follows the same restrictions of below. + +About the function parameters type, it follows the restriction of both [`typia.llm.parameters()`](./parameters) and [`typia.llm.schema()`](./schema) functions. Therefore, the parameters must be a keyworded object type with static keys without any dynamic keys. Also, the object type must not be nullable or optional. + +About the return value type, it follows the restriction of [`typia.llm.schema()`](./schema) function. By the way, if the return type is union type with `undefined`, it would be compilation error, due to OpenAPI (JSON schema) specification does not support the undefindable union type. + + - [`typia.llm.parameters()`](./parameters) + - [`typia.llm.schema()`](./schema) -```typescript filename="example/src/llm.application.bigint.ts" showLineNumbers +```typescript filename="src/examples/llm.application.violation.ts" showLineNumbers import { ILlmApplication } from "@samchon/openapi"; -import typia from "typia"; +import typia, { tags } from "typia"; -const app: ILlmApplication = typia.llm.application(); +const app: ILlmApplication<"chatgpt"> = typia.llm.application< + BbsArticleController, + "chatgpt" +>(); console.log(app); -interface Controller { - now(): Date; +interface BbsArticleController { + /** + * Create a new article. + * + * Writes a new article and archives it into the DB. + * + * @param props Properties of create function + * @returns Newly created article + */ + create(props: { + /** + * Information of the article to create + */ + input: IBbsArticle.ICreate; + }): Promise; + + erase(id: string & tags.Format<"uuid">): Promise; } ``` -```json filename="example/schemas/llm.application.bigint.json" showLineNumbers -{ - "functions": [ - { - "name": "now", - "parameters": [], - "output": { - "type": "string", - "format": "date-time" - } - } - ], - "options": { - "separate": null - } -} +```bash filename="Terminal" +src/examples/llm.application.violation.ts:4:41 - error TS(typia.llm.application): unsupported type detected + +- BbsArticleController.create: unknown + - LLM application's function ("create")'s return type must not be union type with undefined. + +- BbsArticleController.erase: unknown + - LLM application's function ("erase")'s parameter must be an object type. + +4 const app: ILlmApplication<"chatgpt"> = typia.llm.application< + ~~~~~~~~~~~~~~~~~~~~~~ +5 BbsArticleController, + ~~~~~~~~~~~~~~~~~~~~~~~ +6 "chatgpt" + ~~~~~~~~~~~ +7 >(); + ~~~ + + +Found 1 error in src/examples/llm.application.violation.ts:4 ``` \ No newline at end of file diff --git a/website/pages/docs/llm/parameters.mdx b/website/pages/docs/llm/parameters.mdx new file mode 100644 index 0000000000..ed547c4dc0 --- /dev/null +++ b/website/pages/docs/llm/parameters.mdx @@ -0,0 +1,444 @@ +import { Callout, Tabs, Tab } from 'nextra-theme-docs' + +## `parameters()` function +typia, + ILlmApplication, + ILlmFunction, + ILlmSchema, + ]}> + +```typescript filename="typia" showLineNumbers {11-16} +export namespace llm { + // LLM FUNCTION CALLING APPLICATION SCHEMA + export function application< + App extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >( + options?: Partial, "separate">>, + ): ILlmApplication; + + // STRUCTURED OUTPUT + export function parameters< + Parameters extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >(): ILlmSchema.ModelParameters[Model]; + + // TYPE SCHEMA + export function schema< + T, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >( + ...$defs: Extract< + ILlmSchema.ModelSchema[Model], + { $ref: string } + > extends never + ? [] + : [Record] + ): ILlmSchema.ModelSchema[Model]; +} +``` + + +```typescript filename="@samchon/openapi" showLineNumbers +import { IGeminiSchema } from "./IGeminiSchema"; +import { ILlmFunction } from "./ILlmFunction"; +import { ILlmSchema } from "./ILlmSchema"; + +/** + * Application of LLM function calling. + * + * `ILlmApplication` is a data structure representing a collection of + * {@link ILlmFunction LLM function calling schemas}, composed from a native + * TypeScript class (or interface) type by the `typia.llm.application()` + * function. + * + * Also, there can be some parameters (or their nested properties) which must be + * composed by Human, not by LLM. File uploading feature or some sensitive information + * like secrety key (password) are the examples. In that case, you can separate the + * function parameters to both LLM and human sides by configuring the + * {@link ILlmApplication.IOptions.separate} property. The separated parameters are + * assigned to the {@link ILlmFunction.separated} property. + * + * For reference, when both LLM and Human filled parameter values to call, you can + * merge them by calling the {@link HttpLlm.mergeParameters} function. In other words, + * if you've configured the {@link ILlmApplication.IOptions.separate} property, you + * have to merge the separated parameters before the funtion call execution. + * + * @reference https://platform.openai.com/docs/guides/function-calling + * @author Jeongho Nam - https://github.com/samchon + */ +export interface ILlmApplication { + /** + * Model of the LLM. + */ + model: Model; + + /** + * List of function metadata. + * + * List of function metadata that can be used for the LLM function call. + */ + functions: ILlmFunction[]; + + /** + * Configuration for the application. + */ + options: ILlmApplication.IOptions; +} +export namespace ILlmApplication { + /** + * Options for application composition. + */ + export type IOptions = { + /** + * Separator function for the parameters. + * + * When composing parameter arguments through LLM function call, + * there can be a case that some parameters must be composed by human, + * or LLM cannot understand the parameter. + * + * For example, if the parameter type has configured + * {@link IGeminiSchema.IString.contentMediaType} which indicates file + * uploading, it must be composed by human, not by LLM + * (Large Language Model). + * + * In that case, if you configure this property with a function that + * predicating whether the schema value must be composed by human or + * not, the parameters would be separated into two parts. + * + * - {@link ILlmFunction.separated.llm} + * - {@link ILlmFunction.separated.human} + * + * When writing the function, note that returning value `true` means + * to be a human composing the value, and `false` means to LLM + * composing the value. Also, when predicating the schema, it would + * better to utilize the {@link GeminiTypeChecker} like features. + * + * @param schema Schema to be separated. + * @returns Whether the schema value must be composed by human or not. + * @default null + */ + separate: null | ((schema: ILlmSchema.ModelSchema[Model]) => boolean); + } & ILlmSchema.ModelConfig[Model]; +} +``` + + +```typescript filename="@samchon/openapi" showLineNumbers +import { ILlmSchema } from "./ILlmSchema"; + +/** + * LLM function metadata. + * + * `ILlmFunction` is an interface representing a function metadata, + * which has been used for the LLM (Language Large Model) function + * calling. Also, it's a function structure containing the function + * {@link name}, {@link parameters} and {@link output return type}. + * + * If you provide this `ILlmFunction` data to the LLM provider like "OpenAI", + * the "OpenAI" will compose a function arguments by analyzing conversations + * with the user. With the LLM composed arguments, you can execute the function + * and get the result. + * + * By the way, do not ensure that LLM will always provide the correct + * arguments. The LLM of present age is not perfect, so that you would + * better to validate the arguments before executing the function. + * I recommend you to validate the arguments before execution by using + * [`typia`](https://github.com/samchon/typia) library. + * + * @reference https://platform.openai.com/docs/guides/function-calling + * @author Jeongho Nam - https://github.com/samchon + */ +export interface ILlmFunction { + /** + * Representative name of the function. + */ + name: string; + + /** + * List of parameter types. + */ + parameters: ILlmSchema.ModelParameters[Model]; + + /** + * Collection of separated parameters. + */ + separated?: ILlmFunction.ISeparated; + + /** + * Expected return type. + * + * If the function returns nothing (`void`), the `output` value would + * be `undefined`. + */ + output?: ILlmSchema.ModelSchema[Model]; + + /** + * Whether the function schema types are strict or not. + * + * Newly added specification to "OpenAI" at 2024-08-07. + * + * @reference https://openai.com/index/introducing-structured-outputs-in-the-api/ + */ + strict: true; + + /** + * Description of the function. + * + * For reference, the `description` is very important property to teach + * the purpose of the function to the LLM (Language Large Model), and + * LLM actually determines which function to call by the description. + * + * Also, when the LLM conversates with the user, the `description` is + * used to explain the function to the user. Therefore, the `description` + * property has the highest priroity, and you have to consider it. + */ + description?: string | undefined; + + /** + * Whether the function is deprecated or not. + * + * If the `deprecated` is `true`, the function is not recommended to use. + * + * LLM (Large Language Model) may not use the deprecated function. + */ + deprecated?: boolean | undefined; + + /** + * Category tags for the function. + * + * You can fill this property by the `@tag ${name}` comment tag. + */ + tags?: string[]; +} +export namespace ILlmFunction { + /** + * Collection of separated parameters. + */ + export interface ISeparated { + /** + * Parameters that would be composed by the LLM. + */ + llm: ILlmSchema.ModelParameters[Model] | null; + + /** + * Parameters that would be composed by the human. + */ + human: ILlmSchema.ModelParameters[Model] | null; + } +} +``` + + +```typescript filename="@samchon/openapi" showLineNumbers +import { ILlmSchema } from "./ILlmSchema"; + +/** + * LLM function metadata. + * + * `ILlmFunction` is an interface representing a function metadata, + * which has been used for the LLM (Language Large Model) function + * calling. Also, it's a function structure containing the function + * {@link name}, {@link parameters} and {@link output return type}. + * + * If you provide this `ILlmFunction` data to the LLM provider like "OpenAI", + * the "OpenAI" will compose a function arguments by analyzing conversations + * with the user. With the LLM composed arguments, you can execute the function + * and get the result. + * + * By the way, do not ensure that LLM will always provide the correct + * arguments. The LLM of present age is not perfect, so that you would + * better to validate the arguments before executing the function. + * I recommend you to validate the arguments before execution by using + * [`typia`](https://github.com/samchon/typia) library. + * + * @reference https://platform.openai.com/docs/guides/function-calling + * @author Jeongho Nam - https://github.com/samchon + */ +export interface ILlmFunction { + /** + * Representative name of the function. + */ + name: string; + + /** + * List of parameter types. + */ + parameters: ILlmSchema.ModelParameters[Model]; + + /** + * Collection of separated parameters. + */ + separated?: ILlmFunction.ISeparated; + + /** + * Expected return type. + * + * If the function returns nothing (`void`), the `output` value would + * be `undefined`. + */ + output?: ILlmSchema.ModelSchema[Model]; + + /** + * Whether the function schema types are strict or not. + * + * Newly added specification to "OpenAI" at 2024-08-07. + * + * @reference https://openai.com/index/introducing-structured-outputs-in-the-api/ + */ + strict: true; + + /** + * Description of the function. + * + * For reference, the `description` is very important property to teach + * the purpose of the function to the LLM (Language Large Model), and + * LLM actually determines which function to call by the description. + * + * Also, when the LLM conversates with the user, the `description` is + * used to explain the function to the user. Therefore, the `description` + * property has the highest priroity, and you have to consider it. + */ + description?: string | undefined; + + /** + * Whether the function is deprecated or not. + * + * If the `deprecated` is `true`, the function is not recommended to use. + * + * LLM (Large Language Model) may not use the deprecated function. + */ + deprecated?: boolean | undefined; + + /** + * Category tags for the function. + * + * You can fill this property by the `@tag ${name}` comment tag. + */ + tags?: string[]; +} +export namespace ILlmFunction { + /** + * Collection of separated parameters. + */ + export interface ISeparated { + /** + * Parameters that would be composed by the LLM. + */ + llm: Parameters | null; + + /** + * Parameters that would be composed by the human. + */ + human: Parameters | null; + } +} +``` + + + +Structured output schema of LLM (Large Language Model). + +`typia.llm.parameters()` is a function generating structured output of LLM (Large Language Model) from a TypeScript object type. It is used to LLM function calling or structured output feature provided by OpenAI like LLM providers. + +Return value type `ILlmSchema.IParameters` is a similar with the JSON schema definition's object type. However, its detailed specification becomes different by LLM provider model you've chosen. Here is the list of LLM schema definitions of each model. Determine one of them carefully reading the LLM schema definitions. + + - Supported schemas + - [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts): OpenAI ChatGPT + - [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts): Anthropic Claude + - [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts): Google Gemini + - [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts): Meta Llama + - Midldle layer schemas + - [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts): middle layer based on OpenAPI v3.0 specification + - [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts): middle layer based on OpenAPI v3.1 specification + + +**LLM Function Calling** and **Structured Output** + +LLM selects proper function and fill arguments. + +In nowadays, most LLM (Large Language Model) like OpenAI are supporting "function calling" feature. The "LLM function calling" means that LLM automatically selects a proper function and fills parameter values from conversation with the user (may by chatting text). + +Structured output is another feature of LLM. The "structured output" means that LLM automatically transforms the output conversation into a structured data format like JSON. + +- https://platform.openai.com/docs/guides/function-calling +- https://platform.openai.com/docs/guides/structured-outputs + + + + + +## Specialization + + + + +## Customziation + + + + +## Restrictions +`typia.llm.parameters()` follows the same restrictions [`typia.llm.schema()`](./schema) function. Also, it has only one additional restriction; the keyworded argument. + +In the LLM function calling and structured output, the parameters must be a keyworded object type with static keys without any dynamic keys. Also, the object type must not be nullable or optional. + +If you don't follow the LLM's keyworded arguments rule, `typia.llm.parameters()` will throw compilation error like below. + + + +```typescript filename="src/examples/llm.parameters.violation.ts" showLineNumbers +import typia from "typia"; + +typia.llm.parameters(); +typia.llm.parameters, "chatgpt">(); +typia.llm.parameters>(); +``` + + +```bash filename="Terminal" +src/examples/llm.parameters.violation.ts:3:1 - error TS(typia.llm.parameters): unsupported type detected + +- string + - LLM parameters must be an objec type. + +3 typia.llm.parameters(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +src/examples/llm.parameters.violation.ts:3:22 - error TS2344: Type 'string' does not satisfy the constraint 'Record'. + +3 typia.llm.parameters(); + ~~~~~~ + +src/examples/llm.parameters.violation.ts:4:1 - error TS(typia.llm.parameters): unsupported type detected + +- Recordstringboolean + - LLM parameters must be an objec type. + +- Recordstringboolean + - LLM parameters must not have dynamic keys. + - LLM schema of "gemini" does not support dynamic property in object. + +- Recordstringboolean: Recordstringboolean + - LLM schema of "gemini" does not support dynamic property in object. + +4 typia.llm.parameters, "gemini">(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +src/examples/llm.parameters.violation.ts:5:1 - error TS(typia.llm.parameters): unsupported type detected + +- Arraynumber + - LLM parameters must be an objec type. + +5 typia.llm.parameters, "claude">(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 4 errors in the same file, starting at: src/examples/llm.parameters.violation.ts +``` + + \ No newline at end of file diff --git a/website/pages/docs/llm/schema.mdx b/website/pages/docs/llm/schema.mdx index b6fb15c4cc..29ae112d0a 100644 --- a/website/pages/docs/llm/schema.mdx +++ b/website/pages/docs/llm/schema.mdx @@ -3,434 +3,338 @@ import { Callout, Tabs, Tab } from 'nextra-theme-docs' ## `schema()` function typia, + ILlmApplication, + ILlmFunction, ILlmSchema, ]}> -```typescript filename="typia" showLineNumbers {2} +```typescript filename="typia" showLineNumbers {18-30} export namespace llm { - // Individual type schema - export function schema(): ILlmSchema; - - // LLM function calling application schema - export function application( - options?: ILlmApplication.IOptions - ): ILlmApplication; + // LLM FUNCTION CALLING APPLICATION SCHEMA + export function application< + App extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >( + options?: Partial, "separate">>, + ): ILlmApplication; + + // STRUCTURED OUTPUT + export function parameters< + Parameters extends Record, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >(): ILlmSchema.ModelParameters[Model]; + + // TYPE SCHEMA + export function schema< + T, + Model extends ILlmSchema.Model, + Config extends Partial = {}, + >( + ...$defs: Extract< + ILlmSchema.ModelSchema[Model], + { $ref: string } + > extends never + ? [] + : [Record] + ): ILlmSchema.ModelSchema[Model]; } ``` -```typescript filename="@samchon/openapi" +```typescript filename="@samchon/openapi" showLineNumbers +import { IGeminiSchema } from "./IGeminiSchema"; +import { ILlmFunction } from "./ILlmFunction"; +import { ILlmSchema } from "./ILlmSchema"; + /** - * Type schema info of LLM function call. + * Application of LLM function calling. * - * `ILlmSchema` is a type metadata of LLM (Large Language Model) - * function calling. + * `ILlmApplication` is a data structure representing a collection of + * {@link ILlmFunction LLM function calling schemas}, composed from a native + * TypeScript class (or interface) type by the `typia.llm.application()` + * function. * - * `ILlmSchema` basically follows the JSON schema definition of OpenAPI - * v3.0 specification; {@link OpenApiV3.IJsonSchema}. However, `ILlmSchema` - * does not have the reference type; {@link OpenApiV3.IJsonSchema.IReference}. - * It's because the LLM cannot compose the reference typed arguments. + * Also, there can be some parameters (or their nested properties) which must be + * composed by Human, not by LLM. File uploading feature or some sensitive information + * like secrety key (password) are the examples. In that case, you can separate the + * function parameters to both LLM and human sides by configuring the + * {@link ILlmApplication.IOptions.separate} property. The separated parameters are + * assigned to the {@link ILlmFunction.separated} property. * - * For reference, the OpenAPI v3.0 based JSON schema definition can't - * express the tuple array type. It has been supported since OpenAPI v3.1; - * {@link OpenApi.IJsonSchema.ITuple}. Therefore, it would better to avoid - * using the tuple array type in the LLM function calling. + * For reference, when both LLM and Human filled parameter values to call, you can + * merge them by calling the {@link HttpLlm.mergeParameters} function. In other words, + * if you've configured the {@link ILlmApplication.IOptions.separate} property, you + * have to merge the separated parameters before the funtion call execution. * * @reference https://platform.openai.com/docs/guides/function-calling * @author Jeongho Nam - https://github.com/samchon */ -export type ILlmSchema = - | ILlmSchema.IBoolean - | ILlmSchema.IInteger - | ILlmSchema.INumber - | ILlmSchema.IString - | ILlmSchema.IArray - | ILlmSchema.IObject - | ILlmSchema.IUnknown - | ILlmSchema.INullOnly - | ILlmSchema.IOneOf; -export namespace ILlmSchema { +export interface ILlmApplication { /** - * Boolean type schema info. + * Model of the LLM. */ - export interface IBoolean extends __ISignificant<"boolean"> { - /** - * Default value. - */ - default?: boolean | null; - - /** - * Enumeration values. - */ - enum?: Array; - } + model: Model; /** - * Integer type schema info. + * List of function metadata. + * + * List of function metadata that can be used for the LLM function call. */ - export interface IInteger extends __ISignificant<"integer"> { - /** - * Default value. - * - * @type int64 - */ - default?: number | null; + functions: ILlmFunction[]; + /** + * Configuration for the application. + */ + options: ILlmApplication.IOptions; +} +export namespace ILlmApplication { + /** + * Options for application composition. + */ + export type IOptions = { /** - * Enumeration values. + * Separator function for the parameters. * - * @type int64 - */ - enum?: Array; - - /** - * Minimum value restriction. + * When composing parameter arguments through LLM function call, + * there can be a case that some parameters must be composed by human, + * or LLM cannot understand the parameter. * - * @type int64 - */ - minimum?: number; - - /** - * Maximum value restriction. + * For example, if the parameter type has configured + * {@link IGeminiSchema.IString.contentMediaType} which indicates file + * uploading, it must be composed by human, not by LLM + * (Large Language Model). * - * @type int64 - */ - maximum?: number; - - /** - * Exclusive minimum value restriction. + * In that case, if you configure this property with a function that + * predicating whether the schema value must be composed by human or + * not, the parameters would be separated into two parts. * - * For reference, even though your Swagger document has defined the - * `exclusiveMinimum` value as `number`, it has been forcibly converted - * to `boolean` type, and assigns the numeric value to the - * {@link minimum} property in the {@link OpenApi} conversion. - */ - exclusiveMinimum?: boolean; - - /** - * Exclusive maximum value restriction. + * - {@link ILlmFunction.separated.llm} + * - {@link ILlmFunction.separated.human} * - * For reference, even though your Swagger document has defined the - * `exclusiveMaximum` value as `number`, it has been forcibly converted - * to `boolean` type, and assigns the numeric value to the - * {@link maximum} property in the {@link OpenApi} conversion. - */ - exclusiveMaximum?: boolean; - - /** - * Multiple of value restriction. + * When writing the function, note that returning value `true` means + * to be a human composing the value, and `false` means to LLM + * composing the value. Also, when predicating the schema, it would + * better to utilize the {@link GeminiTypeChecker} like features. * - * @type uint64 - * @exclusiveMinimum 0 + * @param schema Schema to be separated. + * @returns Whether the schema value must be composed by human or not. + * @default null */ - multipleOf?: number; - } + separate: null | ((schema: ILlmSchema.ModelSchema[Model]) => boolean); + } & ILlmSchema.ModelConfig[Model]; +} +``` + + +```typescript filename="@samchon/openapi" showLineNumbers +import { ILlmSchema } from "./ILlmSchema"; +/** + * LLM function metadata. + * + * `ILlmFunction` is an interface representing a function metadata, + * which has been used for the LLM (Language Large Model) function + * calling. Also, it's a function structure containing the function + * {@link name}, {@link parameters} and {@link output return type}. + * + * If you provide this `ILlmFunction` data to the LLM provider like "OpenAI", + * the "OpenAI" will compose a function arguments by analyzing conversations + * with the user. With the LLM composed arguments, you can execute the function + * and get the result. + * + * By the way, do not ensure that LLM will always provide the correct + * arguments. The LLM of present age is not perfect, so that you would + * better to validate the arguments before executing the function. + * I recommend you to validate the arguments before execution by using + * [`typia`](https://github.com/samchon/typia) library. + * + * @reference https://platform.openai.com/docs/guides/function-calling + * @author Jeongho Nam - https://github.com/samchon + */ +export interface ILlmFunction { /** - * Number type schema info. + * Representative name of the function. */ - export interface INumber extends __ISignificant<"number"> { - /** - * Default value. - */ - default?: number | null; - - /** - * Enumeration values. - */ - enum?: Array; - - /** - * Minimum value restriction. - */ - minimum?: number; - - /** - * Maximum value restriction. - */ - maximum?: number; - - /** - * Exclusive minimum value restriction. - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined the `exclusiveMinimum` value as `number`, {@link OpenAiComposer} - * forcibly converts it to `boolean` type, and assign the numeric value to - * the {@link minimum} property. - */ - exclusiveMinimum?: boolean; - - /** - * Exclusive maximum value restriction. - * - * For reference, even though your Swagger (or OpenAPI) document has - * defined the `exclusiveMaximum` value as `number`, {@link OpenAiComposer} - * forcibly converts it to `boolean` type, and assign the numeric value to - * the {@link maximum} property. - */ - exclusiveMaximum?: boolean; - - /** - * Multiple of value restriction. - * - * @exclusiveMinimum 0 - */ - multipleOf?: number; - } + name: string; /** - * String type schema info. + * List of parameter types. */ - export interface IString extends __ISignificant<"string"> { - /** - * Default value. - */ - default?: string | null; - - /** - * Enumeration values. - */ - enum?: Array; - - /** - * Format restriction. - */ - format?: - | "binary" - | "byte" - | "password" - | "regex" - | "uuid" - | "email" - | "hostname" - | "idn-email" - | "idn-hostname" - | "iri" - | "iri-reference" - | "ipv4" - | "ipv6" - | "uri" - | "uri-reference" - | "uri-template" - | "url" - | "date-time" - | "date" - | "time" - | "duration" - | "json-pointer" - | "relative-json-pointer" - | (string & {}); - - /** - * Pattern restriction. - */ - pattern?: string; + parameters: ILlmSchema.ModelParameters[Model]; - /** - * Minimum length restriction. - * - * @type uint64 - */ - minLength?: number; + /** + * Collection of separated parameters. + */ + separated?: ILlmFunction.ISeparated; - /** - * Maximum length restriction. - * - * @type uint64 - */ - maxLength?: number; + /** + * Expected return type. + * + * If the function returns nothing (`void`), the `output` value would + * be `undefined`. + */ + output?: ILlmSchema.ModelSchema[Model]; - /** - * Content media type restriction. - */ - contentMediaType?: string; - } + /** + * Whether the function schema types are strict or not. + * + * Newly added specification to "OpenAI" at 2024-08-07. + * + * @reference https://openai.com/index/introducing-structured-outputs-in-the-api/ + */ + strict: true; /** - * Array type schema info. + * Description of the function. + * + * For reference, the `description` is very important property to teach + * the purpose of the function to the LLM (Language Large Model), and + * LLM actually determines which function to call by the description. + * + * Also, when the LLM conversates with the user, the `description` is + * used to explain the function to the user. Therefore, the `description` + * property has the highest priroity, and you have to consider it. */ - export interface IArray - extends __ISignificant<"array"> { - /** - * Items type schema info. - * - * The `items` means the type of the array elements. In other words, it is - * the type schema info of the `T` in the TypeScript array type `Array`. - */ - items: Schema; + description?: string | undefined; - /** - * Unique items restriction. - * - * If this property value is `true`, target array must have unique items. - */ - uniqueItems?: boolean; + /** + * Whether the function is deprecated or not. + * + * If the `deprecated` is `true`, the function is not recommended to use. + * + * LLM (Large Language Model) may not use the deprecated function. + */ + deprecated?: boolean | undefined; + /** + * Category tags for the function. + * + * You can fill this property by the `@tag ${name}` comment tag. + */ + tags?: string[]; +} +export namespace ILlmFunction { + /** + * Collection of separated parameters. + */ + export interface ISeparated { /** - * Minimum items restriction. - * - * Restriction of minumum number of items in the array. - * - * @type uint64 + * Parameters that would be composed by the LLM. */ - minItems?: number; + llm: ILlmSchema.ModelParameters[Model] | null; /** - * Maximum items restriction. - * - * Restriction of maximum number of items in the array. - * - * @type uint64 + * Parameters that would be composed by the human. */ - maxItems?: number; + human: ILlmSchema.ModelParameters[Model] | null; } +} +``` + + +```typescript filename="@samchon/openapi" showLineNumbers +import { ILlmSchema } from "./ILlmSchema"; +/** + * LLM function metadata. + * + * `ILlmFunction` is an interface representing a function metadata, + * which has been used for the LLM (Language Large Model) function + * calling. Also, it's a function structure containing the function + * {@link name}, {@link parameters} and {@link output return type}. + * + * If you provide this `ILlmFunction` data to the LLM provider like "OpenAI", + * the "OpenAI" will compose a function arguments by analyzing conversations + * with the user. With the LLM composed arguments, you can execute the function + * and get the result. + * + * By the way, do not ensure that LLM will always provide the correct + * arguments. The LLM of present age is not perfect, so that you would + * better to validate the arguments before executing the function. + * I recommend you to validate the arguments before execution by using + * [`typia`](https://github.com/samchon/typia) library. + * + * @reference https://platform.openai.com/docs/guides/function-calling + * @author Jeongho Nam - https://github.com/samchon + */ +export interface ILlmFunction { /** - * Object type schema info. + * Representative name of the function. */ - export interface IObject - extends __ISignificant<"object"> { - /** - * Properties of the object. - * - * The `properties` means a list of key-value pairs of the object's - * regular properties. The key is the name of the regular property, - * and the value is the type schema info. - * - * If you need additional properties that is represented by dynamic key, - * you can use the {@link additionalProperties} instead. - */ - properties?: Record; + name: string; - /** - * List of key values of the required properties. - * - * The `required` means a list of the key values of the required - * {@link properties}. If some property key is not listed in the `required` - * list, it means that property is optional. Otherwise some property key - * exists in the `required` list, it means that the property must be filled. - * - * Below is an example of the {@link properties} and `required`. - * - * ```typescript - * interface SomeObject { - * id: string; - * email: string; - * name?: string; - * } - * ``` - * - * As you can see, `id` and `email` {@link properties} are {@link required}, - * so that they are listed in the `required` list. - * - * ```json - * { - * "type": "object", - * "properties": { - * "id": { "type": "string" }, - * "email": { "type": "string" }, - * "name": { "type": "string" } - * }, - * "required": ["id", "email"] - * } - * ``` - */ - required?: string[]; + /** + * List of parameter types. + */ + parameters: ILlmSchema.ModelParameters[Model]; - /** - * Additional properties' info. - * - * The `additionalProperties` means the type schema info of the additional - * properties that are not listed in the {@link properties}. - * - * If the value is `true`, it means that the additional properties are not - * restricted. They can be any type. Otherwise, if the value is - * {@link ILlmSchema} type, it means that the additional properties must - * follow the type schema info. - * - * - `true`: `Record` - * - `ILlmSchema`: `Record` - */ - additionalProperties?: boolean | Schema; - } + /** + * Collection of separated parameters. + */ + separated?: ILlmFunction.ISeparated; /** - * Unknown type schema info. + * Expected return type. * - * It means the type of the value is `any`. + * If the function returns nothing (`void`), the `output` value would + * be `undefined`. */ - export interface IUnknown extends __IAttribute { - /** - * Type is never be defined. - */ - type?: undefined; - } + output?: ILlmSchema.ModelSchema[Model]; /** - * Null only type schema info. + * Whether the function schema types are strict or not. + * + * Newly added specification to "OpenAI" at 2024-08-07. + * + * @reference https://openai.com/index/introducing-structured-outputs-in-the-api/ */ - export interface INullOnly extends __IAttribute { - /** - * Type is always `null`. - */ - type: "null"; - - /** - * Default value. - */ - default?: null; - } + strict: true; /** - * One of type schema info. + * Description of the function. * - * `IOneOf` represents an union type of the TypeScript (`A | B | C`). + * For reference, the `description` is very important property to teach + * the purpose of the function to the LLM (Language Large Model), and + * LLM actually determines which function to call by the description. * - * For reference, even though your Swagger (or OpenAPI) document has - * defined `anyOf` instead of the `oneOf`, it has been forcibly converted - * to `oneOf` type by {@link OpenApi.convert OpenAPI conversion}. + * Also, when the LLM conversates with the user, the `description` is + * used to explain the function to the user. Therefore, the `description` + * property has the highest priroity, and you have to consider it. */ - export interface IOneOf - extends __IAttribute { - /** - * List of the union types. - */ - oneOf: Exclude>[]; - } + description?: string | undefined; /** - * Significant attributes that can be applied to the most types. + * Whether the function is deprecated or not. + * + * If the `deprecated` is `true`, the function is not recommended to use. + * + * LLM (Large Language Model) may not use the deprecated function. */ - export interface __ISignificant extends __IAttribute { - /** - * Discriminator value of the type. - */ - type: Type; - - /** - * Whether to allow `null` value or not. - */ - nullable?: boolean; - } + deprecated?: boolean | undefined; /** - * Common attributes that can be applied to all types. + * Category tags for the function. + * + * You can fill this property by the `@tag ${name}` comment tag. */ - export interface __IAttribute { - /** - * Title of the schema. - */ - title?: string; - + tags?: string[]; +} +export namespace ILlmFunction { + /** + * Collection of separated parameters. + */ + export interface ISeparated { /** - * Detailed description of the schema. + * Parameters that would be composed by the LLM. */ - description?: string; + llm: Parameters | null; /** - * Whether the type is deprecated or not. + * Parameters that would be composed by the human. */ - deprecated?: boolean; + human: Parameters | null; } } ``` @@ -439,18 +343,30 @@ export namespace ILlmSchema { Type schema in the LLM function calling application. -`typia.llm.schema()` is a function generating type schema which is used in the LLM (Large Language Model) function calling application schema, especially in the [`typia.llm.application()`](./application) function. +`typia.llm.schema()` is a function generating type schema which is used in the LLM (Large Language Model) function calling application schema or structured output, especially composed by the [`typia.llm.parameters()`](./parameters) and [`typia.llm.application()`](./application) functions. + +Return value type `ILlmSchema` is similar with the JSON schema definition. However, its detailed specification becomes different by the LLM provider model you've chosen. Here is the list of LLM schema definitions of each model. Determine one of them carefully reading the LLM schema definitions. -Return value type `ILlmSchema` is similar with the JSON schema definition of OpenAPI v3.0 specification, but it does not have the reference type of `OpenApi.IJsonSchema.IReference` type which has the `$ref` property. + - Supported schemas + - [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts): OpenAI ChatGPT + - [`IClaudeSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IClaudeSchema.ts): Anthropic Claude + - [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts): Google Gemini + - [`ILlamaSchema`](https://github.com/samchon/openapi/blob/master/src/structures/ILlamaSchema.ts): Meta Llama + - Midldle layer schemas + - [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts): middle layer based on OpenAPI v3.0 specification + - [`ILlmSchemaV3_1`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3_1.ts): middle layer based on OpenAPI v3.1 specification -**LLM Function Calling** +**LLM Function Calling** and **Structured Output** LLM selects proper function and fill arguments. In nowadays, most LLM (Large Language Model) like OpenAI are supporting "function calling" feature. The "LLM function calling" means that LLM automatically selects a proper function and fills parameter values from conversation with the user (may by chatting text). -https://platform.openai.com/docs/guides/function-calling +Structured output is another feature of LLM. The "structured output" means that LLM automatically transforms the output conversation into a structured data format like JSON. + +- https://platform.openai.com/docs/guides/function-calling +- https://platform.openai.com/docs/guides/structured-outputs @@ -469,14 +385,13 @@ If you write any comment on a property, it would fill the `IJsonSchema.descripti Let's see how those [type tags](../validators/tags/#type-tags), comment tags and description comments are working with example code. - ```typescript copy filename="examples/src/llm-schema.ts" showLineNumbers -import { ILlmSchema } from "@samchon/openapi"; +import { IChatGptSchema } from "@samchon/openapi"; import typia, { tags } from "typia"; -export const schema: ILlmSchema = typia.llm.schema(); +export const schema: IChatGptSchema = typia.llm.schema(); interface Special { /** @@ -590,9 +505,15 @@ export const schema = { description: "You can limit the pattern of string.", }, format: { - type: "string", - format: "date-time", - nullable: true, + oneOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], title: "You can limit the format of string", description: "You can limit the format of string.", }, @@ -607,8 +528,8 @@ export const schema = { description: "In the Array case, possible to restrict its elements.", }, }, - nullable: false, required: ["type", "string", "pattern", "format", "array"], + additionalProperties: false, }; ``` @@ -645,7 +566,7 @@ interface IAccount { balance: number & Monetary<"dollar">; }; -typia.llm.schema(); +typia.llm.schema(); ``` @@ -663,8 +584,8 @@ import typia from "typia"; "x-monetary": "dollar", }, }, - nullable: false, required: ["code", "balance"], + additionalProperties: false, }); ``` @@ -678,40 +599,47 @@ 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. +Also, LLM schema does not support the tuple type, which is represented by the `OpenApi.IJsonSchema.ITuple` type. It's no LLM providers are supporting the tuple type, and such tuple type harms the separation option of the [`typia.llm.application()`](./application) function. If you need a tuple type, just change the tuple type to a regular object type instead. + -```typescript filename="example/src/llm.schema.recursive.ts" showLineNumbers +```typescript filename="src/examples/llm.schema.bigint-and-tuple.ts" showLineNumbers import typia from "typia"; -typia.llm.schema(); +typia.llm.schema({}); +typia.llm.schema<[number, string], "claude">({}); ``` ```bash -src/llm.schema.bigint.ts:3:1 - error TS(typia.llm.schema): unsupported type detected +src/examples/llm.schema.bigint-and-tuple.ts:3:1 - error TS(typia.llm.schema): unsupported type detected - bigint - LLM schema does not support bigint type. -3 typia.llm.schema(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ +3 typia.llm.schema({}); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Found 1 error in src/llm.schema.bigint.ts:3 +src/examples/llm.schema.bigint-and-tuple.ts:4:1 - error TS(typia.llm.schema): failed to convert JSON schema to LLM schema. + + - $input.schema: LLM does not allow tuple type. + +4 typia.llm.schema<[number, string], "claude">({}); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` -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. +If you're using Google Gemini ([`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts)) or middle layer schema of [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts), they do not support the 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 those [`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts) and [`ILlmSchemaV3`](https://github.com/samchon/openapi/blob/master/src/structures/ILlmSchemaV3.ts). They 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 +```typescript filename="src/examples/llm.schema.recursive.ts" showLineNumbers import typia, { tags } from "typia"; -typia.llm.schema(); +typia.llm.schema(); interface IDepartment { id: string & tags.Format<"uuid">; @@ -804,24 +732,45 @@ const typia_1 = __importDefault(require("typia")); -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. +And OpenAI ChatGPT ([`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)) and Google Gemini ([`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts)) do not support the `OpenApi.IJsonSchema.IObject.additionalProperties` type, which represent the dynamic key typed object like `Record` type in the TypeScript. Therefore, if you put the dynamic `Record` type like below, `typia.llm.schema()` and `typia.llm.schema` functions throw the compilation error like below. - +Therefore, if you want to utilzie OpenAI hatGPT ([`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)) or Google Gemini ([`IGeminiSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IGeminiSchema.ts)), you have to change the `Record` type to an array of regular object type like below. Note that, as LLM providers do not support the `tuple` type, you don't have to define the array type containing the tuple type. + + - recommended: `Array<{ key: string, value: T }>` + - not recommended: `Array<[string, T]>` + + -```typescript filename="example/src/llm.llm.date.ts" showLineNumbers +```typescript filename="src/examples/llm.schema.additionalProperties.ts" showLineNumbers import typia from "typia"; -typia.llm.schema(); +typia.llm.schema, "chatgpt">({}); +typia.llm.schema, "gemini">(); ``` -```javascript filename="example/schemas/llm.date.js" showLineNumbers -import typia from "typia"; -const schema = { - type: "string", - format: "date-time", -}; -console.log(schema); +```bash +src/examples/llm.schema.additionalProperties.ts:3:1 - error TS(typia.llm.schema): unsupported type detected + +- Recordstringnumber + - LLM schema of "chatgpt" does not support dynamic property in object. + +- Recordstringnumber: Recordstringnumber + - LLM schema of "chatgpt" does not support dynamic property in object. + +3 typia.llm.schema, "chatgpt">({}); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +src/examples/llm.schema.additionalProperties.ts:4:1 - error TS(typia.llm.schema): unsupported type detected + +- Recordstringnumber + - LLM schema of "gemini" does not support dynamic property in object. + +- Recordstringnumber: Recordstringnumber + - LLM schema of "gemini" does not support dynamic property in object. + +4 typia.llm.schema, "gemini">(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` \ No newline at end of file diff --git a/website/pages/docs/misc.mdx b/website/pages/docs/misc.mdx index 640855ce2d..20af5ca058 100644 --- a/website/pages/docs/misc.mdx +++ b/website/pages/docs/misc.mdx @@ -239,79 +239,65 @@ interface IClerk { ```javascript filename="examples/bin/assertClone.js" showLineNumbers {67-325} +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber.js"; +import * as __typia_transform__randomFormatDate from "typia/lib/internal/_randomFormatDate.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; -const department = ((generator) => { - const $generator = typia.random.generator; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"uuid">', - kind: "format", - value: "uuid", - }, - ]) ?? (generator?.uuid ?? $generator.uuid)(), - name: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: "MinLength<3>", - kind: "minLength", - value: 3, - }, - ]) ?? - (generator?.string ?? $generator.string)( - (generator?.integer ?? $generator.integer)(3, 25), - ), - limit: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"int32">', - kind: "type", - value: "int32", - }, - ]) ?? (generator?.integer ?? $generator.integer)(0, 100), - clerks: (generator?.array ?? $generator.array)(() => - $ro1(_recursive, _recursive ? 1 + _depth : _depth), +const department = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid + )(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + minLength: 3, + }, ), + limit: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + }), + clerks: (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => _ro1(_recursive, _recursive ? 1 + _depth : _depth), + }), }); - const $ro1 = (_recursive = false, _depth = 0) => ({ - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - age: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: "ExclusiveMinimum<19>", - kind: "exclusiveMinimum", - value: 19, - }, - { - name: "Maximum<100>", - kind: "maximum", - value: 100, - }, - ]) ?? (generator?.number ?? $generator.number)(19, 100), - authority: - (generator?.customs ?? $generator.customs)?.number?.([]) ?? - (generator?.number ?? $generator.number)(0, 100), - joined_at: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"date">', - kind: "format", - value: "date", - }, - ]) ?? (generator?.date ?? $generator.date)(), + const _ro1 = (_recursive = false, _depth = 0) => ({ + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + age: (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({ + type: "number", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + }), + authority: ( + _generator?.number ?? __typia_transform__randomNumber._randomNumber + )({ + type: "number", + }), + joined_at: ( + _generator?.date ?? __typia_transform__randomFormatDate._randomFormatDate + )(), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); const cloned = (() => { - const $guard = typia.misc.assertClone.guard; - const $cp0 = (input) => - input.map((elem) => - "object" === typeof elem && null !== elem ? $co1(elem) : elem, - ); - const $io0 = (input) => + const _cp0 = (input) => input.map((elem) => _co1(elem)); + const _io0 = (input) => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -324,9 +310,9 @@ const cloned = (() => { input.limit <= 2147483647 && Array.isArray(input.clerks) && input.clerks.every( - (elem) => "object" === typeof elem && null !== elem && $io1(elem), + (elem) => "object" === typeof elem && null !== elem && _io1(elem), ); - const $io1 = (input) => + const _io1 = (input) => "string" === typeof input.name && "number" === typeof input.age && 19 < input.age && @@ -334,23 +320,25 @@ const cloned = (() => { "number" === typeof input.authority && "string" === typeof input.joined_at && /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test(input.joined_at); - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -359,18 +347,20 @@ const cloned = (() => { )) && (("string" === typeof input.name && (3 <= input.name.length || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".name", expected: "string & MinLength<3>", value: input.name, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".name", expected: "(string & MinLength<3>)", value: input.name, @@ -381,18 +371,20 @@ const cloned = (() => { ((Math.floor(input.limit) === input.limit && -2147483648 <= input.limit && input.limit <= 2147483647) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".limit", expected: 'number & Type<"int32">', value: input.limit, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".limit", expected: '(number & Type<"int32">)', value: input.limit, @@ -400,9 +392,10 @@ const cloned = (() => { _errorFactory, )) && (((Array.isArray(input.clerks) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".clerks", expected: "Array", value: input.clerks, @@ -412,23 +405,25 @@ const cloned = (() => { input.clerks.every( (elem, _index2) => ((("object" === typeof elem && null !== elem) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".clerks[" + _index2 + "]", expected: "IClerk", value: elem, }, _errorFactory, )) && - $ao1( + _ao1( elem, _path + ".clerks[" + _index2 + "]", true && _exceptionable, )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".clerks[" + _index2 + "]", expected: "IClerk", value: elem, @@ -436,20 +431,22 @@ const cloned = (() => { _errorFactory, ), )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".clerks", expected: "Array", value: input.clerks, }, _errorFactory, )); - const $ao1 = (input, _path, _exceptionable = true) => + const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".name", expected: "string", value: input.name, @@ -458,9 +455,10 @@ const cloned = (() => { )) && (("number" === typeof input.age && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -468,18 +466,20 @@ const cloned = (() => { _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".age", expected: "(number & ExclusiveMinimum<19> & Maximum<100>)", value: input.age, @@ -487,9 +487,10 @@ const cloned = (() => { _errorFactory, )) && ("number" === typeof input.authority || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".authority", expected: "number", value: input.authority, @@ -500,57 +501,61 @@ const cloned = (() => { (/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test( input.joined_at, ) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".joined_at", expected: 'string & Format<"date">', value: input.joined_at, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertClone", path: _path + ".joined_at", expected: '(string & Format<"date">)', value: input.joined_at, }, _errorFactory, )); - const $co0 = (input) => ({ + const _co0 = (input) => ({ id: input.id, name: input.name, limit: input.limit, - clerks: Array.isArray(input.clerks) ? $cp0(input.clerks) : input.clerks, + clerks: _cp0(input.clerks), }); - const $co1 = (input) => ({ + const _co1 = (input) => ({ name: input.name, age: input.age, authority: input.authority, joined_at: input.joined_at, }); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; const __assert = (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.misc.assertClone", path: _path + "", expected: "IDepartment", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.misc.assertClone", path: _path + "", expected: "IDepartment", value: input, @@ -560,8 +565,7 @@ const cloned = (() => { } return input; }; - const __clone = (input) => - "object" === typeof input && null !== input ? $co0(input) : input; + const __clone = (input) => _co0(input); return (input, errorFactory) => __clone(__assert(input, errorFactory)); })()(department); console.log(cloned); @@ -678,79 +682,68 @@ interface IClerk { ```javascript filename="examples/bin/assertPrune.js" showLineNumbers {67-334} +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber.js"; +import * as __typia_transform__randomFormatDate from "typia/lib/internal/_randomFormatDate.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; -const department = ((generator) => { - const $generator = typia.random.generator; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"uuid">', - kind: "format", - value: "uuid", - }, - ]) ?? (generator?.uuid ?? $generator.uuid)(), - name: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: "MinLength<3>", - kind: "minLength", - value: 3, - }, - ]) ?? - (generator?.string ?? $generator.string)( - (generator?.integer ?? $generator.integer)(3, 25), - ), - limit: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"int32">', - kind: "type", - value: "int32", - }, - ]) ?? (generator?.integer ?? $generator.integer)(0, 100), - clerks: (generator?.array ?? $generator.array)(() => - $ro1(_recursive, _recursive ? 1 + _depth : _depth), +const department = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid + )(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + minLength: 3, + }, ), + limit: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + }), + clerks: (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => _ro1(_recursive, _recursive ? 1 + _depth : _depth), + }), }); - const $ro1 = (_recursive = false, _depth = 0) => ({ - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - age: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: "ExclusiveMinimum<19>", - kind: "exclusiveMinimum", - value: 19, - }, - { - name: "Maximum<100>", - kind: "maximum", - value: 100, - }, - ]) ?? (generator?.number ?? $generator.number)(19, 100), - authority: - (generator?.customs ?? $generator.customs)?.number?.([]) ?? - (generator?.number ?? $generator.number)(0, 100), - joined_at: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"date">', - kind: "format", - value: "date", - }, - ]) ?? (generator?.date ?? $generator.date)(), + const _ro1 = (_recursive = false, _depth = 0) => ({ + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + age: (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({ + type: "number", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + }), + authority: ( + _generator?.number ?? __typia_transform__randomNumber._randomNumber + )({ + type: "number", + }), + joined_at: ( + _generator?.date ?? __typia_transform__randomFormatDate._randomFormatDate + )(), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); const pruned = (() => { - const $guard = typia.misc.assertPrune.guard; - const $pp0 = (input) => + const _pp0 = (input) => input.forEach((elem) => { - if ("object" === typeof elem && null !== elem) $po1(elem); + if ("object" === typeof elem && null !== elem) _po1(elem); }); - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -763,9 +756,9 @@ const pruned = (() => { input.limit <= 2147483647 && Array.isArray(input.clerks) && input.clerks.every( - (elem) => "object" === typeof elem && null !== elem && $io1(elem), + (elem) => "object" === typeof elem && null !== elem && _io1(elem), ); - const $io1 = (input) => + const _io1 = (input) => "string" === typeof input.name && "number" === typeof input.age && 19 < input.age && @@ -773,23 +766,25 @@ const pruned = (() => { "number" === typeof input.authority && "string" === typeof input.joined_at && /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test(input.joined_at); - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -798,18 +793,20 @@ const pruned = (() => { )) && (("string" === typeof input.name && (3 <= input.name.length || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".name", expected: "string & MinLength<3>", value: input.name, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".name", expected: "(string & MinLength<3>)", value: input.name, @@ -820,18 +817,20 @@ const pruned = (() => { ((Math.floor(input.limit) === input.limit && -2147483648 <= input.limit && input.limit <= 2147483647) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".limit", expected: 'number & Type<"int32">', value: input.limit, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".limit", expected: '(number & Type<"int32">)', value: input.limit, @@ -839,9 +838,10 @@ const pruned = (() => { _errorFactory, )) && (((Array.isArray(input.clerks) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".clerks", expected: "Array", value: input.clerks, @@ -851,23 +851,25 @@ const pruned = (() => { input.clerks.every( (elem, _index2) => ((("object" === typeof elem && null !== elem) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".clerks[" + _index2 + "]", expected: "IClerk", value: elem, }, _errorFactory, )) && - $ao1( + _ao1( elem, _path + ".clerks[" + _index2 + "]", true && _exceptionable, )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".clerks[" + _index2 + "]", expected: "IClerk", value: elem, @@ -875,20 +877,22 @@ const pruned = (() => { _errorFactory, ), )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".clerks", expected: "Array", value: input.clerks, }, _errorFactory, )); - const $ao1 = (input, _path, _exceptionable = true) => + const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".name", expected: "string", value: input.name, @@ -897,9 +901,10 @@ const pruned = (() => { )) && (("number" === typeof input.age && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -907,18 +912,20 @@ const pruned = (() => { _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".age", expected: "(number & ExclusiveMinimum<19> & Maximum<100>)", value: input.age, @@ -926,9 +933,10 @@ const pruned = (() => { _errorFactory, )) && ("number" === typeof input.authority || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".authority", expected: "number", value: input.authority, @@ -939,33 +947,35 @@ const pruned = (() => { (/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/.test( input.joined_at, ) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".joined_at", expected: 'string & Format<"date">', value: input.joined_at, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.misc.assertPrune", path: _path + ".joined_at", expected: '(string & Format<"date">)', value: input.joined_at, }, _errorFactory, )); - const $po0 = (input) => { - if (Array.isArray(input.clerks)) $pp0(input.clerks); + const _po0 = (input) => { + if (Array.isArray(input.clerks)) _pp0(input.clerks); for (const key of Object.keys(input)) { if ("id" === key || "name" === key || "limit" === key || "clerks" === key) continue; delete input[key]; } }; - const $po1 = (input) => { + const _po1 = (input) => { for (const key of Object.keys(input)) { if ( "name" === key || @@ -978,26 +988,28 @@ const pruned = (() => { } }; const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; const __assert = (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.misc.assertPrune", path: _path + "", expected: "IDepartment", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.misc.assertPrune", path: _path + "", expected: "IDepartment", value: input, @@ -1008,9 +1020,13 @@ const pruned = (() => { return input; }; const __prune = (input) => { - if ("object" === typeof input && null !== input) $po0(input); + if ("object" === typeof input && null !== input) _po0(input); + }; + return (input, errorFactory) => { + input = __assert(input, errorFactory); + __prune(input); + return input; }; - return (input, errorFactory) => __prune(__assert(input, errorFactory)); })()(department); console.log(pruned); ``` @@ -1991,24 +2007,42 @@ typia.http.createQuery(); ```javascript filename="examples/bin/query.js" showLineNumbers +import * as __typia_transform__httpQueryParseURLSearchParams from "typia/lib/internal/_httpQueryParseURLSearchParams.js"; +import * as __typia_transform__httpQueryReadNumber from "typia/lib/internal/_httpQueryReadNumber.js"; +import * as __typia_transform__httpQueryReadBoolean from "typia/lib/internal/_httpQueryReadBoolean.js"; +import * as __typia_transform__httpQueryReadString from "typia/lib/internal/_httpQueryReadString.js"; +import * as __typia_transform__httpQueryReadArray from "typia/lib/internal/_httpQueryReadArray.js"; import typia from "typia"; (() => { - const $params = typia.http.createQuery.params; - const $number = typia.http.createQuery.number; - const $boolean = typia.http.createQuery.boolean; - const $string = typia.http.createQuery.string; - const $array = typia.http.createQuery.array; return (input) => { - input = $params(input); + input = + __typia_transform__httpQueryParseURLSearchParams._httpQueryParseURLSearchParams( + input, + ); const output = { - limit: $number(input.get("limit")) ?? undefined, - enforce: $boolean(input.get("enforce")), - values: $array( - input.getAll("values").map((elem) => $string(elem)), + limit: + __typia_transform__httpQueryReadNumber._httpQueryReadNumber( + input.get("limit"), + ) ?? undefined, + enforce: __typia_transform__httpQueryReadBoolean._httpQueryReadBoolean( + input.get("enforce"), + ), + values: __typia_transform__httpQueryReadArray._httpQueryReadArray( + input + .getAll("values") + .map((elem) => + __typia_transform__httpQueryReadString._httpQueryReadString(elem), + ), undefined, ), - atomic: $string(input.get("atomic")), - indexes: input.getAll("indexes").map((elem) => $number(elem)), + atomic: __typia_transform__httpQueryReadString._httpQueryReadString( + input.get("atomic"), + ), + indexes: input + .getAll("indexes") + .map((elem) => + __typia_transform__httpQueryReadNumber._httpQueryReadNumber(elem), + ), }; return output; }; @@ -2263,30 +2297,41 @@ typia.http.createHeaders(); ```javascript filename="examples/bin/headers.js" showLineNumbers +import * as __typia_transform__httpHeaderReadNumber from "typia/lib/internal/_httpHeaderReadNumber.js"; +import * as __typia_transform__httpHeaderReadBoolean from "typia/lib/internal/_httpHeaderReadBoolean.js"; import typia from "typia"; (() => { - const $number = typia.http.createHeaders.number; - const $boolean = typia.http.createHeaders.boolean; - const $string = typia.http.createHeaders.string; return (input) => { const output = { "x-Category": input["x-category"], "x-MEMO": input["x-memo"], "x-nAmE": input["x-name"], "x-ValUes": Array.isArray(input["x-values"]) - ? input["x-values"].map($number) - : input["x-values"]?.split(", ")?.map($number) ?? [], + ? input["x-values"].map( + __typia_transform__httpHeaderReadNumber._httpHeaderReadNumber, + ) + : (input["x-values"] + ?.split(", ") + ?.map( + __typia_transform__httpHeaderReadNumber._httpHeaderReadNumber, + ) ?? []), "x-FlAgS": Array.isArray(input["x-flags"]) - ? input["x-flags"].map($boolean) - : input["x-flags"]?.split(", ")?.map($boolean) ?? [], + ? input["x-flags"].map( + __typia_transform__httpHeaderReadBoolean._httpHeaderReadBoolean, + ) + : (input["x-flags"] + ?.split(", ") + ?.map( + __typia_transform__httpHeaderReadBoolean._httpHeaderReadBoolean, + ) ?? []), "X-Descriptions": Array.isArray(input["x-descriptions"]) - ? input["x-descriptions"].map($string) - : input["x-descriptions"]?.split(", ")?.map($string) ?? [], + ? input["x-descriptions"].map((str) => str.trim()) + : (input["x-descriptions"]?.split(", ")?.map((str) => str.trim()) ?? + []), }; return output; }; })(); - ``` @@ -2335,37 +2380,38 @@ typia.http.createParameter>(); ```javascript filename="examples/bin/parameter.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__httpParameterReadString from "typia/lib/internal/_httpParameterReadString.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__httpParameterReadNumber from "typia/lib/internal/_httpParameterReadNumber.js"; import typia from "typia"; (input) => { - const $string = typia.http.createParameter.string; const assert = (() => { - const $guard = typia.http.createParameter.guard; const __is = (input) => "string" === typeof input && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input, - ); + __typia_transform__isFormatUuid._isFormatUuid(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ("string" === typeof input && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.http.createParameter", path: _path + "", expected: 'string & Format<"uuid">', value: input, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.http.createParameter", path: _path + "", expected: '(string & Format<"uuid">)', value: input, @@ -2376,39 +2422,36 @@ import typia from "typia"; return input; }; })(); - const value = $string(input); + const value = + __typia_transform__httpParameterReadString._httpParameterReadString(input); return assert(value); }; (input) => { - const $number = typia.http.createParameter.number; const assert = (() => { - const $guard = typia.http.createParameter.guard; const __is = (input) => "number" === typeof input && - Math.floor(input) === input && - 0 <= input && - input <= 4294967295; + __typia_transform__isTypeUint32._isTypeUint32(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ("number" === typeof input && - ((Math.floor(input) === input && - 0 <= input && - input <= 4294967295) || - $guard( + (__typia_transform__isTypeUint32._isTypeUint32(input) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.http.createParameter", path: _path + "", expected: 'number & Type<"uint32">', value: input, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.http.createParameter", path: _path + "", expected: '(number & Type<"uint32">)', value: input, @@ -2419,7 +2462,8 @@ import typia from "typia"; return input; }; })(); - const value = $number(input); + const value = + __typia_transform__httpParameterReadNumber._httpParameterReadNumber(input); return assert(value); }; ``` diff --git a/website/pages/docs/protobuf/decode.mdx b/website/pages/docs/protobuf/decode.mdx index 8b0ad3d4a0..bb149aac8a 100644 --- a/website/pages/docs/protobuf/decode.mdx +++ b/website/pages/docs/protobuf/decode.mdx @@ -240,152 +240,201 @@ typia.protobuf.decode(encoded); ```javascript copy filename="protobuf.decode.js" showLineNumbers +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomFormatEmail from "typia/lib/internal/_randomFormatEmail.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomBoolean from "typia/lib/internal/_randomBoolean.js"; +import * as __typia_transform__randomFormatUrl from "typia/lib/internal/_randomFormatUrl.js"; +import * as __typia_transform__randomFormatIpv4 from "typia/lib/internal/_randomFormatIpv4.js"; +import * as __typia_transform__randomFormatIpv6 from "typia/lib/internal/_randomFormatIpv6.js"; +import * as __typia_transform__randomFormatDatetime from "typia/lib/internal/_randomFormatDatetime.js"; +import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError.js"; +import * as __typia_transform__isTypeInt32 from "typia/lib/internal/_isTypeInt32.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUrl from "typia/lib/internal/_isFormatUrl.js"; +import * as __typia_transform__isFormatIpv4 from "typia/lib/internal/_isFormatIpv4.js"; +import * as __typia_transform__isFormatIpv6 from "typia/lib/internal/_isFormatIpv6.js"; +import * as __typia_transform__isFormatDateTime from "typia/lib/internal/_isFormatDateTime.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; +import * as __typia_transform__ProtobufReader from "typia/lib/internal/_ProtobufReader.js"; import typia from "typia"; -const data = ((generator) => { - const $generator = typia.random.generator; - const $pick = typia.random.pick; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"int32">', - kind: "type", - value: "int32", - }, - ]) ?? (generator?.integer ?? $generator.integer)(0, 100), - email: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"email">', - kind: "format", - value: "email", - }, - ]) ?? (generator?.email ?? $generator.email)(), - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - pet: $pick([ +const data = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + }), + email: ( + _generator?.email ?? + __typia_transform__randomFormatEmail._randomFormatEmail + )(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + pet: __typia_transform__randomPick._randomPick([ () => null, - () => $ro1(_recursive, _recursive ? 1 + _depth : _depth), - () => $ro2(_recursive, _recursive ? 1 + _depth : _depth), + () => _ro1(_recursive, _recursive ? 1 + _depth : _depth), + () => _ro2(_recursive, _recursive ? 1 + _depth : _depth), ])(), - memo: $pick([ + memo: __typia_transform__randomPick._randomPick([ () => null, () => new Map( - (generator?.array ?? $generator.array)(() => [ - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - ]), + (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => [ + ( + _generator?.string ?? + __typia_transform__randomString._randomString + )({ + type: "string", + }), + ( + _generator?.string ?? + __typia_transform__randomString._randomString + )({ + type: "string", + }), + ], + }), ), ])(), - logins: (generator?.array ?? $generator.array)(() => - $ro3(_recursive, _recursive ? 1 + _depth : _depth), - ), + logins: (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => _ro3(_recursive, _recursive ? 1 + _depth : _depth), + }), }); - const $ro1 = (_recursive = false, _depth = 0) => ({ + const _ro1 = (_recursive = false, _depth = 0) => ({ type: "cat", - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - ribbon: (generator?.boolean ?? $generator.boolean)(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + ribbon: ( + _generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean + )({ + type: "boolean", + }), }); - const $ro2 = (_recursive = false, _depth = 0) => ({ + const _ro2 = (_recursive = false, _depth = 0) => ({ type: "dog", - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - hunt: (generator?.boolean ?? $generator.boolean)(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + hunt: ( + _generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean + )({ + type: "boolean", + }), }); - const $ro3 = (_recursive = false, _depth = 0) => ({ - success: (generator?.boolean ?? $generator.boolean)(), - href: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"url">', - kind: "format", - value: "url", - }, - ]) ?? (generator?.url ?? $generator.url)(), - referrer: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"url">', - kind: "format", - value: "url", - }, - ]) ?? (generator?.url ?? $generator.url)(), - ip: $pick([ + const _ro3 = (_recursive = false, _depth = 0) => ({ + success: ( + _generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean + )({ + type: "boolean", + }), + href: ( + _generator?.url ?? __typia_transform__randomFormatUrl._randomFormatUrl + )(), + referrer: ( + _generator?.url ?? __typia_transform__randomFormatUrl._randomFormatUrl + )(), + ip: __typia_transform__randomPick._randomPick([ () => - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"ipv4">', - kind: "format", - value: "ipv4", - }, - ]) ?? (generator?.ipv4 ?? $generator.ipv4)(), + ( + _generator?.ipv4 ?? + __typia_transform__randomFormatIpv4._randomFormatIpv4 + )(), () => - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"ipv6">', - kind: "format", - value: "ipv6", - }, - ]) ?? (generator?.ipv6 ?? $generator.ipv6)(), + ( + _generator?.ipv6 ?? + __typia_transform__randomFormatIpv6._randomFormatIpv6 + )(), ])(), - time: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"date-time">', - kind: "format", - value: "date-time", - }, - ]) ?? (generator?.datetime ?? $generator.datetime)(), + time: ( + _generator?.datetime ?? + __typia_transform__randomFormatDatetime._randomFormatDatetime + )(), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); const encoded = (() => { - const $throws = typia.protobuf.encode.throws; - const $Sizer = typia.protobuf.encode.Sizer; - const $Writer = typia.protobuf.encode.Writer; const encoder = (writer, input) => { - const $peo0 = (input) => { - // property "id"; + const _peo0 = (input) => { + // property "id": (number & Type<"int32">); writer.uint32(8); writer.int32(input.id); - // property "email"; + // property "email": (string & Format<"email">); writer.uint32(18); writer.string(input.email); - // property "name"; + // property "name": string; writer.uint32(26); writer.string(input.name); - // property "pet"; + // property "pet": (ICat | IDog | null); if (null !== input.pet) { - if ("cat" === input.pet.type) - (() => { - // 4 -> ICat; - writer.uint32(34); - writer.fork(); - $peo1(input.pet); - writer.ldelim(); - })(); - else if ("dog" === input.pet.type) - (() => { - // 5 -> IDog; - writer.uint32(42); - writer.fork(); - $peo2(input.pet); - writer.ldelim(); - })(); - else - $throws({ - expected: "(ICat | IDog)", + if ("object" === typeof input.pet && null !== input.pet) { + if ("cat" === input.pet.type) + (() => { + writer.uint32(34); + writer.fork(); + _peo1(input.pet); + writer.ldelim(); + })(); + else if ("dog" === input.pet.type) + (() => { + writer.uint32(42); + writer.fork(); + _peo2(input.pet); + writer.ldelim(); + })(); + else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.encode", + expected: "(ICat | IDog)", + value: input.pet, + }); + } else if ("object" === typeof input.pet && null !== input.pet) { + if ("cat" === input.pet.type) + (() => { + writer.uint32(34); + writer.fork(); + _peo1(input.pet); + writer.ldelim(); + })(); + else if ("dog" === input.pet.type) + (() => { + writer.uint32(42); + writer.fork(); + _peo2(input.pet); + writer.ldelim(); + })(); + else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.encode", + expected: "(ICat | IDog)", + value: input.pet, + }); + } else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.encode", + expected: "(ICat | IDog | null)", value: input.pet, }); } - // property "memo"; + // property "memo": (Map | null); if (null !== input.memo) { for (const [key, value] of input.memo) { writer.uint32(50); @@ -397,104 +446,97 @@ const encoded = (() => { writer.ldelim(); } } - // property "logins"; + // property "logins": Array; if (0 !== input.logins.length) { for (const elem of input.logins) { - // 7 -> ICustomerLogin; writer.uint32(58); writer.fork(); - $peo3(elem); + _peo3(elem); writer.ldelim(); } } }; - const $peo1 = (input) => { - // property "type"; + const _peo1 = (input) => { + // property "type": "cat"; writer.uint32(10); writer.string(input.type); - // property "name"; + // property "name": string; writer.uint32(18); writer.string(input.name); - // property "ribbon"; + // property "ribbon": boolean; writer.uint32(24); writer.bool(input.ribbon); }; - const $peo2 = (input) => { - // property "type"; + const _peo2 = (input) => { + // property "type": "dog"; writer.uint32(10); writer.string(input.type); - // property "name"; + // property "name": string; writer.uint32(18); writer.string(input.name); - // property "hunt"; + // property "hunt": boolean; writer.uint32(24); writer.bool(input.hunt); }; - const $peo3 = (input) => { - // property "success"; + const _peo3 = (input) => { + // property "success": boolean; writer.uint32(8); writer.bool(input.success); - // property "href"; + // property "href": (string & Format<"url">); writer.uint32(18); writer.string(input.href); - // property "referrer"; + // property "referrer": (string & Format<"url">); writer.uint32(26); writer.string(input.referrer); - // property "ip"; + // property "ip": (string & (Format<"ipv4"> | Format<"ipv6">)); writer.uint32(34); writer.string(input.ip); - // property "time"; + // property "time": (string & Format<"date-time">); writer.uint32(42); writer.string(input.time); }; - const $io1 = (input) => + const _io1 = (input) => "cat" === input.type && "string" === typeof input.name && "boolean" === typeof input.ribbon; - const $io2 = (input) => + const _io2 = (input) => "dog" === input.type && "string" === typeof input.name && "boolean" === typeof input.hunt; - const $io3 = (input) => + const _io3 = (input) => "boolean" === typeof input.success && "string" === typeof input.href && - /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test( - input.href, - ) && + __typia_transform__isFormatUrl._isFormatUrl(input.href) && "string" === typeof input.referrer && - /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test( - input.referrer, - ) && + __typia_transform__isFormatUrl._isFormatUrl(input.referrer) && "string" === typeof input.ip && - (/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/.test( - input.ip, - ) || - /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))$/i.test( - input.ip, - )) && + (__typia_transform__isFormatIpv4._isFormatIpv4(input.ip) || + __typia_transform__isFormatIpv6._isFormatIpv6(input.ip)) && "string" === typeof input.time && - /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test( - input.time, - ); - const $iu0 = (input) => + __typia_transform__isFormatDateTime._isFormatDateTime(input.time); + const _iu0 = (input) => (() => { - if ("cat" === input.type) return $io1(input); - else if ("dog" === input.type) return $io2(input); + if ("cat" === input.type) return _io1(input); + else if ("dog" === input.type) return _io2(input); else return false; })(); - //ICustomer; - $peo0(input); + _peo0(input); return writer; }; return (input) => { - const sizer = encoder(new $Sizer(), input); - const writer = encoder(new $Writer(sizer), input); + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); return writer.buffer(); }; })()(data); (() => { - const $Reader = typia.protobuf.decode.Reader; - const $pdo0 = (reader, length = -1) => { + const _pdo0 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { id: undefined, @@ -521,16 +563,15 @@ const encoded = (() => { break; case 4: // ICat; - output.pet = $pdo1(reader, reader.uint32()); + output.pet = _pdo1(reader, reader.uint32()); break; case 5: // IDog; - output.pet = $pdo2(reader, reader.uint32()); + output.pet = _pdo2(reader, reader.uint32()); break; case 6: - // type: Map; + // Map; (() => { - output.memo ??= new Map(); const piece = reader.uint32() + reader.index(); const entry = { key: "", @@ -552,12 +593,13 @@ const encoded = (() => { break; } } + output.memo ??= new Map(); output.memo.set(entry.key, entry.value); })(); break; case 7: - // type: Array; - output.logins.push($pdo3(reader, reader.uint32())); + // Array; + output.logins.push(_pdo3(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -566,7 +608,7 @@ const encoded = (() => { } return output; }; - const $pdo1 = (reader, length = -1) => { + const _pdo1 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { type: undefined, @@ -595,7 +637,7 @@ const encoded = (() => { } return output; }; - const $pdo2 = (reader, length = -1) => { + const _pdo2 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { type: undefined, @@ -624,7 +666,7 @@ const encoded = (() => { } return output; }; - const $pdo3 = (reader, length = -1) => { + const _pdo3 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { success: undefined, @@ -664,8 +706,8 @@ const encoded = (() => { return output; }; return (input) => { - const reader = new $Reader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; })()(encoded); ``` @@ -802,10 +844,10 @@ interface ICustomerLogin { ```javascript copy filename="protobuf.createDecode.js" showLineNumbers +import * as __typia_transform__ProtobufReader from "typia/lib/internal/_ProtobufReader.js"; import typia from "typia"; export const encode = (() => { - const $Reader = typia.protobuf.createDecode.Reader; - const $pdo0 = (reader, length = -1) => { + const _pdo0 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { id: undefined, @@ -832,16 +874,15 @@ export const encode = (() => { break; case 4: // ICat; - output.pet = $pdo1(reader, reader.uint32()); + output.pet = _pdo1(reader, reader.uint32()); break; case 5: // IDog; - output.pet = $pdo2(reader, reader.uint32()); + output.pet = _pdo2(reader, reader.uint32()); break; case 6: - // type: Map; + // Map; (() => { - output.memo ??= new Map(); const piece = reader.uint32() + reader.index(); const entry = { key: "", @@ -863,12 +904,13 @@ export const encode = (() => { break; } } + output.memo ??= new Map(); output.memo.set(entry.key, entry.value); })(); break; case 7: - // type: Array; - output.logins.push($pdo3(reader, reader.uint32())); + // Array; + output.logins.push(_pdo3(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -877,7 +919,7 @@ export const encode = (() => { } return output; }; - const $pdo1 = (reader, length = -1) => { + const _pdo1 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { type: undefined, @@ -906,7 +948,7 @@ export const encode = (() => { } return output; }; - const $pdo2 = (reader, length = -1) => { + const _pdo2 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { type: undefined, @@ -935,7 +977,7 @@ export const encode = (() => { } return output; }; - const $pdo3 = (reader, length = -1) => { + const _pdo3 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { success: undefined, @@ -975,8 +1017,8 @@ export const encode = (() => { return output; }; return (input) => { - const reader = new $Reader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; })(); ``` diff --git a/website/pages/docs/protobuf/encode.mdx b/website/pages/docs/protobuf/encode.mdx index 48061a7860..361b9b9310 100644 --- a/website/pages/docs/protobuf/encode.mdx +++ b/website/pages/docs/protobuf/encode.mdx @@ -229,153 +229,201 @@ typia.protobuf.encode(customer); ``` -```typescript copy filename="protobuf.encode.js" showLineNumbers +```javascript copy filename="protobuf.encode.js" showLineNumbers +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomFormatEmail from "typia/lib/internal/_randomFormatEmail.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomBoolean from "typia/lib/internal/_randomBoolean.js"; +import * as __typia_transform__randomFormatUrl from "typia/lib/internal/_randomFormatUrl.js"; +import * as __typia_transform__randomFormatIpv4 from "typia/lib/internal/_randomFormatIpv4.js"; +import * as __typia_transform__randomFormatIpv6 from "typia/lib/internal/_randomFormatIpv6.js"; +import * as __typia_transform__randomFormatDatetime from "typia/lib/internal/_randomFormatDatetime.js"; +import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError.js"; +import * as __typia_transform__isTypeInt32 from "typia/lib/internal/_isTypeInt32.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUrl from "typia/lib/internal/_isFormatUrl.js"; +import * as __typia_transform__isFormatIpv4 from "typia/lib/internal/_isFormatIpv4.js"; +import * as __typia_transform__isFormatIpv6 from "typia/lib/internal/_isFormatIpv6.js"; +import * as __typia_transform__isFormatDateTime from "typia/lib/internal/_isFormatDateTime.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; import typia from "typia"; -const customer = ((generator) => { - const $generator = typia.random.generator; - const $pick = typia.random.pick; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"int32">', - kind: "type", - value: "int32", - }, - ]) ?? (generator?.integer ?? $generator.integer)(0, 100), - email: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"email">', - kind: "format", - value: "email", - }, - ]) ?? (generator?.email ?? $generator.email)(), - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - pet: $pick([ +const customer = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + }), + email: ( + _generator?.email ?? + __typia_transform__randomFormatEmail._randomFormatEmail + )(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + pet: __typia_transform__randomPick._randomPick([ () => null, - () => $ro1(_recursive, _recursive ? 1 + _depth : _depth), - () => $ro2(_recursive, _recursive ? 1 + _depth : _depth), + () => _ro1(_recursive, _recursive ? 1 + _depth : _depth), + () => _ro2(_recursive, _recursive ? 1 + _depth : _depth), ])(), - memo: $pick([ + memo: __typia_transform__randomPick._randomPick([ () => null, () => new Map( - (generator?.array ?? $generator.array)(() => [ - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - ]), + (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => [ + ( + _generator?.string ?? + __typia_transform__randomString._randomString + )({ + type: "string", + }), + ( + _generator?.string ?? + __typia_transform__randomString._randomString + )({ + type: "string", + }), + ], + }), ), ])(), - logins: (generator?.array ?? $generator.array)(() => - $ro3(_recursive, _recursive ? 1 + _depth : _depth), - ), + logins: (_generator?.array ?? __typia_transform__randomArray._randomArray)({ + type: "array", + element: () => _ro3(_recursive, _recursive ? 1 + _depth : _depth), + }), }); - const $ro1 = (_recursive = false, _depth = 0) => ({ + const _ro1 = (_recursive = false, _depth = 0) => ({ type: "cat", - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - ribbon: (generator?.boolean ?? $generator.boolean)(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + ribbon: ( + _generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean + )({ + type: "boolean", + }), }); - const $ro2 = (_recursive = false, _depth = 0) => ({ + const _ro2 = (_recursive = false, _depth = 0) => ({ type: "dog", - name: - (generator?.customs ?? $generator.customs)?.string?.([]) ?? - (generator?.string ?? $generator.string)(), - hunt: (generator?.boolean ?? $generator.boolean)(), + name: (_generator?.string ?? __typia_transform__randomString._randomString)( + { + type: "string", + }, + ), + hunt: ( + _generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean + )({ + type: "boolean", + }), }); - const $ro3 = (_recursive = false, _depth = 0) => ({ - success: (generator?.boolean ?? $generator.boolean)(), - href: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"url">', - kind: "format", - value: "url", - }, - ]) ?? (generator?.url ?? $generator.url)(), - referrer: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"url">', - kind: "format", - value: "url", - }, - ]) ?? (generator?.url ?? $generator.url)(), - ip: $pick([ + const _ro3 = (_recursive = false, _depth = 0) => ({ + success: ( + _generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean + )({ + type: "boolean", + }), + href: ( + _generator?.url ?? __typia_transform__randomFormatUrl._randomFormatUrl + )(), + referrer: ( + _generator?.url ?? __typia_transform__randomFormatUrl._randomFormatUrl + )(), + ip: __typia_transform__randomPick._randomPick([ () => - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"ipv4">', - kind: "format", - value: "ipv4", - }, - ]) ?? (generator?.ipv4 ?? $generator.ipv4)(), + ( + _generator?.ipv4 ?? + __typia_transform__randomFormatIpv4._randomFormatIpv4 + )(), () => - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"ipv6">', - kind: "format", - value: "ipv6", - }, - ]) ?? (generator?.ipv6 ?? $generator.ipv6)(), + ( + _generator?.ipv6 ?? + __typia_transform__randomFormatIpv6._randomFormatIpv6 + )(), ])(), - time: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"date-time">', - kind: "format", - value: "date-time", - }, - ]) ?? (generator?.datetime ?? $generator.datetime)(), + time: ( + _generator?.datetime ?? + __typia_transform__randomFormatDatetime._randomFormatDatetime + )(), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); (() => { - const $throws = typia.protobuf.encode.throws; - const $Sizer = typia.protobuf.encode.Sizer; - const $Writer = typia.protobuf.encode.Writer; const encoder = (writer, input) => { - const $peo0 = (input) => { - // property "id"; + const _peo0 = (input) => { + // property "id": (number & Type<"int32">); writer.uint32(8); writer.int32(input.id); - // property "email"; + // property "email": (string & Format<"email">); writer.uint32(18); writer.string(input.email); - // property "name"; + // property "name": string; writer.uint32(26); writer.string(input.name); - // property "pet"; + // property "pet": (ICat | IDog | null); if (null !== input.pet) { - if ("cat" === input.pet.type) - (() => { - // 4 -> ICat; - writer.uint32(34); - writer.fork(); - $peo1(input.pet); - writer.ldelim(); - })(); - else if ("dog" === input.pet.type) - (() => { - // 5 -> IDog; - writer.uint32(42); - writer.fork(); - $peo2(input.pet); - writer.ldelim(); - })(); - else - $throws({ - expected: "(ICat | IDog)", + if ("object" === typeof input.pet && null !== input.pet) { + if ("cat" === input.pet.type) + (() => { + writer.uint32(34); + writer.fork(); + _peo1(input.pet); + writer.ldelim(); + })(); + else if ("dog" === input.pet.type) + (() => { + writer.uint32(42); + writer.fork(); + _peo2(input.pet); + writer.ldelim(); + })(); + else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.encode", + expected: "(ICat | IDog)", + value: input.pet, + }); + } else if ("object" === typeof input.pet && null !== input.pet) { + if ("cat" === input.pet.type) + (() => { + writer.uint32(34); + writer.fork(); + _peo1(input.pet); + writer.ldelim(); + })(); + else if ("dog" === input.pet.type) + (() => { + writer.uint32(42); + writer.fork(); + _peo2(input.pet); + writer.ldelim(); + })(); + else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.encode", + expected: "(ICat | IDog)", + value: input.pet, + }); + } else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.encode", + expected: "(ICat | IDog | null)", value: input.pet, }); } - // property "memo"; + // property "memo": (Map | null); if (null !== input.memo) { for (const [key, value] of input.memo) { writer.uint32(50); @@ -387,98 +435,92 @@ const customer = ((generator) => { writer.ldelim(); } } - // property "logins"; + // property "logins": Array; if (0 !== input.logins.length) { for (const elem of input.logins) { - // 7 -> ICustomerLogin; writer.uint32(58); writer.fork(); - $peo3(elem); + _peo3(elem); writer.ldelim(); } } }; - const $peo1 = (input) => { - // property "type"; + const _peo1 = (input) => { + // property "type": "cat"; writer.uint32(10); writer.string(input.type); - // property "name"; + // property "name": string; writer.uint32(18); writer.string(input.name); - // property "ribbon"; + // property "ribbon": boolean; writer.uint32(24); writer.bool(input.ribbon); }; - const $peo2 = (input) => { - // property "type"; + const _peo2 = (input) => { + // property "type": "dog"; writer.uint32(10); writer.string(input.type); - // property "name"; + // property "name": string; writer.uint32(18); writer.string(input.name); - // property "hunt"; + // property "hunt": boolean; writer.uint32(24); writer.bool(input.hunt); }; - const $peo3 = (input) => { - // property "success"; + const _peo3 = (input) => { + // property "success": boolean; writer.uint32(8); writer.bool(input.success); - // property "href"; + // property "href": (string & Format<"url">); writer.uint32(18); writer.string(input.href); - // property "referrer"; + // property "referrer": (string & Format<"url">); writer.uint32(26); writer.string(input.referrer); - // property "ip"; + // property "ip": (string & (Format<"ipv4"> | Format<"ipv6">)); writer.uint32(34); writer.string(input.ip); - // property "time"; + // property "time": (string & Format<"date-time">); writer.uint32(42); writer.string(input.time); }; - const $io1 = (input) => + const _io1 = (input) => "cat" === input.type && "string" === typeof input.name && "boolean" === typeof input.ribbon; - const $io2 = (input) => + const _io2 = (input) => "dog" === input.type && "string" === typeof input.name && "boolean" === typeof input.hunt; - const $io3 = (input) => + const _io3 = (input) => "boolean" === typeof input.success && "string" === typeof input.href && - /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test( - input.href, - ) && + __typia_transform__isFormatUrl._isFormatUrl(input.href) && "string" === typeof input.referrer && - /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test( - input.referrer, - ) && + __typia_transform__isFormatUrl._isFormatUrl(input.referrer) && "string" === typeof input.ip && - (/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/.test( - input.ip, - ) || - /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))$/i.test( - input.ip, - )) && + (__typia_transform__isFormatIpv4._isFormatIpv4(input.ip) || + __typia_transform__isFormatIpv6._isFormatIpv6(input.ip)) && "string" === typeof input.time && - /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test( - input.time, - ); - const $iu0 = (input) => + __typia_transform__isFormatDateTime._isFormatDateTime(input.time); + const _iu0 = (input) => (() => { - if ("cat" === input.type) return $io1(input); - else if ("dog" === input.type) return $io2(input); + if ("cat" === input.type) return _io1(input); + else if ("dog" === input.type) return _io2(input); else return false; })(); - //ICustomer; - $peo0(input); + _peo0(input); return writer; }; return (input) => { - const sizer = encoder(new $Sizer(), input); - const writer = encoder(new $Writer(sizer), input); + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); return writer.buffer(); }; })()(customer); @@ -822,48 +864,81 @@ interface ICustomerLogin { ``` -```typescript copy filename="protobuf.createEncode.js" showLineNumbers +```javascript copy filename="protobuf.createEncode.js" showLineNumbers +import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError.js"; +import * as __typia_transform__isTypeInt32 from "typia/lib/internal/_isTypeInt32.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isFormatUrl from "typia/lib/internal/_isFormatUrl.js"; +import * as __typia_transform__isFormatIpv4 from "typia/lib/internal/_isFormatIpv4.js"; +import * as __typia_transform__isFormatIpv6 from "typia/lib/internal/_isFormatIpv6.js"; +import * as __typia_transform__isFormatDateTime from "typia/lib/internal/_isFormatDateTime.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; import typia from "typia"; export const encode = (() => { - const $throws = typia.protobuf.createEncode.throws; - const $Sizer = typia.protobuf.createEncode.Sizer; - const $Writer = typia.protobuf.createEncode.Writer; const encoder = (writer, input) => { - const $peo0 = (input) => { - // property "id"; + const _peo0 = (input) => { + // property "id": (number & Type<"int32">); writer.uint32(8); writer.int32(input.id); - // property "email"; + // property "email": (string & Format<"email">); writer.uint32(18); writer.string(input.email); - // property "name"; + // property "name": string; writer.uint32(26); writer.string(input.name); - // property "pet"; + // property "pet": (ICat | IDog | null); if (null !== input.pet) { - if ("cat" === input.pet.type) - (() => { - // 4 -> ICat; - writer.uint32(34); - writer.fork(); - $peo1(input.pet); - writer.ldelim(); - })(); - else if ("dog" === input.pet.type) - (() => { - // 5 -> IDog; - writer.uint32(42); - writer.fork(); - $peo2(input.pet); - writer.ldelim(); - })(); - else - $throws({ - expected: "(ICat | IDog)", + if ("object" === typeof input.pet && null !== input.pet) { + if ("cat" === input.pet.type) + (() => { + writer.uint32(34); + writer.fork(); + _peo1(input.pet); + writer.ldelim(); + })(); + else if ("dog" === input.pet.type) + (() => { + writer.uint32(42); + writer.fork(); + _peo2(input.pet); + writer.ldelim(); + })(); + else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.createEncode", + expected: "(ICat | IDog)", + value: input.pet, + }); + } else if ("object" === typeof input.pet && null !== input.pet) { + if ("cat" === input.pet.type) + (() => { + writer.uint32(34); + writer.fork(); + _peo1(input.pet); + writer.ldelim(); + })(); + else if ("dog" === input.pet.type) + (() => { + writer.uint32(42); + writer.fork(); + _peo2(input.pet); + writer.ldelim(); + })(); + else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.createEncode", + expected: "(ICat | IDog)", + value: input.pet, + }); + } else + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.createEncode", + expected: "(ICat | IDog | null)", value: input.pet, }); } - // property "memo"; + // property "memo": (Map | null); if (null !== input.memo) { for (const [key, value] of input.memo) { writer.uint32(50); @@ -875,98 +950,92 @@ export const encode = (() => { writer.ldelim(); } } - // property "logins"; + // property "logins": Array; if (0 !== input.logins.length) { for (const elem of input.logins) { - // 7 -> ICustomerLogin; writer.uint32(58); writer.fork(); - $peo3(elem); + _peo3(elem); writer.ldelim(); } } }; - const $peo1 = (input) => { - // property "type"; + const _peo1 = (input) => { + // property "type": "cat"; writer.uint32(10); writer.string(input.type); - // property "name"; + // property "name": string; writer.uint32(18); writer.string(input.name); - // property "ribbon"; + // property "ribbon": boolean; writer.uint32(24); writer.bool(input.ribbon); }; - const $peo2 = (input) => { - // property "type"; + const _peo2 = (input) => { + // property "type": "dog"; writer.uint32(10); writer.string(input.type); - // property "name"; + // property "name": string; writer.uint32(18); writer.string(input.name); - // property "hunt"; + // property "hunt": boolean; writer.uint32(24); writer.bool(input.hunt); }; - const $peo3 = (input) => { - // property "success"; + const _peo3 = (input) => { + // property "success": boolean; writer.uint32(8); writer.bool(input.success); - // property "href"; + // property "href": (string & Format<"url">); writer.uint32(18); writer.string(input.href); - // property "referrer"; + // property "referrer": (string & Format<"url">); writer.uint32(26); writer.string(input.referrer); - // property "ip"; + // property "ip": (string & (Format<"ipv4"> | Format<"ipv6">)); writer.uint32(34); writer.string(input.ip); - // property "time"; + // property "time": (string & Format<"date-time">); writer.uint32(42); writer.string(input.time); }; - const $io1 = (input) => + const _io1 = (input) => "cat" === input.type && "string" === typeof input.name && "boolean" === typeof input.ribbon; - const $io2 = (input) => + const _io2 = (input) => "dog" === input.type && "string" === typeof input.name && "boolean" === typeof input.hunt; - const $io3 = (input) => + const _io3 = (input) => "boolean" === typeof input.success && "string" === typeof input.href && - /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test( - input.href, - ) && + __typia_transform__isFormatUrl._isFormatUrl(input.href) && "string" === typeof input.referrer && - /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test( - input.referrer, - ) && + __typia_transform__isFormatUrl._isFormatUrl(input.referrer) && "string" === typeof input.ip && - (/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/.test( - input.ip, - ) || - /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))$/i.test( - input.ip, - )) && + (__typia_transform__isFormatIpv4._isFormatIpv4(input.ip) || + __typia_transform__isFormatIpv6._isFormatIpv6(input.ip)) && "string" === typeof input.time && - /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test( - input.time, - ); - const $iu0 = (input) => + __typia_transform__isFormatDateTime._isFormatDateTime(input.time); + const _iu0 = (input) => (() => { - if ("cat" === input.type) return $io1(input); - else if ("dog" === input.type) return $io2(input); + if ("cat" === input.type) return _io1(input); + else if ("dog" === input.type) return _io2(input); else return false; })(); - //ICustomer; - $peo0(input); + _peo0(input); return writer; }; return (input) => { - const sizer = encoder(new $Sizer(), input); - const writer = encoder(new $Writer(sizer), input); + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); return writer.buffer(); }; })(); diff --git a/website/pages/docs/protobuf/message.mdx b/website/pages/docs/protobuf/message.mdx index 58d115b290..c76d849330 100644 --- a/website/pages/docs/protobuf/message.mdx +++ b/website/pages/docs/protobuf/message.mdx @@ -185,17 +185,51 @@ message TypeTagExample { ```javascript filename="TypeTagExample.js" showLineNumbers +import * as __typia_transform__ProtobufReader from "typia/lib/internal/_ProtobufReader.js"; +import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError.js"; +import * as __typia_transform__isTypeInt32 from "typia/lib/internal/_isTypeInt32.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__isTypeInt64 from "typia/lib/internal/_isTypeInt64.js"; +import * as __typia_transform__isTypeFloat from "typia/lib/internal/_isTypeFloat.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; import typia from "typia"; //---- // PROTOBUF MESSAGE SCHEMA //---- -('syntax = "proto3";\n\nmessage TypeTagExample {\n required int32 int32 = 1;\n required uint32 uint32 = 2;\n required uint64 uint64 = 3;\n required int64 int64 = 4;\n required float float = 5;\n optional double double = 6;\n optional string string = 7;\n oneof uint32_or_double {\n uint32 v8 = 8;\n double v9 = 9;\n }\n oneof int32_or_uint64 {\n int32 v10 = 10;\n uint64 v11 = 11;\n }\n oneof int32_or_float_or_uint64 {\n int32 v12 = 12;\n uint64 v13 = 13;\n float v14 = 14;\n }\n repeated uint64 uint64_array = 15;\n map int32_map = 16;\n}'); +[ + 'syntax = "proto3";', + "", + "message TypeTagExample {", + " required int32 int32 = 1;", + " required uint32 uint32 = 2;", + " required uint64 uint64 = 3;", + " required int64 int64 = 4;", + " required float float = 5;", + " optional double double = 6;", + " optional string string = 7;", + " oneof uint32_or_double {", + " uint32 v8 = 8;", + " double v9 = 9;", + " }", + " oneof int32_or_uint64 {", + " int32 v10 = 10;", + " uint64 v11 = 11;", + " }", + " oneof int32_or_float_or_uint64 {", + " int32 v12 = 12;", + " uint64 v13 = 13;", + " float v14 = 14;", + " }", + " repeated uint64 uint64_array = 15;", + " map int32_map = 16;", + "}", +].join("\n"); //---- // DECODE FUNCTION //---- (() => { - const $Reader = typia.protobuf.createDecode.Reader; - const $pdo0 = (reader, length = -1) => { + const _pdo0 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { int32: undefined, @@ -271,7 +305,7 @@ import typia from "typia"; output.int32_or_float_or_uint64 = reader.float(); break; case 15: - // type: Array<(bigint & Type<"uint64">)>; + // Array<(bigint & Type<"uint64">)>; if (2 === (tag & 7)) { const piece = reader.uint32() + reader.index(); while (reader.index() < piece) @@ -279,9 +313,8 @@ import typia from "typia"; } else output.uint64_array.push(reader.uint64()); break; case 16: - // type: Map; + // Map<(number & Type<"int32">), string>; (() => { - output.int32_map ??= new Map(); const piece = reader.uint32() + reader.index(); const entry = { key: undefined, @@ -303,6 +336,7 @@ import typia from "typia"; break; } } + output.int32_map ??= new Map(); output.int32_map.set(entry.key, entry.value); })(); break; @@ -314,45 +348,42 @@ import typia from "typia"; return output; }; return (input) => { - const reader = new $Reader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; })(); //---- // ENCODE FUNCTION //---- (() => { - const $throws = typia.protobuf.createEncode.throws; - const $Sizer = typia.protobuf.createEncode.Sizer; - const $Writer = typia.protobuf.createEncode.Writer; const encoder = (writer, input) => { - const $peo0 = (input) => { - // property "int32"; + const _peo0 = (input) => { + // property "int32": (number & Type<"int32">); writer.uint32(8); writer.int32(input.int32); - // property "uint32"; + // property "uint32": (number & Type<"uint32">); writer.uint32(16); writer.uint32(input.uint32); - // property "uint64"; + // property "uint64": (bigint & Type<"uint64">); writer.uint32(24); writer.uint64(input.uint64); - // property "int64"; + // property "int64": (number & Type<"int64">); writer.uint32(32); writer.int64(input.int64); - // property "float"; + // property "float": (number & Type<"float">); writer.uint32(45); writer.float(input.float); - // property "double"; + // property "double": (number | undefined); if (undefined !== input.double) { writer.uint32(49); writer.double(input.double); } - // property "string"; + // property "string": (null | string); if (null !== input.string) { writer.uint32(58); writer.string(input.string); } - // property "uint32_or_double"; + // property "uint32_or_double": (number & (Type<"uint32"> | Type<"double">)); if ( "number" === typeof input.uint32_or_double && Math.floor(input.uint32_or_double) === input.uint32_or_double && @@ -365,11 +396,12 @@ import typia from "typia"; writer.uint32(73); writer.double(input.uint32_or_double); } else - $throws({ + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.createEncode", expected: '(number & (Type<"uint32"> | Type<"double">))', value: input.uint32_or_double, }); - // property "int32_or_uint64"; + // property "int32_or_uint64": ((bigint & Type<"uint64">) | (number & Type<"int32">)); if ("number" === typeof input.int32_or_uint64) { writer.uint32(80); writer.int32(input.int32_or_uint64); @@ -377,11 +409,12 @@ import typia from "typia"; writer.uint32(88); writer.uint64(input.int32_or_uint64); } else - $throws({ + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.createEncode", expected: '((bigint & Type<"uint64">) | (number & Type<"int32">))', value: input.int32_or_uint64, }); - // property "int32_or_float_or_uint64"; + // property "int32_or_float_or_uint64": ((bigint & Type<"uint64">) | (number & (Type<"int32"> | Type<"float">))); if ( "number" === typeof input.int32_or_float_or_uint64 && Math.floor(input.int32_or_float_or_uint64) === @@ -402,12 +435,13 @@ import typia from "typia"; writer.uint32(117); writer.float(input.int32_or_float_or_uint64); } else - $throws({ + __typia_transform__throwTypeGuardError._throwTypeGuardError({ + method: "typia.protobuf.createEncode", expected: '((bigint & Type<"uint64">) | (number & (Type<"int32"> | Type<"float">)))', value: input.int32_or_float_or_uint64, }); - // property "uint64_array"; + // property "uint64_array": Array>; if (0 !== input.uint64_array.length) { writer.uint32(122); writer.fork(); @@ -416,7 +450,7 @@ import typia from "typia"; } writer.ldelim(); } - // property "int32_map"; + // property "int32_map": (Map<(number & Type<"int32">), string> | null | undefined); if (undefined !== input.int32_map && null !== input.int32_map) { for (const [key, value] of input.int32_map) { writer.uint32(130); @@ -429,13 +463,18 @@ import typia from "typia"; } } }; - //TypeTagExample; - $peo0(input); + _peo0(input); return writer; }; return (input) => { - const sizer = encoder(new $Sizer(), input); - const writer = encoder(new $Writer(sizer), input); + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); return writer.buffer(); }; })(); @@ -535,17 +574,31 @@ message CommentTagExample { ```javascript filename="CommentTagExample.js" showLineNumbers +import * as __typia_transform__ProtobufReader from "typia/lib/internal/_ProtobufReader.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; import typia from "typia"; //---- // PROTOBUF MESSAGE SCHEMA //---- -('syntax = "proto3";\n\nmessage CommentTagExample {\n required int32 int32 = 1;\n optional uint32 uint32 = 2;\n optional uint64 uint64 = 3;\n required int64 int64 = 4;\n optional float float = 5;\n required double double = 6;\n required string string = 7;\n}'); +[ + 'syntax = "proto3";', + "", + "message CommentTagExample {", + " required int32 int32 = 1;", + " optional uint32 uint32 = 2;", + " optional uint64 uint64 = 3;", + " required int64 int64 = 4;", + " optional float float = 5;", + " required double double = 6;", + " required string string = 7;", + "}", +].join("\n"); //---- // DECODE FUNCTION //---- (() => { - const $Reader = typia.protobuf.createDecode.Reader; - const $pdo0 = (reader, length = -1) => { + const _pdo0 = (reader, length = -1) => { length = length < 0 ? reader.size() : reader.index() + length; const output = { int32: undefined, @@ -595,53 +648,56 @@ import typia from "typia"; return output; }; return (input) => { - const reader = new $Reader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; })(); //---- // ENCODE FUNCTION //---- (() => { - const $Sizer = typia.protobuf.createEncode.Sizer; - const $Writer = typia.protobuf.createEncode.Writer; const encoder = (writer, input) => { - const $peo0 = (input) => { - // property "int32"; + const _peo0 = (input) => { + // property "int32": (number & Type<"int32">); writer.uint32(8); writer.int32(input.int32); - // property "uint32"; + // property "uint32": ((number & Type<"uint32">) | null | undefined); if (undefined !== input.uint32 && null !== input.uint32) { writer.uint32(16); writer.uint32(input.uint32); } - // property "uint64"; + // property "uint64": ((number & Type<"uint64">) | undefined); if (undefined !== input.uint64) { writer.uint32(24); writer.uint64(input.uint64); } - // property "int64"; + // property "int64": (number & Type<"int64">); writer.uint32(32); writer.int64(input.int64); - // property "float"; + // property "float": ((number & Type<"float">) | null); if (null !== input.float) { writer.uint32(45); writer.float(input.float); } - // property "double"; + // property "double": number; writer.uint32(49); writer.double(input.double); - // property "string"; + // property "string": string; writer.uint32(58); writer.string(input.string); }; - //CommentTagExample; - $peo0(input); + _peo0(input); return writer; }; return (input) => { - const sizer = encoder(new $Sizer(), input); - const writer = encoder(new $Writer(sizer), input); + const sizer = encoder( + new __typia_transform__ProtobufSizer._ProtobufSizer(), + input, + ); + const writer = encoder( + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), + input, + ); return writer.buffer(); }; })(); diff --git a/website/pages/docs/pure.mdx b/website/pages/docs/pure.mdx index 7b91f88088..555fd61da8 100644 --- a/website/pages/docs/pure.mdx +++ b/website/pages/docs/pure.mdx @@ -370,18 +370,18 @@ export const assertArticle = typia.createAssert(); ```javascript filename="assertArticle.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatDateTime from "typia/lib/internal/_isFormatDateTime.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; export const assertArticle = (() => { - const $guard = typia.createAssert.guard; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && (null === input.files || (Array.isArray(input.files) && input.files.every( - (elem) => "object" === typeof elem && null !== elem && $io1(elem), + (elem) => "object" === typeof elem && null !== elem && _io1(elem), ))) && (null === input.title || ("string" === typeof input.title && @@ -389,35 +389,33 @@ export const assertArticle = (() => { input.title.length <= 100)) && "string" === typeof input.body && "string" === typeof input.created_at && - /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test( - input.created_at, - ); - const $io1 = (input) => + __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at); + const _io1 = (input) => "string" === typeof input.name && - /^[a-z0-9]+$/.test(input.name) && + RegExp("^[a-z0-9]+$").test(input.name) && input.name.length <= 255 && (null === input.extension || ("string" === typeof input.extension && - /^[a-z0-9]+$/.test(input.extension) && + RegExp("^[a-z0-9]+$").test(input.extension) && input.extension.length <= 8)) && "string" === typeof input.url; - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -426,9 +424,10 @@ export const assertArticle = (() => { )) && (null === input.files || ((Array.isArray(input.files) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".files", expected: "(Array | null)", value: input.files, @@ -438,23 +437,25 @@ export const assertArticle = (() => { input.files.every( (elem, _index2) => ((("object" === typeof elem && null !== elem) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".files[" + _index2 + "]", expected: "IAttachmentFile", value: elem, }, _errorFactory, )) && - $ao1( + _ao1( elem, _path + ".files[" + _index2 + "]", true && _exceptionable, )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".files[" + _index2 + "]", expected: "IAttachmentFile", value: elem, @@ -462,9 +463,10 @@ export const assertArticle = (() => { _errorFactory, ), )) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".files", expected: "(Array | null)", value: input.files, @@ -474,9 +476,10 @@ export const assertArticle = (() => { (null === input.title || ("string" === typeof input.title && (5 <= input.title.length || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".title", expected: "string & MinLength<5>", value: input.title, @@ -484,18 +487,20 @@ export const assertArticle = (() => { _errorFactory, )) && (input.title.length <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".title", expected: "string & MaxLength<100>", value: input.title, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".title", expected: "((string & MinLength<5> & MaxLength<100>) | null)", value: input.title, @@ -503,9 +508,10 @@ export const assertArticle = (() => { _errorFactory, )) && ("string" === typeof input.body || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".body", expected: "string", value: input.body, @@ -513,33 +519,36 @@ export const assertArticle = (() => { _errorFactory, )) && (("string" === typeof input.created_at && - (/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test( + (__typia_transform__isFormatDateTime._isFormatDateTime( input.created_at, ) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".created_at", expected: 'string & Format<"date-time">', value: input.created_at, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".created_at", expected: '(string & Format<"date-time">)', value: input.created_at, }, _errorFactory, )); - const $ao1 = (input, _path, _exceptionable = true) => + const _ao1 = (input, _path, _exceptionable = true) => (("string" === typeof input.name && - (/^[a-z0-9]+$/.test(input.name) || - $guard( + (RegExp("^[a-z0-9]+$").test(input.name) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".name", expected: 'string & Pattern<"^[a-z0-9]+$">', value: input.name, @@ -547,18 +556,20 @@ export const assertArticle = (() => { _errorFactory, )) && (input.name.length <= 255 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".name", expected: "string & MaxLength<255>", value: input.name, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".name", expected: '(string & Pattern<"^[a-z0-9]+$"> & MaxLength<255>)', value: input.name, @@ -567,10 +578,11 @@ export const assertArticle = (() => { )) && (null === input.extension || ("string" === typeof input.extension && - (/^[a-z0-9]+$/.test(input.extension) || - $guard( + (RegExp("^[a-z0-9]+$").test(input.extension) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".extension", expected: 'string & Pattern<"^[a-z0-9]+$">', value: input.extension, @@ -578,18 +590,20 @@ export const assertArticle = (() => { _errorFactory, )) && (input.extension.length <= 8 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".extension", expected: "string & MaxLength<8>", value: input.extension, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".extension", expected: '((string & Pattern<"^[a-z0-9]+$"> & MaxLength<8>) | null)', value: input.extension, @@ -597,9 +611,10 @@ export const assertArticle = (() => { _errorFactory, )) && ("string" === typeof input.url || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".url", expected: "string", value: input.url, @@ -607,26 +622,28 @@ export const assertArticle = (() => { _errorFactory, )); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.createAssert", path: _path + "", expected: "IBbsArticle", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.createAssert", path: _path + "", expected: "IBbsArticle", value: input, diff --git a/website/pages/docs/random.mdx b/website/pages/docs/random.mdx index 4d5213bcd1..c5f50c86a1 100644 --- a/website/pages/docs/random.mdx +++ b/website/pages/docs/random.mdx @@ -234,54 +234,34 @@ interface IMember { ```javascript filename="random.js" -"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")); -const member = ((generator) => { - const $generator = typia_1.default.random.generator; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"uuid">', - kind: "format", - value: "uuid", - }, - ]) ?? (generator?.uuid ?? $generator.uuid)(), - email: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"email">', - kind: "format", - value: "email", - }, - ]) ?? (generator?.email ?? $generator.email)(), - age: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"uint32">', - kind: "type", - value: "uint32", - }, - { - name: "ExclusiveMinimum<19>", - kind: "exclusiveMinimum", - value: 19, - }, - { - name: "Maximum<100>", - kind: "maximum", - value: 100, - }, - ]) ?? (generator?.integer ?? $generator.integer)(19, 100), +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomFormatEmail from "typia/lib/internal/_randomFormatEmail.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import typia from "typia"; +const member = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid + )(), + email: ( + _generator?.email ?? + __typia_transform__randomFormatEmail._randomFormatEmail + )(), + age: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + }), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); console.log(member); ``` @@ -570,68 +550,54 @@ interface CommentTag { ```javascript filename="random.tags.js" showLineNumbers +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber.js"; +import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomPattern from "typia/lib/internal/_randomPattern.js"; +import * as __typia_transform__randomFormatDatetime from "typia/lib/internal/_randomFormatDatetime.js"; import typia from "typia"; -const data = ((generator) => { - const $generator = typia.random.generator; - const $pick = typia.random.pick; - const $ro0 = (_recursive = false, _depth = 0) => ({ - type: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: 'Type<"int32">', - kind: "type", - value: "int32", - }, - ]) ?? (generator?.integer ?? $generator.integer)(0, 100), - number: $pick([ +const data = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + type: ( + _generator?.integer ?? __typia_transform__randomInteger._randomInteger + )({ + type: "integer", + }), + number: __typia_transform__randomPick._randomPick([ () => undefined, () => - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: "ExclusiveMinimum<19>", - kind: "exclusiveMinimum", - value: 19, - }, - { - name: "Maximum<100>", - kind: "maximum", - value: 100, - }, - ]) ?? (generator?.number ?? $generator.number)(19, 100), + (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({ + type: "number", + exclusiveMinimum: true, + minimum: 19, + maximum: 100, + }), ])(), - string: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: "MinLength<3>", - kind: "minLength", - value: 3, - }, - ]) ?? - (generator?.string ?? $generator.string)( - (generator?.integer ?? $generator.integer)(3, 25), - ), - pattern: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Pattern<"^[a-z]+$">', - kind: "pattern", - value: "^[a-z]+$", - }, - ]) ?? (generator?.pattern ?? $generator.pattern)(/^[a-z]+$/), - format: $pick([ + string: ( + _generator?.string ?? __typia_transform__randomString._randomString + )({ + type: "string", + minLength: 3, + }), + pattern: ( + _generator?.pattern ?? __typia_transform__randomPattern._randomPattern + )(new RegExp("^[a-z]+$")), + format: __typia_transform__randomPick._randomPick([ () => null, () => - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"date-time">', - kind: "format", - value: "date-time", - }, - ]) ?? (generator?.datetime ?? $generator.datetime)(), + ( + _generator?.datetime ?? + __typia_transform__randomFormatDatetime._randomFormatDatetime + )(), ])(), }); - return $ro0(); -})(); + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()(); console.log(data); ``` @@ -914,59 +880,45 @@ type PowerOf = typia.tags.TagBase<{ ```javascript filename="examples/bin/random-customization.js" -"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")); -const RandomGenerator_1 = require("typia/lib/utils/RandomGenerator"); -const data = ((generator) => { - const $generator = typia_1.default.random.generator; - const $ro0 = (_recursive = false, _depth = 0) => ({ - id: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Format<"uuid">', - kind: "format", - value: "uuid", - }, - ]) ?? (generator?.uuid ?? $generator.uuid)(), - dollar: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: "Dolloar", - kind: "dollar", - }, - ]) ?? (generator?.string ?? $generator.string)(), - postfix: - (generator?.customs ?? $generator.customs)?.string?.([ - { - name: 'Postfix<"abcd">', - kind: "postfix", - value: "abcd", - }, - ]) ?? (generator?.string ?? $generator.string)(), - powerOf: - (generator?.customs ?? $generator.customs)?.number?.([ - { - name: "PowerOf<2>", - kind: "powerOf", - value: 2, - }, - ]) ?? (generator?.number ?? $generator.number)(0, 100), +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber.js"; +import typia from "typia"; +import { RandomGenerator } from "typia/lib/utils/RandomGenerator"; +const data = (() => { + const _ro0 = (_recursive = false, _depth = 0) => ({ + id: ( + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid + )(), + dollar: ( + _generator?.string ?? __typia_transform__randomString._randomString + )({ + type: "string", + }), + postfix: ( + _generator?.string ?? __typia_transform__randomString._randomString + )({ + type: "string", + }), + powerOf: ( + _generator?.number ?? __typia_transform__randomNumber._randomNumber + )({ + type: "number", + }), }); - return $ro0(); -})({ + let _generator; + return (generator) => { + _generator = generator; + return _ro0(); + }; +})()({ customs: { string: (tags) => { if (tags.find((t) => t.kind === "dollar") !== undefined) - return "$" + RandomGenerator_1.RandomGenerator.integer(); + return "$" + RandomGenerator.integer(); const postfix = tags.find((t) => t.kind === "postfix"); if (postfix !== undefined) - return RandomGenerator_1.RandomGenerator.string() + postfix.value; + return RandomGenerator.string() + postfix.value; }, }, }); diff --git a/website/pages/docs/setup.mdx b/website/pages/docs/setup.mdx index 5693414447..ec97678a45 100644 --- a/website/pages/docs/setup.mdx +++ b/website/pages/docs/setup.mdx @@ -69,21 +69,19 @@ interface IMember { ```javascript filename="examples/bin/check.js" showLineNumbers {2-16} +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; import typia from "typia"; export const check = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && 19 < input.age && input.age <= 100; - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })(); ``` diff --git a/website/pages/docs/validators/assert.mdx b/website/pages/docs/validators/assert.mdx index 41e7b7f655..53772e13a4 100644 --- a/website/pages/docs/validators/assert.mdx +++ b/website/pages/docs/validators/assert.mdx @@ -75,42 +75,39 @@ interface IMember { ```javascript filename="examples/bin/assert.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; import { v4 } from "uuid"; (() => { - const $guard = typia.assert.guard; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -118,21 +115,21 @@ import { v4 } from "uuid"; _errorFactory, )) && (("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || - $guard( + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".email", expected: 'string & Format<"email">', value: input.email, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".email", expected: '(string & Format<"email">)', value: input.email, @@ -140,12 +137,11 @@ import { v4 } from "uuid"; _errorFactory, )) && (("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || - $guard( + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: 'number & Type<"uint32">', value: input.age, @@ -153,9 +149,10 @@ import { v4 } from "uuid"; _errorFactory, )) && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -163,18 +160,20 @@ import { v4 } from "uuid"; _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: '(number & Type<"uint32"> & ExclusiveMinimum<19> & Maximum<100>)', @@ -183,26 +182,28 @@ import { v4 } from "uuid"; _errorFactory, )); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.assert", path: _path + "", expected: "IMember", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.assert", path: _path + "", expected: "IMember", value: input, @@ -283,42 +284,39 @@ interface IMember { ```javascript filename="examples/bin/assertEquals.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; import { v4 } from "uuid"; (() => { - const $guard = typia.assert.guard; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -326,21 +324,21 @@ import { v4 } from "uuid"; _errorFactory, )) && (("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || - $guard( + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".email", expected: 'string & Format<"email">', value: input.email, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".email", expected: '(string & Format<"email">)', value: input.email, @@ -348,12 +346,11 @@ import { v4 } from "uuid"; _errorFactory, )) && (("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || - $guard( + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: 'number & Type<"uint32">', value: input.age, @@ -361,9 +358,10 @@ import { v4 } from "uuid"; _errorFactory, )) && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -371,18 +369,20 @@ import { v4 } from "uuid"; _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.assert", path: _path + ".age", expected: '(number & Type<"uint32"> & ExclusiveMinimum<19> & Maximum<100>)', @@ -391,26 +391,28 @@ import { v4 } from "uuid"; _errorFactory, )); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.assert", path: _path + "", expected: "IMember", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.assert", path: _path + "", expected: "IMember", value: input, @@ -546,41 +548,38 @@ interface IMember { ```javascript filename="examples/bin/createAssert.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; export const assertMember = (() => { - const $guard = typia.createAssert.guard; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || - $guard( + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".id", expected: 'string & Format<"uuid">', value: input.id, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".id", expected: '(string & Format<"uuid">)', value: input.id, @@ -588,21 +587,21 @@ export const assertMember = (() => { _errorFactory, )) && (("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || - $guard( + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".email", expected: 'string & Format<"email">', value: input.email, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".email", expected: '(string & Format<"email">)', value: input.email, @@ -610,12 +609,11 @@ export const assertMember = (() => { _errorFactory, )) && (("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || - $guard( + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".age", expected: 'number & Type<"uint32">', value: input.age, @@ -623,9 +621,10 @@ export const assertMember = (() => { _errorFactory, )) && (19 < input.age || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".age", expected: "number & ExclusiveMinimum<19>", value: input.age, @@ -633,18 +632,20 @@ export const assertMember = (() => { _errorFactory, )) && (input.age <= 100 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".age", expected: "number & Maximum<100>", value: input.age, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".age", expected: '(number & Type<"uint32"> & ExclusiveMinimum<19> & Maximum<100>)', @@ -653,26 +654,28 @@ export const assertMember = (() => { _errorFactory, )); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.createAssert", path: _path + "", expected: "IMember", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.createAssert", path: _path + "", expected: "IMember", value: input, @@ -831,10 +834,10 @@ interface Something { ```javascript filename="examples/bin/assert-custom-tags.js" showLineNumbers +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; export const assertSomething = (() => { - const $guard = typia.createAssert.guard; - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.dollar && input.dollar[0] === "$" && !isNaN(Number(input.dollar.substring(1).split(",").join(""))) && @@ -842,22 +845,24 @@ export const assertSomething = (() => { input.postfix.endsWith("!!!") && "number" === typeof input.isEven && input.isEven % 2 === 0; - const $ao0 = (input, _path, _exceptionable = true) => + const _ao0 = (input, _path, _exceptionable = true) => (("string" === typeof input.dollar && ((input.dollar[0] === "$" && !isNaN(Number(input.dollar.substring(1).split(",").join("")))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".dollar", expected: "string & Dollar", value: input.dollar, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".dollar", expected: "(string & Dollar)", value: input.dollar, @@ -866,18 +871,20 @@ export const assertSomething = (() => { )) && (("string" === typeof input.postfix && (input.postfix.endsWith("!!!") || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".postfix", expected: 'string & Postfix<"!!!">', value: input.postfix, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".postfix", expected: '(string & Postfix<"!!!">)', value: input.postfix, @@ -886,18 +893,20 @@ export const assertSomething = (() => { )) && (("number" === typeof input.isEven && (input.isEven % 2 === 0 || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".isEven", expected: "number & IsEven", value: input.isEven, }, _errorFactory, ))) || - $guard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { + method: "typia.createAssert", path: _path + ".isEven", expected: "(number & IsEven)", value: input.isEven, @@ -905,26 +914,28 @@ export const assertSomething = (() => { _errorFactory, )); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => { if (false === __is(input)) { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.createAssert", path: _path + "", expected: "Something", value: input, }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - $guard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.createAssert", path: _path + "", expected: "Something", value: input, diff --git a/website/pages/docs/validators/functional.mdx b/website/pages/docs/validators/functional.mdx index d5f8345dce..5a7a1129be 100644 --- a/website/pages/docs/validators/functional.mdx +++ b/website/pages/docs/validators/functional.mdx @@ -59,11 +59,13 @@ func(4, 5); ```javascript filename="examples/bin/assertFunction.js" showLineNumbers +import * as __typia_transform__functionalTypeGuardErrorFactory from "typia/lib/internal/_functionalTypeGuardErrorFactory.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; import typia from "typia"; const func = (() => { - const errorFactoryWrapper = typia.functional.assertFunction.errorFactory; + const errorFactoryWrapper = + __typia_transform__functionalTypeGuardErrorFactory._functionalTypeGuardErrorFactory; const __assert_param_0 = (() => { - const $guard = typia.functional.assertFunction.guard; const __is = (input) => "number" === typeof input; let _errorFactory; return ( @@ -80,9 +82,10 @@ const func = (() => { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => "number" === typeof input || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.functional.assertFunction", path: _path + "", expected: "number", value: input, @@ -94,7 +97,6 @@ const func = (() => { }; })(); const __assert_param_1 = (() => { - const $guard = typia.functional.assertFunction.guard; const __is = (input) => "number" === typeof input; let _errorFactory; return ( @@ -111,9 +113,10 @@ const func = (() => { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => "number" === typeof input || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.functional.assertFunction", path: _path + "", expected: "number", value: input, @@ -125,7 +128,6 @@ const func = (() => { }; })(); const __assert_return = (() => { - const $guard = typia.functional.assertFunction.guard; const __is = (input) => "number" === typeof input; let _errorFactory; return ( @@ -140,9 +142,10 @@ const func = (() => { _errorFactory = errorFactory; ((input, _path, _exceptionable = true) => "number" === typeof input || - $guard( + __typia_transform__assertGuard._assertGuard( true, { + method: "typia.functional.assertFunction", path: _path + "", expected: "number", value: input, @@ -210,6 +213,7 @@ func(4, 5); ```javascript filename="examples/bin/isFunction.js" showLineNumbers import typia from "typia"; +import typia from "typia"; const func = (() => { const __is_param_0 = (() => { return (input) => "number" === typeof input; @@ -260,6 +264,7 @@ func(4, 5); ```javascript filename="examples/bin/validateFunction.js" showLineNumbers +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; import typia from "typia"; const func = (() => { const __validate_param_0 = (() => { @@ -269,7 +274,7 @@ const func = (() => { return (input) => { if (false === __is(input)) { errors = []; - $report = typia.functional.validateFunction.report(errors); + $report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => "number" === typeof input || $report(true, { @@ -298,7 +303,7 @@ const func = (() => { return (input) => { if (false === __is(input)) { errors = []; - $report = typia.functional.validateFunction.report(errors); + $report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => "number" === typeof input || $report(true, { @@ -327,7 +332,7 @@ const func = (() => { return (input) => { if (false === __is(input)) { errors = []; - $report = typia.functional.validateFunction.report(errors); + $report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => "number" === typeof input || $report(true, { diff --git a/website/pages/docs/validators/is.mdx b/website/pages/docs/validators/is.mdx index 926f052b4d..48926e6405 100644 --- a/website/pages/docs/validators/is.mdx +++ b/website/pages/docs/validators/is.mdx @@ -55,25 +55,22 @@ interface IMember { ```javascript filename="examples/bin/is.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; import typia from "typia"; import { v4 } from "uuid"; const matched = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })()({ id: v4(), email: "samchon.github@gmai19l.com", @@ -128,6 +125,9 @@ interface IMember { ```javascript filename="examples/bin/equals.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; import typia from "typia"; import { v4 } from "uuid"; const input = { @@ -137,37 +137,25 @@ const input = { extra: "superfluous property", // extra }; const is = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })()(input); const equals = (() => { - const $io0 = (input, _exceptionable = true) => + const _io0 = (input, _exceptionable = true) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100 && (3 === Object.keys(input).length || @@ -178,7 +166,7 @@ const equals = (() => { return false; })); return (input, _exceptionable = true) => - "object" === typeof input && null !== input && $io0(input, true); + "object" === typeof input && null !== input && _io0(input, true); })()(input); console.log(is, equals); // true, false ``` @@ -219,24 +207,21 @@ interface IMember { ```javascript filename="examples/bin/createIs.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; import typia from "typia"; export const check = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })(); ``` @@ -391,7 +376,7 @@ interface Something { ```javascript filename="examples/bin/is-comment-tags.js" showLineNumbers import typia from "typia"; export const checkSomething = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.dollar && input.dollar[0] === "$" && !isNaN(Number(input.dollar.substring(1).split(",").join(""))) && @@ -399,7 +384,7 @@ export const checkSomething = (() => { input.postfix.endsWith("!!!") && "number" === typeof input.isEven && input.isEven % 2 === 0; - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })(); ``` diff --git a/website/pages/docs/validators/tags.mdx b/website/pages/docs/validators/tags.mdx index 94c870eb94..0eccf06075 100644 --- a/website/pages/docs/validators/tags.mdx +++ b/website/pages/docs/validators/tags.mdx @@ -66,9 +66,13 @@ interface CustomTag { ```javascript filename="is.tag.js" showLineNumbers +import * as __typia_transform__isFormatIpv4 from "typia/lib/internal/_isFormatIpv4.js"; +import * as __typia_transform__isFormatIpv6 from "typia/lib/internal/_isFormatIpv6.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; import typia from "typia"; export const checkCustomTag = (() => { - const $io0 = (input) => + const _io0 = (input) => "number" === typeof input.type && Math.floor(input.type) === input.type && 0 <= input.type && @@ -80,24 +84,18 @@ export const checkCustomTag = (() => { "string" === typeof input.string && 3 <= input.string.length && "string" === typeof input.pattern && - /^[a-z]+$/.test(input.pattern) && + RegExp("^[a-z]+$").test(input.pattern) && (null === input.format || ("string" === typeof input.format && - (/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/.test( - input.format, - ) || - /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))$/i.test( - input.format, - )))) && + (__typia_transform__isFormatIpv4._isFormatIpv4(input.format) || + __typia_transform__isFormatIpv6._isFormatIpv6(input.format)))) && Array.isArray(input.array) && 3 <= input.array.length && input.array.length <= 100 && input.array.every( (elem) => "string" === typeof elem && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - elem, - ), + __typia_transform__isFormatUuid._isFormatUuid(elem), ) && input.map instanceof Map && (() => @@ -106,20 +104,16 @@ export const checkCustomTag = (() => { Array.isArray(elem) && elem.length === 2 && "number" === typeof elem[0] && - Math.floor(elem[0]) === elem[0] && - 0 <= elem[0] && - elem[0] <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(elem[0]) && Array.isArray(elem[1]) && 1 <= elem[1].length && elem[1].every( (elem) => "string" === typeof elem && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - elem, - ), + __typia_transform__isFormatUuid._isFormatUuid(elem), ), ))(); - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })(); ``` @@ -240,13 +234,15 @@ interface CustomTag { ```javascript filename="is.tag.js" showLineNumbers +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__isFormatIpv4 from "typia/lib/internal/_isFormatIpv4.js"; +import * as __typia_transform__isFormatIpv6 from "typia/lib/internal/_isFormatIpv6.js"; +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; import typia from "typia"; export const checkCustomTag = (() => { - const $io0 = (input) => + const _io0 = (input) => "number" === typeof input.type && - Math.floor(input.type) === input.type && - 0 <= input.type && - input.type <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.type) && (undefined === input.number || ("number" === typeof input.number && 19 < input.number && @@ -254,24 +250,18 @@ export const checkCustomTag = (() => { "string" === typeof input.string && 3 <= input.string.length && "string" === typeof input.pattern && - /^[a-z]+$/.test(input.pattern) && + RegExp("^[a-z]+$").test(input.pattern) && (null === input.format || ("string" === typeof input.format && - (/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/.test( - input.format, - ) || - /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))$/i.test( - input.format, - )))) && + (__typia_transform__isFormatIpv4._isFormatIpv4(input.format) || + __typia_transform__isFormatIpv6._isFormatIpv6(input.format)))) && Array.isArray(input.array) && 3 <= input.array.length && input.array.length <= 100 && input.array.every( (elem) => "string" === typeof elem && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - elem, - ), + __typia_transform__isFormatUuid._isFormatUuid(elem), ) && input.map instanceof Map && (() => @@ -280,20 +270,16 @@ export const checkCustomTag = (() => { Array.isArray(elem) && elem.length === 2 && "number" === typeof elem[0] && - Math.floor(elem[0]) === elem[0] && - 0 <= elem[0] && - elem[0] <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(elem[0]) && Array.isArray(elem[1]) && 1 <= elem[1].length && elem[1].every( (elem) => "string" === typeof elem && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - elem, - ), + __typia_transform__isFormatUuid._isFormatUuid(elem), ), ))(); - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })(); ``` @@ -434,7 +420,7 @@ interface CustomTag { ```javascript filename="is.tag.js" showLineNumbers import typia from "typia"; export const checkCustomTag = (() => { - const $io0 = (input) => + const _io0 = (input) => "number" === typeof input.type && Math.floor(input.type) === input.type && 0 <= input.type && @@ -446,7 +432,7 @@ export const checkCustomTag = (() => { "string" === typeof input.string && 3 <= input.string.length && "string" === typeof input.pattern; - return (input) => "object" === typeof input && null !== input && $io0(input); + return (input) => "object" === typeof input && null !== input && _io0(input); })(); ``` @@ -648,23 +634,12 @@ type PowerOf = typia.tags.TagBase<{ ```javascript showLineNumbers filename="is.tag.custom.js" -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkTagCustom = void 0; -const typia_1 = __importDefault(require("typia")); -const checkTagCustom = (input) => { - return ( - "object" === typeof input && - null !== input && +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import typia from "typia"; +export const checkTagCustom = (() => { + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.dollar && input.dollar[0] === "$" && !isNaN(Number(input.dollar.substring(1).split(",").join(""))) && @@ -675,10 +650,9 @@ const checkTagCustom = (input) => { const denominator = Math.log(2); const value = Math.log(input.powerOf) / denominator; return Math.abs(value - Math.round(value)) < 1e-8; - })() - ); -}; -exports.checkTagCustom = checkTagCustom; + })(); + return (input) => "object" === typeof input && null !== input && _io0(input); +})(); ``` diff --git a/website/pages/docs/validators/validate.mdx b/website/pages/docs/validators/validate.mdx index 6e747e26c8..4fb19fb721 100644 --- a/website/pages/docs/validators/validate.mdx +++ b/website/pages/docs/validators/validate.mdx @@ -90,29 +90,25 @@ interface IMember { ```javascript filename="examples/bin/validate.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; import typia from "typia"; const res = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - const $vo0 = (input, _path, _exceptionable = true) => + const _vo0 = (input, _path, _exceptionable = true) => [ ("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || $report(_exceptionable, { path: _path + ".id", expected: 'string & Format<"uuid">', @@ -124,9 +120,7 @@ const res = (() => { value: input.id, }), ("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || $report(_exceptionable, { path: _path + ".email", expected: 'string & Format<"email">', @@ -138,9 +132,7 @@ const res = (() => { value: input.email, }), ("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || $report(_exceptionable, { path: _path + ".age", expected: 'number & Type<"uint32">', @@ -166,13 +158,13 @@ const res = (() => { }), ].every((flag) => flag); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors; let $report; return (input) => { if (false === __is(input)) { errors = []; - $report = typia.validate.report(errors); + $report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || $report(true, { @@ -180,7 +172,7 @@ const res = (() => { expected: "IMember", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "IMember", @@ -286,22 +278,20 @@ interface IMember { ```javascript filename="examples/bin/validateEquals.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; import typia from "typia"; const res = (() => { - const $join = typia.validateEquals.join; - const $io0 = (input, _exceptionable = true) => + const _io0 = (input, _exceptionable = true) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100 && (3 === Object.keys(input).length || @@ -311,12 +301,10 @@ const res = (() => { if (undefined === value) return true; return false; })); - const $vo0 = (input, _path, _exceptionable = true) => + const _vo0 = (input, _path, _exceptionable = true) => [ ("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || $report(_exceptionable, { path: _path + ".id", expected: 'string & Format<"uuid">', @@ -328,9 +316,7 @@ const res = (() => { value: input.id, }), ("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || $report(_exceptionable, { path: _path + ".email", expected: 'string & Format<"email">', @@ -342,9 +328,7 @@ const res = (() => { value: input.email, }), ("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || $report(_exceptionable, { path: _path + ".age", expected: 'number & Type<"uint32">', @@ -377,7 +361,11 @@ const res = (() => { const value = input[key]; if (undefined === value) return true; return $report(_exceptionable, { - path: _path + $join(key), + path: + _path + + __typia_transform__accessExpressionAsString._accessExpressionAsString( + key, + ), expected: "undefined", value: value, }); @@ -385,13 +373,13 @@ const res = (() => { .every((flag) => flag), ].every((flag) => flag); const __is = (input, _exceptionable = true) => - "object" === typeof input && null !== input && $io0(input, true); + "object" === typeof input && null !== input && _io0(input, true); let errors; let $report; return (input) => { if (false === __is(input)) { errors = []; - $report = typia.validateEquals.report(errors); + $report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || $report(true, { @@ -399,7 +387,7 @@ const res = (() => { expected: "IMember", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "IMember", @@ -490,29 +478,25 @@ interface IMember { ```javascript filename="examples/bin/createValidate.js" showLineNumbers +import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid.js"; +import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail.js"; +import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; import typia from "typia"; export const validateMember = (() => { - const $io0 = (input) => + const _io0 = (input) => "string" === typeof input.id && - /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) && + __typia_transform__isFormatUuid._isFormatUuid(input.id) && "string" === typeof input.email && - /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) && + __typia_transform__isFormatEmail._isFormatEmail(input.email) && "number" === typeof input.age && - Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295 && + __typia_transform__isTypeUint32._isTypeUint32(input.age) && 19 < input.age && input.age <= 100; - const $vo0 = (input, _path, _exceptionable = true) => + const _vo0 = (input, _path, _exceptionable = true) => [ ("string" === typeof input.id && - (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( - input.id, - ) || + (__typia_transform__isFormatUuid._isFormatUuid(input.id) || $report(_exceptionable, { path: _path + ".id", expected: 'string & Format<"uuid">', @@ -524,9 +508,7 @@ export const validateMember = (() => { value: input.id, }), ("string" === typeof input.email && - (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( - input.email, - ) || + (__typia_transform__isFormatEmail._isFormatEmail(input.email) || $report(_exceptionable, { path: _path + ".email", expected: 'string & Format<"email">', @@ -538,9 +520,7 @@ export const validateMember = (() => { value: input.email, }), ("number" === typeof input.age && - ((Math.floor(input.age) === input.age && - 0 <= input.age && - input.age <= 4294967295) || + (__typia_transform__isTypeUint32._isTypeUint32(input.age) || $report(_exceptionable, { path: _path + ".age", expected: 'number & Type<"uint32">', @@ -566,13 +546,13 @@ export const validateMember = (() => { }), ].every((flag) => flag); const __is = (input) => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors; let $report; return (input) => { if (false === __is(input)) { errors = []; - $report = typia.createValidate.report(errors); + $report = __typia_transform__validateReport._validateReport(errors); ((input, _path, _exceptionable = true) => ((("object" === typeof input && null !== input) || $report(true, { @@ -580,7 +560,7 @@ export const validateMember = (() => { expected: "IMember", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "IMember", diff --git a/website/src/components/home/HomeCodeBlock.tsx b/website/src/components/home/HomeCodeBlock.tsx index c28d53c621..f9dd71778c 100644 --- a/website/src/components/home/HomeCodeBlock.tsx +++ b/website/src/components/home/HomeCodeBlock.tsx @@ -3,13 +3,7 @@ import React from "react"; const BRIGHT_BLUE = "rgb(0, 200, 255)"; const CYAN = "rgb(80, 200, 0)"; -const HomeCodeBlock = (props: { - namespace?: string; - method: string; - color?: string; - inputColor?: string; - template?: string; -}) => ( +const HomeCodeBlock = (props: HomeCodeBlock.IProps) => ( typia {"."} @@ -23,9 +17,20 @@ const HomeCodeBlock = (props: { {"<"} {props.template ?? "T"} {">("} - {"input"} + {props.argument ? ( + {"input"} + ) : null} {")"} - {";"} ); +namespace HomeCodeBlock { + export interface IProps { + method: string; + argument: boolean; + namespace?: string; + color?: string; + inputColor?: string; + template?: string; + } +} export default HomeCodeBlock; diff --git a/website/src/movies/home/HomeHeroMovie.tsx b/website/src/movies/home/HomeHeroMovie.tsx index 2950e76f9c..7d8f8c6cb4 100644 --- a/website/src/movies/home/HomeHeroMovie.tsx +++ b/website/src/movies/home/HomeHeroMovie.tsx @@ -6,6 +6,10 @@ import { ReactNode } from "react"; import HomeCodeBlock from "../../components/home/HomeCodeBlock"; import ProductHeroLayout from "../../components/home/ProductHeroLayout"; +import { randint } from "tstl"; + +const pickRandom = (array: T[]): T => + array[randint(0, array.length - 1)]; const QuickButton = (props: { title: string; @@ -29,68 +33,99 @@ const QuickButton = (props: { ); -const HomeHeroMovie = () => ( - - - Only one line - - { + const props: HomeCodeBlock.IProps = pickRandom([ + { + method: "assert", + inputColor: "#CFCFCF", + argument: true, + }, + { + namespace: "json", + method: "stringify", + inputColor: "#CFCFCF", + argument: true, + }, + { + namespace: "llm", + method: "application", + template: "App", + argument: false, + }, + { + namespace: "protobuf", + method: "encode", + inputColor: "#CFCFCF", + argument: true, + }, + { + method: "random", + argument: false, + }, + ] satisfies HomeCodeBlock.IProps[]); + return ( + - No extra schema required + + Only one line + + + No extra schema required +
+
+ Just fine with pure TypeScript type +


- Just fine with pure TypeScript type -
-
-
- - - -
-
-
-
- - } - href="/docs" - color="info" - /> - } - href="/playground" - color="warning" - /> - } - href="https://github.com/samchon/typia" - color="success" - /> - -
-); + + + +
+
+
+
+ + } + href="/docs" + color="info" + /> + } + href="/playground" + color="warning" + /> + } + href="https://github.com/samchon/typia" + color="success" + /> + + + ); +}; export default HomeHeroMovie; diff --git a/website/src/movies/home/HomeStrengthMovie.tsx b/website/src/movies/home/HomeStrengthMovie.tsx index f2faf4c9ba..d8ed9c80ea 100644 --- a/website/src/movies/home/HomeStrengthMovie.tsx +++ b/website/src/movies/home/HomeStrengthMovie.tsx @@ -7,7 +7,13 @@ import HomeStrengthSectionMovie from "./HomeStrengthSectionMovie"; const sections: HomeStrengthSectionMovie.Props[] = [ { title: "Super-fast Runtime Validator", - subTitle: , + subTitle: ( + + ), description: (

@@ -35,6 +41,7 @@ const sections: HomeStrengthSectionMovie.Props[] = [ namespace="json" method="stringify" color="rgb(191, 64, 191)" + argument={true} /> ), description: ( @@ -62,6 +69,7 @@ const sections: HomeStrengthSectionMovie.Props[] = [ method="application" template="App" color="rgb(191, 64, 191)" + argument={false} /> ), description: ( @@ -89,6 +97,7 @@ const sections: HomeStrengthSectionMovie.Props[] = [ namespace="protobuf" method="encode" color="rgb(191, 64, 191)" + argument={true} /> ), description: ( @@ -113,7 +122,13 @@ const sections: HomeStrengthSectionMovie.Props[] = [ }, { title: "Random Data Generator", - subTitle: , + subTitle: ( + + ), description: (

Universal random generator.